Hi Duncan,

This looks like a bug in transitive() which isn't 100% accurate/complete
compared to Maven's dependency resolution.

In the short term, I'd say you have two broad options:

1) Explicit specify the dependencies (instead of using transitive).  You
could use Maven's resolved list if you have it.

2) Override the POM that includes the invalid dependency using:

artifact('group:actifact-id:pom:1.5').from 'manually_fixed.pom'

and copying + editing 'manually_fixed.pom' into your project.

Fixing transitive dependency support to have full accuracy/completeness
compared to Maven is on our roadmap but probably won't be ready until Buildr
1.5.0.

Finally, another alternative would be using the ivy4r plugin which uses Ivy
to resolve artifacts.

alex


On Sat, Oct 16, 2010 at 3:54 PM, Duncan McGregor <[email protected]>wrote:

> First, thanks for Buildr.
>
> I'm trying to migrate a Maven 2 project, but seem to be out of the frying
> pan and into the fire. Cut right down, if I try to build this:
>
> repositories.remote << 'http://www.ibiblio.org/maven2'
> repositories.remote << 'http://repo1.maven.org/maven2'
> repositories.remote << '
> http://repository.jboss.org/nexus/content/groups/public-jboss'
>
> define '2020iMP' do
>  project.group = '2020iMP'
>  project.version = '1.0-SNAPSHOT'
>
>  compile.with [
>    transitive('org.hibernate:hibernate-core:jar:3.5.6-Final'),
>  ]
> end
>
> it fails
>
> $ buildr -f delmebuildfile --trace
> (in /Users/duncan/Documents/Work/2020iMP/2020iMP, development)
> ** Invoke delme (first_time)
> ** Execute delme
> Defining task delme:shell:bsh
> Defining task delme:shell:jirb
> Defining task delme:shell:clj
> ** Invoke
> /Users/duncan/.m2/repository/org/hibernate/hibernate-core/3.5.6-Final/hibernate-core-3.5.6-Final.pom
> (first_time, not_needed)
> Loading m2 pom file from
> /Users/duncan/.m2/repository/org/hibernate/hibernate-core/3.5.6-Final/hibernate-core-3.5.6-Final.pom
> ** Invoke
> /Users/duncan/.m2/repository/org/hibernate/hibernate-parent/3.5.6-Final/hibernate-parent-3.5.6-Final.pom
> (first_time, not_needed)
> Loading m2 pom file from
> /Users/duncan/.m2/repository/org/hibernate/hibernate-parent/3.5.6-Final/hibernate-parent-3.5.6-Final.pom
>
> <snipped many poms loading>
>
> ** Invoke
> /Users/duncan/.m2/repository/jboss/jboss-parent/1/jboss-parent-1.pom
> (first_time, not_needed)
> Loading m2 pom file from
> /Users/duncan/.m2/repository/jboss/jboss-parent/1/jboss-parent-1.pom
> ** Invoke
> /Users/duncan/.m2/repository/org/jboss/javaee/jboss-servlet-api_3.0/1.0-SNAPSHOT/jboss-servlet-api_3.0-1.0-SNAPSHOT.pom
> (first_time)
> ** Execute
> /Users/duncan/.m2/repository/org/jboss/javaee/jboss-servlet-api_3.0/1.0-SNAPSHOT/jboss-servlet-api_3.0-1.0-SNAPSHOT.pom
> Downloading org.jboss.javaee:jboss-servlet-api_3.0:pom:1.0-SNAPSHOT
> Downloading org.jboss.javaee:jboss-servlet-api_3.0:pom:1.0-SNAPSHOT
> Requesting
> http://www.ibiblio.org/maven2/org/jboss/javaee/jboss-servlet-api_3.0/1.0-SNAPSHOT/jboss-servlet-api_3.0-1.0-SNAPSHOT.pom
> Redirected to
> http://mirrors.ibiblio.org/pub/mirrors/maven2/org/jboss/javaee/jboss-servlet-api_3.0/1.0-SNAPSHOT/jboss-servlet-api_3.0-1.0-SNAPSHOT.pom
> Requesting
> http://mirrors.ibiblio.org/pub/mirrors/maven2/org/jboss/javaee/jboss-servlet-api_3.0/1.0-SNAPSHOT/jboss-servlet-api_3.0-1.0-SNAPSHOT.pom
> Requesting
> http://repo1.maven.org/maven2/org/jboss/javaee/jboss-servlet-api_3.0/1.0-SNAPSHOT/jboss-servlet-api_3.0-1.0-SNAPSHOT.pom
> Requesting
> http://repository.jboss.org/nexus/content/groups/public-jboss/org/jboss/javaee/jboss-servlet-api_3.0/1.0-SNAPSHOT/jboss-servlet-api_3.0-1.0-SNAPSHOT.pom
> Requesting
> http://www.ibiblio.org/maven2/org/jboss/javaee/jboss-servlet-api_3.0/1.0-SNAPSHOT/maven-metadata.xml
> Redirected to
> http://mirrors.ibiblio.org/pub/mirrors/maven2/org/jboss/javaee/jboss-servlet-api_3.0/1.0-SNAPSHOT/maven-metadata.xml
> Requesting
> http://mirrors.ibiblio.org/pub/mirrors/maven2/org/jboss/javaee/jboss-servlet-api_3.0/1.0-SNAPSHOT/maven-metadata.xml
> Requesting
> http://repo1.maven.org/maven2/org/jboss/javaee/jboss-servlet-api_3.0/1.0-SNAPSHOT/maven-metadata.xml
> Requesting
> http://repository.jboss.org/nexus/content/groups/public-jboss/org/jboss/javaee/jboss-servlet-api_3.0/1.0-SNAPSHOT/maven-metadata.xml
> Buildr aborted!
> RuntimeError : Failed to download
> org.jboss.javaee:jboss-servlet-api_3.0:pom:1.0-SNAPSHOT, tried the following
> repositories:
> ...
>
> Now hibernate-core-3.5.6-Final.pom has
>
>  <dependency>
>            <groupId>org.jboss.javaee</groupId>
>            <artifactId>jboss-jacc-api_JDK4</artifactId>
>            <version>1.1.0</version>
>            <scope>provided</scope>
>            <exclusions>
>                <exclusion>
>                    <groupId>org.jboss.javaee</groupId>
>                    <artifactId>jboss-servlet-api_3.0</artifactId>
>                </exclusion>
>
> and Maven makes no attempt to pull down this file (which doesn't seem to
> exist - makes me wonder what the world is coming to).
>
> Can anyone offer any advice?
>
> Thanks in advance
>
> Duncan McGregor
>
>

Reply via email to