Maven POMs
  1. Maven POMs
  2. MPOM-34

I cannot compile mixing modules and dependencies

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Invalid
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: maven
    • Labels:
      None
    • Environment:

      maven 3.0.3

      Description

      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

      1. exampletest.zip
        4 kB
        Luca Stancapiano

        Activity

        Luca Stancapiano created issue -
        Luca Stancapiano made changes -
        Field Original Value New Value
        Attachment exampletest.zip [ 12505986 ]
        Brett Porter made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Invalid [ 6 ]
        Mark Thomas made changes -
        Workflow classic default workflow [ 12644449 ] Default workflow, editable Closed status [ 12997748 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Luca Stancapiano
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development