When I add this dependency directly to my pom.xml, build still works locally:

        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-plugin-api</artifactId>
            <version>[2.0,)</version>
            <scope>compile</scope>
        </dependency>

So it seems dependency version range resolving works after all. If I
clear my repository before doing this, following versions appear after
building:

2.0
2.0.6
2.0.11
3.0-beta-2

sheesh.....

Anyhow, local build, Windows + maven 2.2.1 is able to retrieve this dependency.

When my Hudson build running on linux box (maven 2.2.1 "installed
automatically from Apache", by Hudson) tries to do the same build it
cannot find the dependency version:

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

No versions are present in the repository for the artifact with a range [2.0,)
  org.apache.maven:maven-plugin-api:jar:null

from the specified remote repositories:
  central (http://repo1.maven.org/maven2),
  prime-repo (http://repository.prime.com.tr)

Path to dependency:
        1) com.gofore.valtimo:webapp:war:1.0-SNAPSHOT


I checked that both machines can connect to http://repo1.maven.org/maven2.



On Mon, Aug 16, 2010 at 2:54 PM, janne postilista
<[email protected]> wrote:
> My build craps out because
>
> [HUDSON] Archiving
> /home/zzz/.hudson/jobs/ci-build/workspace/trunk/webapp/pom.xml to
> /home/zzz/.hudson/jobs/ci-build/modules/zzz$webapp/builds/2010-08-16_14-27-53/archive/zzz/webapp/1.0-SNAPSHOT/pom.xml
> [INFO] 
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Failed to resolve artifact.
>
> No versions are present in the repository for the artifact with a range [2.0,)
>  org.apache.maven:maven-plugin-api:jar:null
>
> from the specified remote repositories:
>  maven2.dev.java.net (http://download.java.net/maven/2),
>  central (http://repo1.maven.org/maven2),
>  prime-repo (http://repository.prime.com.tr),
>  snapshot.ocean.net.au (http://maven.ocean.net.au/snapshot),
>  external.ocean.net.au (http://maven.ocean.net.au/external),
>  release.ocean.net.au (http://maven.ocean.net.au/release),
>  java.net2 (http://download.java.net/maven/2)
>
> Path to dependency:
>        1) org.glassfish.maven.plugin:maven-glassfish-plugin:maven-plugin:2.1
>        2) au.net.ocean.maven.plugin:maven-plugin:jar:1.0
>
> When I look at au.net.ocean.maven.plugin:maven-plugin:jar:1.0 pom.xml, it has
>
>        <dependency>
>            <groupId>org.apache.maven</groupId>
>            <artifactId>maven-plugin-api</artifactId>
>            <version>[2.0,)</version>
>            <scope>compile</scope>
>        </dependency>
>
> and central repository has matching versions. Why doesn't maven find
> it? Using maven 2.2.1
>
> Is this problem still alive http://jira.codehaus.org/browse/MNG-2742?
> It seems to be since it's unresolved.
>
> But how could something this important remain unresolved for 3,5 years....?
>
> PS. I have no idea why maven tries to retrieve the dependency. It's
> part of a child dependency's "compile scope" dependencies. No one is
> trying to compile au.net.ocean.maven.plugin:maven-plugin:jar:1.0.
>
> PS2. This build works when I try it locally. Hudson does something
> extra ([HUDSON] Archiving....?) that wants the dependency.
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to