You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Luca Stancapiano (JIRA)" <ji...@codehaus.org> on 2011/12/05 10:54:40 UTC
[jira] Created: (MNG-5210) I cannot compile mixing modules and
dependencies
I cannot compile mixing modules and dependencies
------------------------------------------------
Key: MNG-5210
URL: https://jira.codehaus.org/browse/MNG-5210
Project: Maven 2 & 3
Issue Type: Bug
Components: Dependencies
Affects Versions: 3.0.3
Environment: maven 3.0.3
Reporter: Luca Stancapiano
Attachments: exampletest.zip
I have three two simple projects:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>prova</groupId>
<artifactId>Mioframework</artifactId>
<version>0.4.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>my-mioprogetto</artifactId>
<name>Mio progetto</name>
<dependencies>
<!-- Internal dependencies -->
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>my-mioprogetto2</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>prova</groupId>
<artifactId>Mioframework</artifactId>
<version>0.4.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>my-mioprogetto2</artifactId>
<name>Mio progetto 2</name>
</project>
and one parent project:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>prova</groupId>
<artifactId>Mioframework</artifactId>
<version>0.4.0-SNAPSHOT</version>
<name>Mioframework</name>
<packaging>pom</packaging>
<modules>
<module>mioprogetto</module>
<module>mioprogetto2</module>
</modules>
</project>
mioprogetto as mioprogetto2 as dependency. Mioframework has the two projects as modules.
If I compile mioframework I have no problems.
If I compile only mioprogetto2 I have no problems.
If I compile only mioprogetto I have problems because the dependency is not matched. Here the error:
[ERROR] Failed to execute goal on project my-mioprogetto: Could not resolve dependencies for project prova:my-mioprogetto:jar:0.4.0-SNAPSHOT: Could not find artifact prova:my-mioprogetto2:jar:0.4.0-SNAPSHOT in myrepo-xxxxxxx (http://repository.xxxxxxxxx) -> [Help 1]
I attach the complete example test
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira