Hej, kontrollera gärna att jag inte skickar nåt jag inte borde skicka.
Det är lätt att missa nåt.

mvh
Lars



On Wed, 2006-06-21 at 14:47 -0700, Max Cooper wrote:
> I would expect that running install on module A would fail if it really 
> had a dependency on the top-level POM, and the top-level POM was not 
> available in the local repo.
> 
> You can think of your project as having four modules, A B C and Top. The 
> dependencies you described are:
> A, B, C depend on Top
> B, C depend on A
> 
> Based on this dependency structure, you should have to install project 
> Top before any of the others will build individually.
> 
> However, based on your reports of the build behavior, it doesn't sound 
> like A depends on Top. Does the pom.xml file for A really have a 
> <parent> section that refers to Top?
> 
> -Max
> 
> Lars Gramark wrote:
> > Hello,
> > 
> > I get a "Failed to resolve artefact" message when I'm installing one of my
> > sub-projects.
> > Here is the background:
> > We have three projects A, B and C and there is a dependency from B => A and
> > from C => A. 
> > Project A do not have any dependencies to any other project but all three
> > projects are organized by a top-POM with the id product.
> > When I install project A onto a clean local repository (mvn install),
> > everything seems fine but when I install project B I get the error message
> > below indicating that it cannot find the top POM snapshot in the repository.
> > 
> > [INFO] Failed to resolve artifact.
> > 
> > GroupId: mygroupid
> > ArtifactId: product
> > Version: 1.4-SNAPSHOT
> > 
> > The error does not occur if I perform the installation from the top-POM but
> > this is not always the preferable way.
> > The current workaround for me is to do a "mvn install -N" from the top level
> > to skip recursing in the sub-project but this seems a bit akward way of
> > solving the problem.
> > Since all sub-project have parent references it seems to me that there is
> > enough information for Maven to compile and install project B or am I
> > missing something?
> > Why does project B require a top-POM in the local repository but not project
> > A?
> > 
> > I would really appreciate if someone could explain what going on.
> > 
> > Thanks in advance
> > Lars Gramark
> > --
> > View this message in context: 
> > http://www.nabble.com/Top-level-POM-behaviour-t1825699.html#a4980080
> > Sent from the Maven - Users forum at Nabble.com.
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
<?xml version="1.0" encoding="UTF-8"?>
<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://mave
n.apache.org/maven-v4_0_0.xsd">
  <parent>
    <artifactId>product</artifactId>
    <groupId>mygroup</groupId>
    <version>1.4-SNAPSHOT</version>
    <relativePath>../pom.xml</relativePath> 
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <groupId>mygroup</groupId>
  <artifactId>A</artifactId>
  <name>##############</name>
  <version>1.4-SNAPSHOT</version>
  <url>############</url>
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
    </dependency>

    <dependency>
      <artifactId>commons-codec</artifactId>
      <groupId>commons-codec</groupId>
    </dependency>

   <dependency>
      <artifactId>log4j</artifactId>
      <groupId>log4j</groupId>
   </dependency>

   <dependency>
      <artifactId>dom4j</artifactId>
      <groupId>dom4j</groupId>
    </dependency>
  </dependencies>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<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://mave
n.apache.org/maven-v4_0_0.xsd">
  <parent>
    <artifactId>product</artifactId>
    <groupId>mygroup</groupId>
    <version>1.4-SNAPSHOT</version>
    <relativePath>../pom.xml</relativePath> 
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <groupId>mygroup</groupId>
  <artifactId>B</artifactId>
  <name>##############</name>
  <version>1.4-SNAPSHOT</version>
  <url>##############</url>

  <dependencies>
    <dependency>
      <groupId>mygroup</groupId>
      <artifactId>A</artifactId>
      <version>1.4-SNAPSHOT</version>
    </dependency>

    <dependency>
      <artifactId>log4j</artifactId>
      <groupId>log4j</groupId>
    </dependency>
  </dependencies>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<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://mave
