Can't deploy Maven jars to S3 from Intellij - maven

I'm trying to deploy a Maven jar to S3 from within IntelliJ (meaning, using the Maven Projects panel). This fails constantly, saying:
Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project MyProject: Failed to deploy artifacts: Could not transfer artifact Project:MyProject:jar:1.0.0 from/to s3-spark.release (s3://MyS3): Unable to load AWS credentials from any provider in the chain -> [Help 1]
But, when I try to do the same from within the terminal using mvn deploy, everything works great. Any ideas what am I missing? (Using Maven 3.3.9, IntelliJ Comumnity 2016.1)

Related

Build failed, project not deployed

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project maven-web-application: Failed to deploy artifacts: Could not transfer artifact com.mt:maven-web-application:war:2.0.7-20230110.202313-1 from/to nexus (http://172.31.7.102:8081/repository/maven-snapshots/): authentication failed for http://172.31.7.102:8081/repository/maven-snapshots/com/mt/maven-web-application/2.0.7-SNAPSHOT/maven-web-application-2.0.7-20230110.202313-1.war, status: 401 Unauthorized
I have double-checked my distribution management on my Pom file and settings.xml on both jenkins and maven and everything is 100% fine. It builds successfully on my local server but won't build on my jenkins pipeline. I have been on this issue for the last 4 days. I need help
I have double-checked my distribution management on my Pom file and settings.xml on both jenkins and maven and everything is 100% fine. It builds successfully on my local server but won't build on my jenkins pipeline. I have been on this issue for the last 4 days. please, I need help

Jenkins Offline cannot able to resolve Maven Dependencies

I am trying to Build a Maven Project from Jenkins.
My server is Offline, so no Internet access or no proxy settings.
Maven Project Build absolutely perfect from Jenkins if Internet is present.
But same project fails to Build from Jenkins in absence of Internet. My repo is containing this plugin.
My Maven Home:/home/oracle/app/Trust/maven
My Jenkin Home:/home/oracle/.jenkins/
.m2 file Location:/home/oracle/.m2
Error: [ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.4.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1: The repository system is offline but the artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.4.1 is not available in the local repository. -> [Help 1]

Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy - Cannot deploy artifacts when Maven is in offline mode

I run project deploy in Maven project and get the problem as below:
Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project iris: Cannot deploy artifacts when Maven is in offline mode -> [Help 1]
Could you help me figure out this problem?
Maven is configured in offline mode, that means Maven will not try to connect to any remote repository. Therefore, the maven-deploy-plugin cannot upload your jar.
Offline mode can be configured in two different ways :
launching Maven with the -o flag. Maven is offline only for this execution.
setting the offline attribute to true in the settings.xml file. Maven is offline for all executions.
One of those two options must be enabled in your configuration and you must remove it for maven-deploy-plugin to work.

maven deploy-file to private artifactory

I've set up an artifactory and I am able to to deploy my artifacts to it with mvn deploy.
However, I am unable to to deploy-file, which I am easily able to install:
mvn install:install-file -Dfile=my.jar -DgroupId=org.group -DartifactId=art -Dversion=3.0-SNAPSHOT -Dpackaging=jar
When I try:
mvn deploy:deploy-file -Durl=http://myartifactory/artifactory/repositoryId -DrepositoryId=repositoryId -Dfile=my.jar -DgroupId=org.group -DartifactId=art -Dversion=3.0-SNAPSHOT -Dpackaging=jar
I always get:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy-file (default-cli) on project standalone-pom: Failed to retrieve remote metadata org.directwebremoting:dwr:3.0.0-rc3-SNAPSHOT/maven-metadata.xml: Could not transfer metadata org.directwebremoting:dwr:3.0.0-rc3-SNAPSHOT/maven-metadata.xml from/to repository (http://triphop:8081/artifactory/repository): Access denied to: http://triphop:8081/artifactory/repository/org/directwebremoting/dwr/3.0.0-rc3-SNAPSHOT/maven-metadata.xml -> [Help 1]
In the log of the artifactory I am getting:
20130809142431|0|REQUEST|non_authenticated_user|GET|/repository/org/group/art/3.0-SNAPSHOT/maven-metadata.xml|HTTP/1.1|401|0
Why the maven is trying to fetch the meta data? Why it does not upload them?
Maven 3 works with non unique snapshots only. Which means, it needs to know how to name your snapshot. The naming depends on what's already in repository. That's the reason it downloads the metadata.

Maven deploy cant create directories

Whenever I try and do a maven deploy it can't seem to create directories and I need to do this manually.
Any idea why this might be?
mvn deploy:deploy-file -DgroupId=quickfixj -DartifactId=quickfixj-all
-Dversion=1.5.2 -Dpackaging=jar -Dfile=/dev/quickfixj/quickfixj-all-1.5.2.jar -DrepositoryId=maven-repo -Durl=https://subversion.assembla.com/svn/MYREPO/maven -X
Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy-file (default-cli) on project standalone-pom: Failed to deploy artifacts: Could not find artifact quickfixj:quickfixj-all:jar:1.5.2 in maven-repo (https://subversion.assembla.com/svn/MYREPO/maven) -> [Help 1]
However if I manually create the directories quickfixj>quickfixj-all>1.5.2 it works fine.

Resources