You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Wim Deblauwe <wi...@gmail.com> on 2005/10/26 09:19:13 UTC

[m2] not building if only in local repository

Hi,

I have 2 modules: moduleA depends on moduleB. I did a mvn install on
moduleA. Then I tried to build moduleB, but I get an error:

[INFO] Failed to resolve artifact.

GroupId: com.mycomp.utils
ArtifactId: utils-logging
Version: 1.0-SNAPSHOT

Reason: Unable to download the artifact from any repository
com.mycomp.utils:utils-logging:1.0-SNAPSHOT:jar

from the specified remote repositories:
central (http://repo1.maven.org/maven2)

Also if I run with the -X option, I see in the debugging:

[DEBUG] utils-logging: using locally installed snapshot

so why the error? Do I need to specify the path to the local repository in
my pom.xml?

regards,

Wim

Re: [m2] not building if only in local repository

Posted by Wim Deblauwe <wi...@gmail.com>.
I found that problem, it was a wrong groupId I used. But when I corrected
this, I now get:

[INFO]
----------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
----------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

GroupId: com.mycomp.mis.build
ArtifactId: build
Version: 1.0-SNAPSHOT

Reason: Unable to download the artifact from any repository
com.mycomp.mis.build:build:1.0-SNAPSHOT:pom

from the specified remote repositories:
central (http://repo1.maven.org/maven2)

But that is not a dependency of my project, it is the parent pom:

<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">
<parent>
<groupId>com.mycomp.mis.build</groupId>
<artifactId>build</artifactId>
<version>1.0-SNAPSHOT</version>
<relativePath>../../../build/build-zip/build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycomp.mis.utils</groupId>
<artifactId>utils-lang</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>Utils Lang Module</name>
<dependencies>
<dependency>
<groupId>com.mycomp.mis.utils</groupId>
<artifactId>utils-test</artifactId>
<version>1.0-SNAPSHOT</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.mycomp.mis.utils</groupId>
<artifactId>utils-logging</artifactId>
<version>1.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>

Any idea's?

Because I was able to build another module with a pom like this:
<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">
<parent>
<groupId>com.mycomp.mis.build</groupId>
<artifactId>build</artifactId>
<version>1.0-SNAPSHOT</version>
<relativePath>../../../build/build-zip/build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycomp.mis.utils</groupId>
<artifactId>utils-logging</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>Utils Logging Module</name>
<dependencies>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.0.4</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>

thank you for looking into this.

regards,

Wim


2005/10/28, Brett Porter <br...@gmail.com>:
>
> Certainly sounds fishy. Do you have a testk case you can post to JIRA?
>
> - Brett
>
> On 10/26/05, Wim Deblauwe <wi...@gmail.com> wrote:
> > Hi,
> >
> > I have 2 modules: moduleA depends on moduleB. I did a mvn install on
> > moduleA. Then I tried to build moduleB, but I get an error:
> >
> > [INFO] Failed to resolve artifact.
> >
> > GroupId: com.mycomp.utils
> > ArtifactId: utils-logging
> > Version: 1.0-SNAPSHOT
> >
> > Reason: Unable to download the artifact from any repository
> > com.mycomp.utils:utils-logging:1.0-SNAPSHOT:jar
> >
> > from the specified remote repositories:
> > central (http://repo1.maven.org/maven2)
> >
> > Also if I run with the -X option, I see in the debugging:
> >
> > [DEBUG] utils-logging: using locally installed snapshot
> >
> > so why the error? Do I need to specify the path to the local repository
> in
> > my pom.xml?
> >
> > regards,
> >
> > Wim
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: [m2] not building if only in local repository

Posted by Brett Porter <br...@gmail.com>.
Certainly sounds fishy. Do you have a testk case you can post to JIRA?

- Brett

On 10/26/05, Wim Deblauwe <wi...@gmail.com> wrote:
> Hi,
>
> I have 2 modules: moduleA depends on moduleB. I did a mvn install on
> moduleA. Then I tried to build moduleB, but I get an error:
>
> [INFO] Failed to resolve artifact.
>
> GroupId: com.mycomp.utils
> ArtifactId: utils-logging
> Version: 1.0-SNAPSHOT
>
> Reason: Unable to download the artifact from any repository
> com.mycomp.utils:utils-logging:1.0-SNAPSHOT:jar
>
> from the specified remote repositories:
> central (http://repo1.maven.org/maven2)
>
> Also if I run with the -X option, I see in the debugging:
>
> [DEBUG] utils-logging: using locally installed snapshot
>
> so why the error? Do I need to specify the path to the local repository in
> my pom.xml?
>
> regards,
>
> Wim
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org