我想在mvn javadoc:aggregate -Dadditionalparam=-Xdoclint:none
工作正常的多模块项目上运行mvn javadoc:javadoc -Dadditionalparam=-Xdoclint:none
。
但它回归
Javadoc报告生成中发生错误:org.eclipse.aether.resolution.DependencyResolutionException:无法解析以下工件:
这些依赖项在子模块中声明,子模块也声明了特定的存储库。依赖项已缓存在本地.m2中。
如何让aggregate
找到它们?
这是完整的堆栈跟踪:
[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