私はいくつかのモジュールを含むmavenプロジェクトを持っています。 Eclipse(Juno、m2e)ではコンパイルがうまくいくようです。しかし、モジュールの1つにmavenをインストールすると、ビルドはただちに失敗します。'dependencies.dependency.version'にはエラーがありませんが、バージョンは親で管理されています
親ポンポン:
<groupId>com.sw.system4</groupId>
<artifactId>system4-parent</artifactId>
<version>${system4.version}</version>
<packaging>pom</packaging>
<name>System 4 Parent Project</name>
<modules>
<module>system4-data</module>
...others...
</modules>
<properties>
<system4.version>0.0.1-SNAPSHOT</system4.version>
<spring.version>3.2.3.RELEASE</spring.version>
... others...
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
<scope>runtime</scope>
</dependency>
... lots of others ...
</dependencies>
</dependencyManagement>
児童ポンポン:
<parent>
<groupId>com.sw.system4</groupId>
<artifactId>system4-parent</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>system4-data</artifactId>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<scope>runtime</scope>
</dependency>
... lots of others...
</dependencies>
私はビルドすると、私は次のような出力が得られます。
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project com.sw.system4:system4-data:0.0.1-SNAPSHOT (C:\work\eclips
e_workspaces\systemiv\system4-parent\system4-data\pom.xml) has 8 errors
[ERROR] 'dependencies.dependency.version' for org.springframework:spring-cor
e:jar is missing. @ line 16, column 16
... others omitted for clarity ...
私はそれもしない理由を理解しませんコンパイルを試みる。 Iveは親と子からランタイムスコープを削除しようとしましたが、違いはありません。助けてください!
[dependenciesが既にその親のpomファイルの依存関係管理セクションで宣言されていても[dependencies.dependency.versionが存在しません]の重複があります(http://stackoverflow.com/questions/12900525/dependencies-dependency-version-is) -missing-even-though-dependency-is-already) – JohnEye