I am trying to push my artifacts to Nexus from Jenkins. I am getting the following error while I deploy to Nexus from Jenkins:
Error message in Jenkins Console Output:
15:59:06 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy (default-deploy) on project sbx-java-webapp: Failed to deploy artifacts/metadata: Cannot access with type default using the available connector factories: BasicRepositoryConnectorFactory: Cannot access using the registered transporter factories: WagonTransporterFactory: java.util.NoSuchElementException
15:59:06 [ERROR] role: org.apache.maven.wagon.Wagon
15:59:06 [ERROR] roleHint: "http
15:59:06 [ERROR] -> [Help 1]
15:59:06 [ERROR]
15:59:06 [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
15:59:06 [ERROR] Re-run Maven using the -X switch to enable full debug logging.
15:59:06 [ERROR]
15:59:06 [ERROR] For more information about the errors and possible solutions, please read the following articles:
15:59:06 [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
I have tried several methods to make this work. But when I use maven deploy goal in my windows machine, it is deploying my artifacts to the same Nexus Repository without any failure. However from Jenkins, I am getting this error. In both environment the pom.xml and settings.xml that I use are same. I have tried with different maven versions as well in jenkins to solve this issue, but no help.
I have already tried mentioning wagonProvider in CLI as well as settings.xml and also I tried using extensions for wagonProviders in build and I even used extensions.xml and include this in descriptor in maven version 3.0.5 where WagonTransporterFactory is available, but none of them help me out. I also tried reinstalling and reconfiguring Jenkins, but that also doesn't help me.
If we can solve this issue, it will be great help. Thanks.
Oh....I got the issue resolved. Another example that teaches me a small error can result in bigger issue.
The issue occurred as I was passing my Nexus Repository URL as system variable in jenkins for maven deploy command as follows:
nexus_rel_repo="${NEXUS_REPO_URL}"
where NEXUS_REPO_URL was already a String Parameter that I assigned in Jenkins. And nexus_rel_repo is my system variable and you can see here that I was using double quotes when I was assigning my Nexus Repository URL which is already a String Parameter to nexus_rel_repo. The occurrence of these extra double quotes disturbed the connection.
Thanks for everyone who has looked into this issue and who has already done some research on it.
Related
I tried to build a maven project with JBoss Web Server 3.1 Apache Tomcat 8+MySQL(with https) in OpenShift.
However error occurs like this.
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
Aborting due to error code 1 from Maven build
error: build error: non-zero (13) exit code from registry.access.redhat.com/jboss-webserver-3/webserver31-tomcat8-openshift#sha256:29470583ce1511dbbe8e2552b7f0278d0d74595c42a00632cd23fda1ffab361e
The maven project built successfully in eclipse.
But OpenShift continuously has an error.
I entered the URL(http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException) in the error log. It says the error is related to plugin. But I can't figure out what kind of plugin and what it is.
How can I fix it?
I am trying to run multiple instances of the same maven project using netbeans. There is only 1 main class in the project.
This is the error I get:
Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.4.1:clean (default-clean) on project Client: Failed to clean project: Failed to delete C:\x\x\x\Client\target\Client-1.0-SNAPSHOT.jar -> [Help 1]
To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.
For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
I realise that I cannot run more than one instances because maven cannot clean/delete the jar file while it is already in use. However, I need to get this working; to implement and test multi-threading and synchronisation.
Anyone know a solution or a workaround?
Thanks.
Why would you like to run the build in parallel for the same project? Just build once mvn clean package and start your resulting jar several times via java -jar ...target/Client-1.0-SNAPSHTO.jar from different console windows.
Maven throws time out when try to clean the project
USER>mvn clean
After this command the build throw:
[ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dep
endencies could not be resolved: Failed to read artifact descriptor for org.apac
he.maven.plugins:maven-clean-plugin:jar:2.5: Could not transfer artifact org.apa
che.maven.plugins:maven-clean-plugin:pom:2.5 from/to central (https://repo.maven
.apache.org/maven2): Connect to repo.maven.apache.org:443 [repo.maven.apache.org
/23.235.46.215] failed: Connection timed out: connect -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResoluti
onException
Do you have any other repositories configured in your ${HOME}/.m2/settings.xml (or pom.xml)? If so, make sure that none of them have the id of central or you may have reconfigured the location of maven-central.
Also, if you use a locally hosted "proxy" maven repository, do not reconfigure central to point to the locally hosted maven repository, instead use a "mirror" directive, configuring the repository to be something with an id like "localrepo" and specifying it as a "mirrorOf" central.
Finally, avoid any "proxy" settings unless you want all of your searches to start searching for repositories outside of your network (aka on the internet).
Maven manages dependencies in a very specific manner, which provides repeat-ability of builds. Basically it needs to be encoded in the pom.xml. Yes, you can do some magic to pass such things through using the command line, but if you do that, you are working against the design of maven (and robbing yourself of most of it's utility at the same time).
If you need something to "update" a build, consider making a script that updates and checks in the pom.xml for the artifact, or (less ideal) base the dependency on a snapshot version.
Hi guys I have a Maven project working well since 9 months.
But today I get a error in Maven build
[ERROR] Failed to execute goal on project bon: Could not resolve dependencies for project com.mydev:bon:war:1.0.20.1: Failure to find com.mydev:utils:jar:1.0.0-BUILD-SNAPSHOT in http://repo1.maven.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of maven2 has elapsed or updates are forced -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
The project is a Dynamic Web Project with maven
In pom I have a dependency to local jar
<dependency>
<groupId>com.mydev</groupId>
<artifactId>utils</artifactId>
<version>1.0.0-BUILD-SNAPSHOT</version>
</dependency>
The project com.mydev.utils has installed in my PC in .m2 folder, I check the folder D:\.m2\repository\com\mydev\utils\1.0.0-BUILD-SNAPSHOT\ and everything seems in order
_rzi_0.118
_rzi_0.227
_maven.repositories
utils-1.0.0-BUILD-SNAPSHOT.jar
utils-1.0.0-BUILD-SNAPSHOT.jar.lastUpdate
utils-1.0.0-BUILD-SNAPSHOT.pom
utils-1.0.0-BUILD-SNAPSHOT.pom.lastUpdate
m2e.lastUpdate.properties
maven-metadata-local.xml
resolver-status.properties
I do not think the problem is the pom, I have not changed anything
I tried to build another project with the same unit, and get the same error.
I install software yesterday (DB2 Express-C database server), not if maven may have lost some settings for it. wheninstall the software, do not restart
Today try to generate the war, but I get the error, I reboot the PC, but I have the same error
Edit:
One more thing you do not need to do copy and paste thing , you can just easily modify your maven setting.xml for maven repo and in eclipse point it to correct file. In above scree shot user setting path should be you maven installation dir like <your dir>\apache-maven-xxx\conf\settings.xml
settings.xml
<localRepository>D:\.m2</localRepository>
The samples and documentation in question can be found here: http://static.springsource.org/spring-flex/docs/1.5.0.M1/
The reference doc ( here ) tells us to download the sample application:
Included in the project distribution
is a collection of samples called the
Spring BlazeDS Integration Test Drive.
This samples project is set up to be
built with Maven and then imported
into Eclipse for running the
application via WTP.
The samples in question, must either be spring-flex-testdrive-spring3.zip which is linked to in the document or spring-flex-testdrive-spring3.zip based on the notion that this is release 1.5.0.M1 (docs and samples).
After I configure maven as described with the proper environment variable:
MAVEN_OPTS="-Xms256m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=256m"
I then execute (per instruction) the command to install: mvn clean install from the extracted samples directory (in my case C:\spring-flex-testdrive ), I receive the following error:
C:\spring-flex-testdrive>mvn clean install
[INFO] Scanning for projects...
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project org.springframework.flex.samples:spring-flex-testdrive:1.5.0.M1 (C:\spring-flex-testdrive\pom.xml) has 1 error
[ERROR] Non-resolvable parent POM: Failure to find org.springframework.flex:spring-flex-parent:pom:1.5.0.M1 in http://maven.springframework.org/external was cached in the local repository, resolution will not be
reattempted until the update interval of spring-external has elapsed or updates are forced and 'parent.relativePath' points at wrong local POM # line 5, column 10 -> [Help 2]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
C:\spring-flex-testdrive>
I have managed to get a "Spring BlazeDS" application working (with Flex), but now I'm at the point where I need to implement security, and if the samples would compile and run correctly, it'd be a huge help. I am new to Maven, but any help would be greatly appreciated!
Thanks in advance StackOverflow community!
Brian, please add the following snippet to the pom.xml in the root of the samples (from where you execute mvn clean install) and re-run Maven:
<repository>
<id>spring-milestone</id>
<name>Spring Milestone Repository</name>
<url>http://maven.springframework.org.s3.amazonaws.com/milestone</url>
</repository>
Hope that helps.
Christian
I get the same error. Spring Flex 1.5M2 will be out very soon. So maybe give it another try with that.
I would recommend that if go with Parsley for Actionscript/Flex framework. It is more mature in may ways than Spring-Actionscript. Moreover it is a required library for much of Cairngorm 3. Good luck.