Maven not using mirror from settings.xml after jdk version change - java

I have a simple java application which prints Hello world. I have mentioned a proxy server in settings.xml which Maven should use while running(running fine in Jenkins).
Previously, I was using jdk7. Now, I changes it to jdk1.8.0_45 and reran the application again(in Jenkins). Now I can see in the log that maven is searching the default repository which is should not be.
Now the error is:
[INFO] Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-resources-plugin/2.6/maven-resources-plugin-2.6.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 22.093s
[INFO] Finished at: Tue Jul 07 15:56:36 CEST 2015
[INFO] Final Memory: 6M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6: Could not transfer artifact org.apache.maven.plugins:maven-resources-plugin:pom:2.6 from/to central (http://repo.maven.apache.org/maven2): Connection to http://repo.maven.apache.org refused: Connection timed out: connect -> [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/PluginResolutionException
Thanks in Advance!

Related

error with :maven-clean-plugin:2.5 or one of its dependencies could not be resolved

Trying to run a program with maven and keep getting this error any ideas on how to fix? ps- I'm a complete newbie with maven/tomcat/springframework etc
ebitnami#ubuntu:~$ cd OpenESPI-Common-java/
bitnami#ubuntu:~/OpenESPI-Common-java$ mvn -Dmaven.test.skip=true clean install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Common 1.3-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-
plugin/2.5/maven-clean-plugin-2.5.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.809s
[INFO] Finished at: Wed Jun 17 16:21:44 EDT 2020
[INFO] Final Memory: 6M/59M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not
be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-
plugin:jar:2.5: Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.5
from/to central (http://repo.maven.apache.org/maven2): Failed to transfer file:
http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-
plugin-2.5.pom. Return code is: 501 , ReasonPhrase:HTTPS Required. -> [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/PluginResolutionException

Getting error as "Could not find artifact com.oracle:ojdbc6:jar:6.0.0 in central" while triggering build from JENKINS

I am trying to do build and deployment from a JENKINS job for my Spring Maven Project but getting below error:
Downloading from central: https://repo.maven.apache.org/maven2/com/oracle/ojdbc6/6.0.0/ojdbc6-6.0.0.pom
[WARNING] The POM for com.oracle:ojdbc6:jar:6.0.0 is missing, no dependency information available
Downloading from central: https://repo.maven.apache.org/maven2/com/oracle/ojdbc6/6.0.0/ojdbc6-6.0.0.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11.942 s
[INFO] Finished at: 2018-09-16T23:17:15+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project SpringBootSmaple: Could not resolve dependencies for project com.springboot.practise:SpringBootSmaple:war:0.1: Could not find artifact com.oracle:ojdbc6:jar:6.0.0 in central (https://repo.maven.apache.org/maven2) -> [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
Build step 'Invoke top-level Maven targets' marked build as failure
Unable to deploy to IBM WebSphere Application Server, Build Result = FAILURE
Finished: FAILURE
I also installed ojdbc jar in maven by using below command:
mvn install:install-file -Dfile=C:\Documents\SharedJars\ojdbc6.jar -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=6.0.0 -Dpackaging=jar
But still getting the same error. Someone please guide.

Maven : Not able to download dependencies jta:1.0.1B

I'm receiving following error when I run mvn clean install.
Error says not able to resolve dependencies javax.transaction:jta:jar:1.0.1B
Please note that I'm not refering to javax.transaction:jta:jar:1.0.1B in my pom. May be this dependency is refered by some other dependency that I mentioned in my pom.
Please find the error below
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building sample-webapp Maven Webapp 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: https://repo.maven.apache.org/maven2/javax/transaction/jta/1.0.1B/jta-1.0.1B.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.810 s
[INFO] Finished at: 2016-12-05T08:43:47+05:30
[INFO] Final Memory: 12M/309M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project sample-webapp: Could not resolve dependencies for project com.ganesh:sample-webapp:war:1.0-SNAPSHOT: Could not find artifact ja
vax.transaction:jta:jar:1.0.1B in central (https://repo.maven.apache.org/maven2), try downloading from http://java.sun.com/products/jta -> [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
that's a legacy library that is not available from Maven Central.
It isn't available because there are still some old Sun-era Javax JARS that are not covered under open source licenses. If you need to access this JTA 1.0.1B library, you will need to replace that dependency using an exclusion.
note: and when I hit this url https://repo.maven.apache.org/maven2/javax/transaction/jta/1.0.1B/jta-1.0.1B.jar in the browser, it return to 404 Not Found then I dont know why you can dowload it.
for more info Why can't I download the javax.transaction:jta:1.0.1B JAR?

Error Transfer artifact : Connection Timeout

I'm trying to build a version of OpenTripPlanner on my system for the first time. There are a couple of dependencies errors, out of which I was able to resolve the first one by downloading the jar manually and adding it to the .m2/repository
However, I'm unable to get around the second dependency error. Following is the error log for the maven build
[INFO] opentripplanner-geocoder .......................... SUCCESS [ 1.976 s]
[INFO] opentripplanner-gui ............................... FAILURE [ 11.088 s]
[INFO] opentripplanner-webapp ............................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 53.144 s
[INFO] Finished at: 2015-02-18T15:33:08-05:00
[INFO] Final Memory: 25M/412M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project opentripplanner-gui: Could not resolve dependencies for project org.opentripplanner:opentripplanner-gui:jar:0.6.0-SNAPSHOT: Failed to collect dependencies at org.processing:core:jar:1.0.7: Failed to read artifact descriptor for org.processing:core:jar:1.0.7: Could not transfer artifact org.processing:core:pom:1.0.7 from/to axis (http://people.apache.org/repo/m1-ibiblio-rsync-repository/org.apache.axis2/): connect timed out -> [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
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :opentripplanner-gui
I know it has something to do with core-1.0.7.jar but am unable to get around it
Turns out that switching the repository from OpenGeo to Conveyal was all that was required. Discussion thread which helped me to solve it : https://groups.google.com/forum/#!topic/opentripplanner-users/pKPGut4iCyQ

How to run mvn verify in a maven-download disabled box?

I need to run mvn verify in a secured box where maven is not able to download anything. I am able to run the command on my local laptop, so I copied my local .m2 folder to the secured box. However, I got this error:
$ mvn verify -o
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building <Masked strings>
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.109s
[INFO] Finished at: Wed May 07 20:49:26 UTC 2014
[INFO] Final Memory: 10M/232M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.5: The repository system is offline but the artifact org.apache.maven.plugins:maven-plugins:pom:19 is not available in the local repository. -> [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/PluginResolutionException
So, looks like copying .m2 is not enough. So, what should I do to make sure maven can do the job without downloading anything?
Thank you very much.

Categories

Resources