0

我正在尝试强制 Derby 的 Maven 构建来咳出一些 javadoc jar,以便我可以将它们包含在我们的存储库中。

我试图运行看起来正确的目标:

mvn javadoc:jar

但我得到的只是一个错误:

[INFO] ------------------------------------------------------------------------
[INFO] Building Apache Derby Network Server 10.12.1.1.mod.1
[INFO] ------------------------------------------------------------------------
[DEBUG] Resolving plugin prefix javadoc from [org.apache.maven.plugins, org.codehaus.mojo]
[DEBUG] Resolved plugin prefix javadoc to org.apache.maven.plugins:maven-javadoc-plugin from POM org.apache.derby:derbynet:jar:10.12.1.1.mod.1
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[DEBUG] === PROJECT BUILD PLAN ================================================
[DEBUG] Project:       org.apache.derby:derbynet:10.12.1.1.mod.1
[DEBUG] Dependencies (collect): []
[DEBUG] Dependencies (resolve): [compile]
[DEBUG] Repositories (dependencies): [apache.snapshots (http://repository.apache.org/snapshots, default, snapshots), central (https://repo.maven.apache.org/maven2, default, releases)]
[DEBUG] Repositories (plugins)     : [central (https://repo.maven.apache.org/maven2, default, releases)]
[DEBUG] -----------------------------------------------------------------------
[DEBUG] Goal:          org.apache.maven.plugins:maven-javadoc-plugin:2.8:jar (default-cli)
[DEBUG] Style:         Regular
[DEBUG] Configuration: <?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <additionalJOption>${additionalJOption}</additionalJOption>
  <additionalparam>${additionalparam}</additionalparam>
  <aggregate default-value="false">${aggregate}</aggregate>
  <attach default-value="true">${attach}</attach>
  <author default-value="true">${author}</author>
  <bootclasspath>${bootclasspath}</bootclasspath>
  <bootclasspathArtifacts>${bootclasspathArtifacts}</bootclasspathArtifacts>
  <bottom default-value="Copyright &amp;#169; {inceptionYear}-{currentYear} {organizationName}. All Rights Reserved.">${bottom}</bottom>
  <breakiterator default-value="false">${breakiterator}</breakiterator>
  <charset>${charset}</charset>
  <debug default-value="false">${debug}</debug>
  <defaultManifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</defaultManifestFile>
  <destDir>${destDir}</destDir>
  <detectJavaApiLink default-value="true">${detectJavaApiLink}</detectJavaApiLink>
  <detectLinks default-value="false">${detectLinks}</detectLinks>
  <detectOfflineLinks default-value="true">${detectOfflineLinks}</detectOfflineLinks>
  <docencoding default-value="${project.reporting.outputEncoding}">${docencoding}</docencoding>
  <docfilessubdirs default-value="false">${docfilessubdirs}</docfilessubdirs>
  <doclet>${doclet}</doclet>
  <docletArtifact>${docletArtifact}</docletArtifact>
  <docletArtifacts>${docletArtifacts}</docletArtifacts>
  <docletPath>${docletPath}</docletPath>
  <doctitle default-value="${project.name} ${project.version} API">${doctitle}</doctitle>
  <encoding default-value="${project.build.sourceEncoding}">${encoding}</encoding>
  <excludePackageNames>${excludePackageNames}</excludePackageNames>
  <excludedocfilessubdir>${excludedocfilessubdir}</excludedocfilessubdir>
  <extdirs>${extdirs}</extdirs>
  <failOnError default-value="true">${maven.javadoc.failOnError}</failOnError>
  <finalName>${project.build.finalName}</finalName>
  <footer>${footer}</footer>
  <groups>${groups}</groups>
  <header>${header}</header>
  <helpfile>${helpfile}</helpfile>
  <includeDependencySources default-value="false"/>
  <includeTransitiveDependencySources default-value="false"/>
  <isOffline default-value="${settings.offline}"/>
  <jarOutputDirectory>${project.build.directory}</jarOutputDirectory>
  <javaApiLinks>${javaApiLinks}</javaApiLinks>
  <javadocDirectory>${basedir}/src/main/javadoc</javadocDirectory>
  <javadocExecutable>${javadocExecutable}</javadocExecutable>
  <javadocOptionsDir default-value="${project.build.directory}/javadoc-bundle-options"/>
  <javadocVersion>${javadocVersion}</javadocVersion>
  <keywords default-value="false">${keywords}</keywords>
  <links>${links}</links>
  <linksource default-value="false">${linksource}</linksource>
  <localRepository>${localRepository}</localRepository>
  <locale>${locale}</locale>
  <maxmemory>${maxmemory}</maxmemory>
  <minmemory>${minmemory}</minmemory>
  <nocomment default-value="false">${nocomment}</nocomment>
  <nodeprecated default-value="false">${nodeprecated}</nodeprecated>
  <nodeprecatedlist default-value="false">${nodeprecatedlist}</nodeprecatedlist>
  <nohelp default-value="false">${nohelp}</nohelp>
  <noindex default-value="false">${noindex}</noindex>
  <nonavbar default-value="false">${nonavbar}</nonavbar>
  <nooverview default-value="false">${nooverview}</nooverview>
  <noqualifier>${noqualifier}</noqualifier>
  <nosince default-value="false">${nosince}</nosince>
  <notimestamp default-value="false">${notimestamp}</notimestamp>
  <notree default-value="false">${notree}</notree>
  <offlineLinks>${offlineLinks}</offlineLinks>
  <old default-value="false">${old}</old>
  <outputDirectory default-value="${project.build.directory}/apidocs">${destDir}</outputDirectory>
  <overview default-value="${basedir}/src/main/javadoc/overview.html">${overview}</overview>
  <packagesheader>${packagesheader}</packagesheader>
  <project>${project}</project>
  <proxyHost>${proxyHost}</proxyHost>
  <proxyPort>${proxyPort}</proxyPort>
  <quiet default-value="false">${quiet}</quiet>
  <reactorProjects>${reactorProjects}</reactorProjects>
  <remoteRepositories>${project.remoteArtifactRepositories}</remoteRepositories>
  <resourcesArtifacts>${resourcesArtifacts}</resourcesArtifacts>
  <serialwarn default-value="false">${serialwarn}</serialwarn>
  <session>${session}</session>
  <settings default-value="${settings}"/>
  <show default-value="protected">${show}</show>
  <skip default-value="false">${maven.javadoc.skip}</skip>
  <source>${source}</source>
  <sourceDependencyCacheDir default-value="${project.build.directory}/distro-javadoc-sources"/>
  <sourcepath>${sourcepath}</sourcepath>
  <sourcetab>${sourcetab}</sourcetab>
  <splitindex default-value="false">${splitindex}</splitindex>
  <stylesheet default-value="java">${stylesheet}</stylesheet>
  <stylesheetfile>${stylesheetfile}</stylesheetfile>
  <subpackages>${subpackages}</subpackages>
  <taglet>${taglet}</taglet>
  <tagletArtifact>${tagletArtifact}</tagletArtifact>
  <tagletArtifacts>${tagletArtifacts}</tagletArtifacts>
  <tagletpath>${tagletpath}</tagletpath>
  <taglets>${taglets}</taglets>
  <tags>${tags}</tags>
  <top>${top}</top>
  <use default-value="true">${use}</use>
  <useDefaultManifestFile default-value="false"/>
  <useStandardDocletOptions default-value="true">${useStandardDocletOptions}</useStandardDocletOptions>
  <validateLinks default-value="false">${validateLinks}</validateLinks>
  <verbose default-value="false">${verbose}</verbose>
  <version default-value="true">${version}</version>
  <windowtitle default-value="${project.name} ${project.version} API">${windowtitle}</windowtitle>
</configuration>
[DEBUG] =======================================================================
[DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=0, ConflictMarker.markTime=0, ConflictMarker.nodeCount=2, ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, ConflictIdSorter.conflictIdCount=1, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=0, ConflictResolver.conflictItemCount=1, DefaultDependencyCollector.collectTime=1, DefaultDependencyCollector.transformTime=0}
[DEBUG] org.apache.derby:derbynet:jar:10.12.1.1.mod.1
[DEBUG]    org.apache.derby:derby:jar:10.12.1.1.mod.1:compile
[DEBUG] Using transporter WagonTransporter with priority -1.0 for https://repo.maven.apache.org/maven2
[DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for https://repo.maven.apache.org/maven2
Downloading: https://repo.maven.apache.org/maven2/org/apache/derby/derby/10.12.1.1.mod.1/derby-10.12.1.1.mod.1.jar
[DEBUG] Writing tracking file /Users/tester/.m2/repository/org/apache/derby/derby/10.12.1.1.mod.1/derby-10.12.1.1.mod.1.jar.lastUpdated
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] Apache Derby Project ............................... SUCCESS [ 57.391 s]
[INFO] Apache Derby Database Engine and Embedded JDBC Driver SUCCESS [  2.615 s]
[INFO] Apache Derby Network Server ........................ FAILURE [  0.264 s]
[INFO] Apache Derby Client JDBC Driver .................... SKIPPED
[INFO] Apache Derby Tools ................................. SKIPPED
[INFO] Apache Derby Optional Tools ........................ SKIPPED
[INFO] Apache Derby Network Server admin demonstration servlet SKIPPED
[INFO] Apache Derby messages: Czech ....................... SKIPPED
[INFO] Apache Derby messages: German ...................... SKIPPED
[INFO] Apache Derby messages: Spanish ..................... SKIPPED
[INFO] Apache Derby messages: French ...................... SKIPPED
[INFO] Apache Derby messages: Hungarian ................... SKIPPED
[INFO] Apache Derby messages: Italian ..................... SKIPPED
[INFO] Apache Derby messages: Japanese .................... SKIPPED
[INFO] Apache Derby messages: Korean ...................... SKIPPED
[INFO] Apache Derby messages: Polish ...................... SKIPPED
[INFO] Apache Derby messages: Portuguese (Brazilian) ...... SKIPPED
[INFO] Apache Derby messages: Russian ..................... SKIPPED
[INFO] Apache Derby messages: Chinese (Simplified) ........ SKIPPED
[INFO] Apache Derby messages: Chinese (Traditional) ....... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:21 min
[INFO] Finished at: 2015-12-29T16:37:25+11:00
[INFO] Final Memory: 16M/159M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project derbynet: Could not resolve dependencies for project org.apache.derby:derbynet:jar:10.12.1.1.mod.1: Could not find artifact org.apache.derby:derby:jar:10.12.1.1.mod.1 in central (    https://repo.maven.apache.org/maven2) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project derbynet: Could not resolve dependencies for project org.apache.derby:derbynet:jar:10.12.1.1.mod.1: Could not find artifact org.apache.    derby:derby:jar:10.12.1.1.mod.1 in central (https://repo.maven.apache.org/maven2)
    at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:221)
    at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies(LifecycleDependencyResolver.java:127)
    at org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved(MojoExecutor.java:257)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:200)
    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:862)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
    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:497)
    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.project.DependencyResolutionException: Could not resolve dependencies for project org.apache.derby:derbynet:jar:10.12.1.1.mod.1: Could not find artifact org.apache.derby:derby:jar:10.12.1.1.mod.1     in central (https://repo.maven.apache.org/maven2)
    at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:211)
    at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:195)
    ... 23 more
Caused by: org.eclipse.aether.resolution.DependencyResolutionException: Could not find artifact org.apache.derby:derby:jar:10.12.1.1.mod.1 in central (https://repo.maven.apache.org/maven2)
    at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:384)
    at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:205)
    ... 24 more
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not find artifact org.apache.derby:derby:jar:10.12.1.1.mod.1 in central (https://repo.maven.apache.org/maven2)
    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)
    ... 25 more
Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact org.apache.derby:derby:jar:10.12.1.1.mod.1 in central (https://repo.maven.apache.org/maven2)
    at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:39)
    at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:355)
    at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)
    at org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute(BasicRepositoryConnector.java:581)
    at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:249)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:520)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:421)
    ... 27 more

好的,所以构建derbynet依赖于derby,这很好,但我不明白为什么它必须使用存储库中的 jar。如果我mvn package改为运行,即使编译和构建 Javadoc 具有相同的依赖项要求,它仍然有效。

那么为什么不起作用javadoc:jar呢?

4

0 回答 0