如何为Maven指定模块的顺序?

yeg*_*256 2 java maven-2

项目结构是:

/foo
  pom.xml
  /foo-war
    pom.xml
  /foo-ear
    pom.xml
Run Code Online (Sandbox Code Playgroud)

这是我的父母pom.xml:

.. foo-war
foo-ear ..

这是以下内容foo-ear/pom.xml:

.. $ {project.groupId} foo-war war $ {project.version} ..

编译失败并显示以下消息:

...
[INFO] Failed to resolve artifact.
Missing:
—————
1) com.foo:foo-war:war:1.0-SNAPSHOT
Try downloading the file manually from the project website.
...
Run Code Online (Sandbox Code Playgroud)

看起来foo-ear正在尝试解决尚未准备好的工件.我怎样才能指导maven foo-war事先合作?或者我错过了什么?

PS.当我从父代码中删除此代码时,一切都已修复pom.xml:

<build>
    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>${javadoc.version}</version>
        <executions>
            <execution>
                <phase>compile</phase>
                <goals>
                   <goal>aggregate</goal>
                </goals>
            </execution>
        </executions>
    </plugin>
</build>
Run Code Online (Sandbox Code Playgroud)

为什么?

Pas*_*ent 5

当我从父pom.xml(...)中删除此代码时,一切都已修复

该问题看起来类似于MJAVADOC-161,更常见的MJAVADOC-137.你可以使用maven-javadoc-plugin类似2.3 的错误版本(遗憾的是,你没有显示它)?如果是,请尝试使用2.4版或其他更新版本.如果您使用的是大于2.4的版本,请尝试使用版本2.4以查看是否在某些时候引入了回归.在这种情况下,请打开一个新问题.


我正在使用2.5版.当我试图反转回2.4我得到:'aggregate'在执行中指定,但在插件中找不到.看起来2.5是我唯一的选择吗?您认为我需要提交错误报告吗?

我没有注意到目标,javadoc:aggregate已经在2.5版本中引入,因此它确实不会在2.4中,并且上面提到的问题是无关紧要的.

但我再看了一眼,我看到了其他一些像MJAVADOC-275MJAVADOC-276.我不确定是否了解确切的状态(并且错误可能没有修复)但在开启问题之前,请务必尝试使用版本2.7和版本2.6(有些人提到2.6.1中引入的回归).