n.apache.org/maven-v4_0_0.xsd">
  <parent>
    <artifactId>product</artifactId>
    <groupId>mygroup</groupId>
    <version>1.4-SNAPSHOT</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <groupId>mygroup</groupId>
  <artifactId>C</artifactId>
  <name>#############</name>
  <version>1.4-SNAPSHOT</version>
  <url>################</url>

    <dependencies>  
      <dependency>
         <groupId>mygroup</groupId>
         <artifactId>A</artifactId>
         <version>${project.version}</version>
      </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
    </dependency>

   <dependency>
      <artifactId>log4j</artifactId>
      <groupId>log4j</groupId>
   </dependency>
    
   <dependency>
      <artifactId>dom4j</artifactId>
      <groupId>dom4j</groupId>
    </dependency>
  </dependencies>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<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/maven-v4_0_0.xsd";>
  <packaging>pom</packaging>
  <modelVersion>4.0.0</modelVersion>
  <groupId>mygroup</groupId>
  <artifactId>product</artifactId>
  <version>1.4-SNAPSHOT</version>
  <name>########</name>
  <url>##########</url>

  <modules>
    <module>B</module>
    <module>C</module>
    <module>A</module>
  </modules>

  <repositories>
    <repository>
      <id>###########</id>
      <name>###########</name>
      <url>###########</url> 
    </repository>
    <repository>
       <id>Maven Snapshots</id>
       <url>http://snapshots.maven.codehaus.org/maven2/</url>
       <snapshots>
          <enabled>true</enabled>
       </snapshots>
       <releases>
          <enabled>false</enabled>
       </releases>
    </repository> 
  </repositories>

  <distributionManagement>
    <repository>
      <uniqueVersion>false</uniqueVersion>
      <id>>###########</</id>
      <name>>###########</</name>
      <url>>###########</</url>
      <layout>default</layout>
    </repository>
  </distributionManagement>

  <dependencyManagement>
    <dependencies>

      <!-- PRODUCT MODULES -->
      <dependency>
         <groupId>mygroup</groupId>
         <artifactId>B</artifactId>
         <version>${project.version}</version>
      </dependency>
      <dependency>
         <groupId>mygroup</groupId>
         <artifactId>C</artifactId>
         <version>${project.version}</version>
      </dependency>

      <dependency>
         <groupId>mygroup</groupId>
         <artifactId>A</artifactId>
         <version>${project.version}</version>
      </dependency>

    <!-- TESTING -->
      <dependency>
        <artifactId>xmlunit</artifactId>
        <groupId>xmlunit</groupId>
        <version>1.0</version>
        <scope>test</scope>     
      </dependency>

      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>3.8.2</version>
        <scope>test</scope>
     </dependency>
  
    <!-- MAIN -->

     <dependency>
       <artifactId>dom4j</artifactId>
       <groupId>dom4j</groupId>
       <version>1.6.1</version>
     </dependency>

      <dependency>
        <artifactId>log4j</artifactId>
        <groupId>log4j</groupId>
        <version>1.2.13</version>
      </dependency>
      <dependency>
        <artifactId>aspectjrt</artifactId>
        <groupId>aspectj</groupId>
        <version>1.5.0</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

 <pluginRepositories>
  <pluginRepository>
   <id>Maven Snapshots</id>
   <url>http://snapshots.maven.codehaus.org/maven2/</url>
   <snapshots>
    <enabled>true</enabled>
   </snapshots>
   <releases>
    <enabled>false</enabled>
   </releases>
  </pluginRepository>
 </pluginRepositories> 

   <build>
    <extensions>
      <extension>
        <groupId>org.apache.maven.wagon</groupId>
         <artifactId>wagon-ssh-external</artifactId>
         <version>1.0-alpha-5</version>
      </extension>
    </extensions>

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

      <plugin>
        <artifactId>maven-deploy-plugin</artifactId>
        <configuration>
          <url>###########</url>
        </configuration>
      </plugin>

      <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-surefire-report-plugin</artifactId>
      </plugin>

    </plugins>
  </build>
</project>

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

Reply via email to