It is unnecessary to specify it in the child if you place it in the parent - it will be inherited.

If you are just looking to manage the dependency version wherever used, you should wrap the parent element in <dependencyManagement>.

Cheers,
Brett

On 13/10/2008, at 5:53 PM, 陈思淼 wrote:

In my parent Project the pom is:
<groupId>com.mycompany.trademanager</groupId>
 <artifactId>all</artifactId>
 <packaging>pom</packaging>
 <version>1.0-SNAPSHOT</version>
 <modules>
  <module>common</module>

 </modules>
 <dependencies>
 <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.3.1</version>
<scope>test</scope>
</dependency>
</dependencies>
In my child project the pom is:
 <parent>
  <groupId>com. mycompany.trademanager</groupId>
<artifactId>all</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>

 <groupId>com.mycompany.trademanager</groupId>
 <artifactId>common</artifactId>
 <packaging>jar</packaging>
 <version>1.0-SNAPSHOT</version>
 <build>
 </build>
 <dependencies>
 <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.3.1</version>
</dependency>
<dependency>
</dependencies>
I must specify theversion explicitly,If not ,the Error occur:[0]
'dependencies.dependency.version' is missing for junit:junit


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to