how to fix OpenShift maven project build error - java

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?

Related

Can't use JFoenix on JavaFX maven using Apache NetBeans

I install the dependency, I build it, clean build it and build with dependencies yet I got this error, and I don't know what cause the error. I am new to javaFX maven and I want to expand my knowledge in it.
Version of jfeonix: 9.0.10
Error:
BUILD FAILURE
------------------------------------------------------------------------
Total time: 2.940 s
Finished at: 2020-12-28T13:21:15-08:00
------------------------------------------------------------------------
Failed to execute goal org.openjfx:javafx-maven-plugin:0.0.4:run (default-cli) on project OnCo: Error: Command execution failed. Process exited with an error: 1 (Exit value: 1) -> [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

Not able to deploy artifacts to Nexus repository from Jenkins

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.

Running multiple 'instances' of maven project - Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.4.1:clean

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 "Non-resolvable parent POM" when pom is already in Maven Central

I have an open source project (https://github.com/mikera/vectorz) that uses a parent pom that is deployed on Maven Central (http://search.maven.org/#artifactdetails%7Cnet.mikera%7Cmikera-pom%7C0.2.0%7Cpom)
However I have started to get a strange error:
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project net.mikera:vectorz:0.39.1-SNAPSHOT (C:\Users\Mike\git\vect
orz\pom.xml) has 1 error
[ERROR] Non-resolvable parent POM: Could not find artifact net.mikera:mikera
-pom:pom:0.2.0 in clojars.org (http://clojars.org/repo) and 'parent.relativePath
' points at wrong local POM # line 9, column 10 -> [Help 2]
[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/ProjectBuildin
gException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableMo
delException
What could be causing this? Note that:
I'm 99% certain the parent pom has been successfully released on Central
clojars repo shouldn't even be required for the build
I'm running on Windows (though the issue seems to be affecting others on Linux too)
I have had projects like this working previously, however I recently upgraded to Maven 3.2.2 - could that be causing this error?
P.S. I tried checking my local .m2 repository and all it contains is a .lastUpdated file with the folloing content:
#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice.
#Mon Aug 11 13:23:30 SGT 2014
http\://repo.maven.apache.org/maven2/.lastUpdated=1407734610196
http\://clojars.org/repo/.lastUpdated=1407734609627
http\://clojars.org/repo/.error=
http\://repo.maven.apache.org/maven2/.error=
Any ideas how to resolve this?

'mvn install' does not work & shows error while attempting to download

I am using maven 3.0.2 version.
mvn --version works fine on command line but when I try
mvn install it does not work & shows following error.
Z:\dev\hector rantav>mvn install
[INFO] Scanning for projects...
Downloading: http://repo1.maven.org/maven2/junit/junit/3.8.2/junit-3.8.2.jar
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project me.prettyprint:hector:0.7.0-24-SNAPSHOT (Z:\dev\hector ran
tav\pom.xml) has 1 error
[ERROR] Unresolveable build extension: Plugin org.apache.maven.scm:maven-scm
-manager-plexus:1.3 or one of its dependencies could not be resolved: Could not
transfer artifact junit:junit:jar:3.8.2 from/to central (http://repo1.maven.org/
maven2): Error transferring file: repo1.maven.org: Unknown host repo1.maven.org
-> [Help 2]
[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/ProjectBuildin
gException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/PluginResoluti
onException
Please let me how I can fix this.
Proxy usage is a factor, hope this will help: Maven Guide to Using Proxies
If your proxy requires NTLM authentication, you'll also probably need cntlm
The http://repo1.maven.org/maven2/ repository is down quite often, so maybe you were just out of luck that time.

Categories