It's not the solution I want, but can I somehow tell in my pom.xml that if a dependency has defined it's own dependency as:
<dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-plugin-api</artifactId> <version>[2.0,)</version> <scope>compile</scope> </dependency> FORCE it to use 2.0 exactly? Tried adding to my pom.xml: <dependencyManagement> <dependencies> <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-plugin-api</artifactId> <version>2.0</version> <scope>compile</scope> </dependency> </dependencies> </dependencyManagement> but it was of no help. On Mon, Aug 16, 2010 at 4:29 PM, janne postilista <jannepostilis...@gmail.com> wrote: > And when I change my direct dependency in pom.xml > > from > > <dependency> > <groupId>org.apache.maven</groupId> > <artifactId>maven-plugin-api</artifactId> > <version>[2.0,)</version> > <scope>compile</scope> > </dependency> > > to > > <dependency> > <groupId>org.apache.maven</groupId> > <artifactId>maven-plugin-api</artifactId> > <version>2.0</version> > <scope>compile</scope> > </dependency> > > linux build finds the dependency from the repository fine. So it seems that > > - linux maven for some reason cannot resolve <version>[2.0,)</version> > - windows maven can resolve <version>[2.0,)</version> > > Maven versions: > > C:\Windows\System32>mvn --version > Apache Maven 2.2.1 (r801777; 2009-08-06 22:16:01+0300) > Java version: 1.6.0_14 > Java home: C:\Program Files (x86)\Java\jdk1.6.0_14\jre > Default locale: fi_FI, platform encoding: Cp1252 > OS name: "windows vista" version: "6.0" arch: "x86" Family: "windows" > > ]$ mvn --version > Apache Maven 2.2.1 (r801777; 2009-08-06 22:16:01+0300) > Java version: 1.6.0_21 > Java home: /usr/java/jdk1.6.0_21/jre > Default locale: en_US, platform encoding: UTF-8 > OS name: "linux" version: "2.6.18-194.8.1.el5" arch: "amd64" Family: "unix" > > > On Mon, Aug 16, 2010 at 4:24 PM, janne postilista > <jannepostilis...@gmail.com> wrote: >> Thanks, but it doesn't seem to be a Hudson issue. >> >> Installed maven 2.2.1 (same as my local windows version) to the linux >> machine and trying the same build from there, I get: >> >> [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) zzz:webapp:war:1.0-SNAPSHOT >> >> I can't figure out why the same build fails on the linux box and works >> on my windows environment...I have tried telnetting repo1.maven.org >> successfully. >> >> >> On Mon, Aug 16, 2010 at 3:45 PM, Stephen Connolly >> <stephen.alan.conno...@gmail.com> wrote: >>> 1. This is a hudson issue so report on the hudson list. >>> >>> On 16 August 2010 12:54, janne postilista <jannepostilis...@gmail.com>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 >>>> >>> >>> compile scope = at compile time and at runtime >>> provided scope = at compile time but not at runtime (because somebody else >>> will provide it) >>> runtime scope = not at compile time, but at runtime >>> >>> >>>> 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: users-unsubscr...@maven.apache.org >>>> For additional commands, e-mail: users-h...@maven.apache.org >>>> >>>> >>> >> > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org