Dear all

I have a parent project 'proj' which contains two sub projects: 'core' and 'tools'.

core depends on tools. tools is built first. core and tools have a child relationship to the parent 'proj'.

When running 'mvn package' in the parent project, everything builds fine. no problem.

But when running 'mvn package' in the sub-project 'core', maven tries to find the tools libraries on the web and refuses to build because it cannot find the tools-1.0-SNAPSHOT library:

Missing:
----------
1) my.project:tools:jar:1.0-SNAPSHOT

 Try downloading the file manually from the project website.

 Then, install it using the command:
mvn install:install-file -DgroupId=my.project -DartifactId=tools -Dversion=1.0-SNAPSHOT -Dpackaging=jar -Dfile=/p
ath/to/file

Alternatively, if you host your own repository you can deploy the file there: mvn deploy:deploy-file -DgroupId=my.project -DartifactId=tools -Dversion=1.0-SNAPSHOT -Dpackaging=jar -Dfile=/pat
h/to/file -Durl=[url] -DrepositoryId=[id]

 Path to dependency:
       1) my.project:core:jar:1.0-SNAPSHOT
       2) my.project:tools:jar:1.0-SNAPSHOT


Could anyone guess what I did wrong with my dependency definitions?

Many thanks!

Markus

The parent POM:
====================================

<?xml version="1.0" encoding="UTF-8"?>
<project>
 <modelVersion>4.0.0</modelVersion>
 <groupId>my.project</groupId>
 <artifactId>proj</artifactId>
 <packaging>pom</packaging>
 <version>1.0-SNAPSHOT</version>
 <name>proj</name>
 <url>http://maven.apache.org</url>


 <modules>
   <module>tools</module>
   <module>core</module>
 </modules>

 <dependencyManagement>
   <dependencies>
     <dependency>
       <groupId>my.project</groupId>
       <artifactId>core</artifactId>
       <version>1.0-SNAPSHOT</version>
       <scope>compile</scope>
     </dependency>
     <dependency>
       <groupId>my.project</groupId>
       <artifactId>tools</artifactId>
       <version>1.0-SNAPSHOT</version>
       <scope>compile</scope>
     </dependency>
 </dependencyManagement>

 <dependencies>
   ... some library dependencies ...
 </dependencies>

 <build>
   <plugins>
     <plugin>
       <groupId>org.apache.maven.plugins</groupId>
       <artifactId>maven-compiler-plugin</artifactId>
       <configuration>
         <source>1.5</source>
         <target>1.5</target>
       </configuration>
     </plugin>
   </plugins>
 </build>

</project>


The 'core' POM:
====================================

<?xml version="1.0" encoding="UTF-8"?>
<project >
 <modelVersion>4.0.0</modelVersion>

 <parent>
   <groupId>my.project</groupId>
   <artifactId>proj</artifactId>
   <version>1.0-SNAPSHOT</version>
 </parent>

 <artifactId>core</artifactId>
 <name>core</name>
 <packaging>jar</packaging>
 <version>1.0-SNAPSHOT</version>

 <dependencies>
   <dependency>
     <groupId>my.project</groupId>
     <artifactId>tools</artifactId>
   </dependency>
 </dependencies>

</project>





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

Reply via email to