Environment:
Jboss 7.2
Java 11
Maven 3.6.3
I've a maven project and working behind a proxy, so I configured in settings.xml and I proved with a profile with some repositories and without any profile.
Repositories I've tried but something must be wrong
https://repo.maven.apache.org/maven2
https://repo1.maven.org/maven2
settings.xml
<proxy>
<id>myproxy</id>
<active>true</active>
<protocol>http</protocol>
<username>username</username>
<password>{iAf/vSQegd4HPDkp1yBqXZvGPGZgikDH+j6IqwOdu5I=}</password>
<host>rproxy.domain.com</host>
<port>3128</port>
<nonProxyHosts>localhost</nonProxyHosts>
</proxy>
Error log
[ERROR] Failed to execute goal on project doit: Could not resolve dependencies for project com.project:doit:war:1.0-SNAPSHOT: Failure to find com.sun.xml.ws:jaxws-ri:jar:2.3.3 in https://repo.maven.apache.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]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project doit: Could not resolve dependencies for project com.projects:1.0-SNAPSHOT: Failure to find com.sun.xml.ws:jaxws-ri:jar:2.3.3 in https://repo.maven.apache.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
...
Caused by: org.apache.maven.project.DependencyResolutionException: Could not resolve dependencies for project com.project:1.0-SNAPSHOT: Failure to find com.sun.xml.ws:jaxws-ri:jar:2.3.3 in https://repo.maven.apache.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
...
Caused by: org.eclipse.aether.resolution.DependencyResolutionException: Failure to find com.sun.xml.ws:jaxws-ri:jar:2.3.3 in https://repo.maven.apache.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
...
I am getting the error while creating the maven project .
Multiple annotations found at this line:
- CoreException: Could not get the value for parameter compilerId for plugin execution default-compile: PluginResolutionException: Plugin
org.apache.maven.plugins:maven-compiler-plugin:3.1 or one of its dependencies could not be resolved: Failure to transfer junit:junit:jar:3.8.2 from
https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has
elapsed or updates are forced. Original error: Could not transfer artifact junit:junit:jar:3.8.2 from/to central (https://repo.maven.apache.org/maven2):
repo.maven.apache.org
- CoreException: Could not get the value for parameter compilerId for plugin execution default-testCompile: PluginResolutionException:
Plugin org.apache.maven.plugins:maven-compiler-plugin:3.1 or one of its dependencies could not be resolved: Failure to transfer junit:junit:jar:3.8.2
from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central
has elapsed or updates are forced. Original error: Could not transfer artifact junit:junit:jar:3.8.2 from/to central (https://repo.maven.apache.org/maven2):
repo.maven.apache.org
Above error message shown in pom.xml first line -
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
GETTING THIS ERROR:
Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart:1.1 from any of the configured repositories.
Could not resolve artifact org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.1
Failure to transfer org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.1 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.1 from/to central (https://repo.maven.apache.org/maven2): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Failure to transfer org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.1 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed
I wanted to run mvn javadoc:aggregate -Dadditionalparam=-Xdoclint:none on a multimodule project where mvn javadoc:javadoc -Dadditionalparam=-Xdoclint:none works just fine.
But it returnes
An error has occurred in Javadoc report generation: org.eclipse.aether.resolution.DependencyResolutionException: The following artifacts could not be resolved:
Those dependencies are declared in a submodule that also declares the specific repositories. The dependencies are already cached in the local .m2.
How can I get aggregate to find them?
Here is the full stacktrace:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.0.0-M1:aggregate (default-cli) on project bigspatialdata-parent: An error has occurred in Javadoc report generation: org.eclipse.aether.resolution.DependencyResolutionException: The following artifacts could not be resolved: org.geotools:gt-main:jar:17.2, org.geotools:gt-api:jar:17.2, org.geotools:gt-referencing:jar:17.2, org.geotools:gt-metadata:jar:17.2, org.geotools:gt-opengis:jar:17.2: Failure to find org.geotools:gt-main:jar:17.2 in repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.0.0-M1:aggregate (default-cli) on project bigspatialdata-parent: An error has occurred in Javadoc report generation: org.eclipse.aether.resolution.DependencyResolutionException: The following artifacts could not be resolved: org.geotools:gt-main:jar:17.2, org.geotools:gt-api:jar:17.2, org.geotools:gt-referencing:jar:17.2, org.geotools:gt-metadata:jar:17.2, org.geotools:gt-opengis:jar:17.2: Failure to find org.geotools:gt-main:jar:17.2 in repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: An error has occurred in Javadoc report generation: org.eclipse.aether.resolution.DependencyResolutionException: The following artifacts could not be resolved: org.geotools:gt-main:jar:17.2, org.geotools:gt-api:jar:17.2, org.geotools:gt-referencing:jar:17.2, org.geotools:gt-metadata:jar:17.2, org.geotools:gt-opengis:jar:17.2: Failure to find org.geotools:gt-main:jar:17.2 in repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced
at org.apache.maven.plugins.javadoc.AbstractJavadocMojo.failOnError(AbstractJavadocMojo.java:5954)
at org.apache.maven.plugins.javadoc.JavadocReport.doExecute(JavadocReport.java:322)
at org.apache.maven.plugins.javadoc.AbstractJavadocMojo.execute(AbstractJavadocMojo.java:1889)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
... 20 more
Caused by: org.apache.maven.reporting.MavenReportException: org.eclipse.aether.resolution.DependencyResolutionException: The following artifacts could not be resolved: org.geotools:gt-main:jar:17.2, org.geotools:gt-api:jar:17.2, org.geotools:gt-referencing:jar:17.2, org.geotools:gt-metadata:jar:17.2, org.geotools:gt-opengis:jar:17.2: Failure to find org.geotools:gt-main:jar:17.2 in repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced
at org.apache.maven.plugins.javadoc.AbstractJavadocMojo.getClasspath(AbstractJavadocMojo.java:2598)
at org.apache.maven.plugins.javadoc.AbstractJavadocMojo.addJavadocOptions(AbstractJavadocMojo.java:4582)
at org.apache.maven.plugins.javadoc.AbstractJavadocMojo.executeReport(AbstractJavadocMojo.java:2028)
at org.apache.maven.plugins.javadoc.JavadocReport.generate(JavadocReport.java:130)
at org.apache.maven.plugins.javadoc.JavadocReport.doExecute(JavadocReport.java:318)
... 23 more
Caused by: org.apache.maven.shared.dependencies.resolve.internal.Maven31DependencyResolverException: org.eclipse.aether.resolution.DependencyResolutionException: The following artifacts could not be resolved: org.geotools:gt-main:jar:17.2, org.geotools:gt-api:jar:17.2, org.geotools:gt-referencing:jar:17.2, org.geotools:gt-metadata:jar:17.2, org.geotools:gt-opengis:jar:17.2: Failure to find org.geotools:gt-main:jar:17.2 in repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced
at org.apache.maven.shared.dependencies.resolve.internal.Maven31DependencyResolver.resolveDependencies(Maven31DependencyResolver.java:251)
at org.apache.maven.shared.dependencies.resolve.internal.Maven31DependencyResolver.resolveDependencies(Maven31DependencyResolver.java:203)
at org.apache.maven.shared.dependencies.resolve.internal.DefaultDependencyResolver.resolveDependencies(DefaultDependencyResolver.java:62)
at org.apache.maven.plugins.javadoc.AbstractJavadocMojo.getClasspath(AbstractJavadocMojo.java:2579)
... 27 more
Caused by: org.eclipse.aether.resolution.DependencyResolutionException: The following artifacts could not be resolved: org.geotools:gt-main:jar:17.2, org.geotools:gt-api:jar:17.2, org.geotools:gt-referencing:jar:17.2, org.geotools:gt-metadata:jar:17.2, org.geotools:gt-opengis:jar:17.2: Failure to find org.geotools:gt-main:jar:17.2 in repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:384)
at org.apache.maven.shared.dependencies.resolve.internal.Maven31DependencyResolver.resolveDependencies(Maven31DependencyResolver.java:227)
... 30 more
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: The following artifacts could not be resolved: org.geotools:gt-main:jar:17.2, org.geotools:gt-api:jar:17.2, org.geotools:gt-referencing:jar:17.2, org.geotools:gt-metadata:jar:17.2, org.geotools:gt-opengis:jar:17.2: Failure to find org.geotools:gt-main:jar:17.2 in repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:367)
... 31 more
Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Failure to find org.geotools:gt-main:jar:17.2 in repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced
at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:231)
at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:206)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:585)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:503)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:421)
... 33 more
I'm running a job that instrumant Code Coverage on a jenkins machine Server
The job is running the command: emme:emma
and keep failing when it try to download dependencies from the maven repo:
you can see the following log:
INFO] ------------------------------------------------------------------------
[WARNING] Failure to transfer org.apache.maven.plugins/maven-metadata.xml from http://repo1.maven.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of External-Central has elapsed or updates are forced.
Original error: Could not transfer metadata org.apache.maven.plugins/maven-metadata.xml from/to External-Central (http://repo1.maven.org/maven2):
Connection to http://repo1.maven.org refused
[WARNING] Failure to transfer org.apache.maven.plugins/maven-metadata.xml from http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced.
Original error: Could not transfer metadata org.apache.maven.plugins/maven-metadata.xml from/to central (http://repo.maven.apache.org/maven2):
Connection to http://repo.maven.apache.org refused
[WARNING] Failure to transfer org.codehaus.mojo/maven-metadata.xml from http://repo1.maven.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of External-Central has elapsed or updates are forced.
Original error: Could not transfer metadata org.codehaus.mojo/maven-metadata.xml from/to External-Central (http://repo1.maven.org/maven2):
Connection to http://repo1.maven.org refused
[WARNING] Failure to transfer org.codehaus.mojo/maven-metadata.xml from http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced.
Original error: Could not transfer metadata org.codehaus.mojo/maven-metadata.xml from/to central (http://repo.maven.apache.org/maven2):
Connection to http://repo.maven.apache.org refused
[WARNING] Failure to transfer org.codehaus.mojo:emma-maven-plugin/maven-metadata.xml from http://repo1.maven.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of External-Central has elapsed or updates are forced.
Original error: Could not transfer metadata org.codehaus.mojo:emma-maven-plugin/maven-metadata.xml from/to External-Central (http://repo1.maven.org/maven2):
Connection to http://repo1.maven.org refused
[WARNING] Failure to transfer org.codehaus.mojo:emma-maven-plugin/maven-metadata.xml from http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced.
Original error: Could not transfer metadata org.codehaus.mojo:emma-maven-plugin/maven-metadata.xml from/to central (http://repo.maven.apache.org/maven2):
Connection to http://repo.maven.apache.org refused
Thanks in advance
Nir
Posting the comment as an answer to the close the loop here :
Please ensure that you are not behind a firewall that refuses connections to Maven Central