You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Henry S. Isidro" <hi...@exist.com> on 2006/03/01 03:04:10 UTC
Re: [m202] "Failed to resolve artifact" problem
Ray Ward wrote:
>I'm converting a "multiproject" project from Maven 1 to Maven 2, starting at
>the parent and adding modules one at a time until they build and install.
>
>Currently, this is what I'm trying to do.
>
>stars (P)
>+--- stars-common (A)
>+--- stars-domain (B)
>+--- stars-dao (C)
>
>B depends on A. C depends on both A and B, and some external jars I had to
>install in the local repository.
>
>P builds and installs, then A, then B. C fails, as it cannot resolve B.
>But B was just built and installed locally! (It's there -- I looked! ;-)
>
>I define the dependencies in the parent pom.xml, and refer to them, without
>the version info, in the subprojects. This works for all the other
>dependencies.
>
>What am I missing? Is there a way to force it to look in the right
>directory, perhaps using <systemPath/> ?
>
>TIA, Ray
>
>Here's the error:
>
>...
>[INFO] [jar:jar]
>[INFO] Building jar: /home/rward/apps/m2/stars/domain/target/stars-
>domain-1.0-SNAPSHOT.jar
>[INFO] [install:install]
>[INFO] Installing /home/rward/apps/m2/stars/domain/target/stars-
>domain-1.0-SNAPSHOT.jar to
>/home/rward/.m2/repository/stars-domain/1.0-SNAPSHOT/stars-
>domain-1.0-SNAPSHOT.jar
>[INFO]
>----------------------------------------------------------------------------
>[INFO] Building stars-dao
>[INFO] task-segment: [install]
>[INFO]
>----------------------------------------------------------------------------
>[INFO] [resources:resources]
>[INFO] Using default encoding to copy filtered resources.
>[INFO]
>----------------------------------------------------------------------------
>[ERROR] BUILD ERROR
>[INFO]
>----------------------------------------------------------------------------
>[INFO] Failed to resolve artifact.
>
>required artifacts missing:
> stars:stars-domain:jar:1.0-SNAPSHOT
>
>for the artifact:
> stars:stars-dao:jar:1.0-SNAPSHOT
>
>from the specified remote repositories:
> central (http://repo1.maven.org/maven2)
>
>
>
Hi Ray,
Can you post your poms? It may be easier to understand what's happening
if we can see them.
Regards,
Henry
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [m202] "Failed to resolve artifact" problem
Posted by Ray Ward <wa...@gmail.com>.
Here are the POMs (abbreviated a little):
<project> <!-- stars "multiproject" (P) -->
<modelVersion>4.0.0</modelVersion>
<groupId>stars</groupId>
<version>1.0-SNAPSHOT</version>
<artifactId>stars</artifactId>
<packaging>pom</packaging>
<name>stars</name>
<modules>
<module>common</module>
<module>domain</module>
<module>dao</module>
<!--
<module>ear</module>
<module>ejb</module>
<module>web</module>
-->
</modules>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>stars</groupId>
<artifactId>stars-domain</artifactId>
<version>${pom.version}</version>
</dependency>
<dependency>
<groupId>stars</groupId>
<artifactId>stars-common</artifactId>
<version>${pom.version}</version>
</dependency>
<dependency>
<groupId>stars</groupId>
<artifactId>stars-dao</artifactId>
<version>${pom.version}</version>
</dependency>
...
</dependencies>
</dependencyManagement>
</project>
<!-- stars-domain module (B) [stars-common, module A, is similar, but has no
dependencies] -->
<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">
<modelVersion>4.0.0</modelVersion>
<groupId>stars</groupId>
<artifactId>stars-domain</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>stars-domain</name>
<!--
<url>http://maven.apache.org</url>
-->
<parent>
<groupId>us.ma.state.dss.stars</groupId>
<artifactId>stars</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<dependencies>
<dependency>
<groupId>stars</groupId>
<artifactId>stars-common</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
<!-- stars-dao module (C) -->
<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">
<modelVersion>4.0.0</modelVersion>
<groupId>us.ma.state.dss.stars</groupId>
<artifactId>stars-dao</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>stars-dao</name>
<parent>
<groupId>us.ma.state.dss.stars</groupId>
<artifactId>stars</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<build>
<resources>
<resource>
<directory>${basedir}/stars/persistence/sqlmapdao/sql</directory>
<targetPath>stars/persistence/sqlmapdao/sql</targetPath>
<includes>
<include>**/*</include>
</includes>
</resource>
<resource>
<directory>${basedir}/src/java/stars/persistence/conf</directory>
<targetPath>stars/persistence/conf</targetPath>
<includes>
<include>**/*</include>
</includes>
</resource>
</resources>
</build>
<dependency>
<groupId>stars</groupId>
<artifactId>stars-common</artifactId>
</dependency>
<dependency>
<groupId>stars</groupId>
<artifactId>stars-domain</artifactId>
</dependency>
<dependency>
<groupId>com.ibatis</groupId>
<artifactId>ibatis2-common</artifactId>
</dependency>
...
</dependencies>
</project>
On 2/28/06, Henry S. Isidro <hi...@exist.com> wrote:
>
> Ray Ward wrote:
>
> >I'm converting a "multiproject" project from Maven 1 to Maven 2, starting
> at
> >the parent and adding modules one at a time until they build and install.
> >
> >Currently, this is what I'm trying to do.
> >
> >stars (P)
> >+--- stars-common (A)
> >+--- stars-domain (B)
> >+--- stars-dao (C)
> >
> >B depends on A. C depends on both A and B, and some external jars I had
> to
> >install in the local repository.
> >
> >P builds and installs, then A, then B. C fails, as it cannot resolve B.
> >But B was just built and installed locally! (It's there -- I looked! ;-)
> >
> >I define the dependencies in the parent pom.xml, and refer to them,
> without
> >the version info, in the subprojects. This works for all the other
> >dependencies.
> >
> >What am I missing? Is there a way to force it to look in the right
> >directory, perhaps using <systemPath/> ?
> >
> >TIA, Ray
> >
> >Here's the error:
> >
> >...
> >[INFO] [jar:jar]
> >[INFO] Building jar: /home/rward/apps/m2/stars/domain/target/stars-
> >domain-1.0-SNAPSHOT.jar
> >[INFO] [install:install]
> >[INFO] Installing /home/rward/apps/m2/stars/domain/target/stars-
> >domain-1.0-SNAPSHOT.jar to
> >/home/rward/.m2/repository/stars-domain/1.0-SNAPSHOT/stars-
> >domain-1.0-SNAPSHOT.jar
> >[INFO]
>
> >----------------------------------------------------------------------------
> >[INFO] Building stars-dao
> >[INFO] task-segment: [install]
> >[INFO]
>
> >----------------------------------------------------------------------------
> >[INFO] [resources:resources]
> >[INFO] Using default encoding to copy filtered resources.
> >[INFO]
>
> >----------------------------------------------------------------------------
> >[ERROR] BUILD ERROR
> >[INFO]
>
> >----------------------------------------------------------------------------
> >[INFO] Failed to resolve artifact.
> >
> >required artifacts missing:
> > stars:stars-domain:jar:1.0-SNAPSHOT
> >
> >for the artifact:
> > stars:stars-dao:jar:1.0-SNAPSHOT
> >
> >from the specified remote repositories:
> > central (http://repo1.maven.org/maven2)
> >
> >
> >
> Hi Ray,
>
> Can you post your poms? It may be easier to understand what's happening
> if we can see them.
>
> Regards,
> Henry
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>