You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@buildr.apache.org by Jacek Sokulski <js...@dotsystems.pl> on 2010/07/12 12:36:59 UTC

transitive() fails with POM variables

Hi
when using transitive for maven artifacts buildr fails in case when POM 
uses maven variables

example buildfile:
repositories.remote << "http://repository.jboss.com/maven2/"
transitive("org.hibernate:hibernate-ehcache:jar:3.3.1.GA")

POM contains dependency:

        <dependency>
            <groupId>${groupId}</groupId>
            <artifactId>hibernate-core</artifactId>
            <version>${version}</version>
        </dependency>


and the trace is:
Downloading :hibernate-core:pom:
Buildr aborted!
RuntimeError : Failed to download :hibernate-core:pom:, tried the 
following repositories:
http://repository.jboss.com/maven2//
/opt/workspaceSMM/smm-web/gui/buildfile:14
/usr/lib/ruby/gems/1.8/gems/buildr-1.4.1/lib/buildr/core/application.rb:398:in 
`raw_load_buildfile'
/usr/lib/ruby/gems/1.8/gems/buildr-1.4.1/lib/buildr/core/application.rb:218:in 
`load_buildfile'
/usr/lib/ruby/gems/1.8/gems/buildr-1.4.1/lib/buildr/core/application.rb:213:in 
`load_buildfile'

So it seems  that ${groupId} and ${version} variables are not resolved
Jacek

Re: transitive() fails with POM variables

Posted by Alex Boisvert <al...@gmail.com>.
I think "known limitation" would best describe this behavior.

Perhaps we could use Ivy (ivy4r?) for more advanced parsing of POMs.
Klaas?

alex


2010/7/12 Jacek Sokulski <js...@dotsystems.pl>

> Hi
> when using transitive for maven artifacts buildr fails in case when POM
> uses maven variables
>
> example buildfile:
> repositories.remote << "http://repository.jboss.com/maven2/"
> transitive("org.hibernate:hibernate-ehcache:jar:3.3.1.GA")
>
> POM contains dependency:
>
>       <dependency>
>           <groupId>${groupId}</groupId>
>           <artifactId>hibernate-core</artifactId>
>           <version>${version}</version>
>       </dependency>
>
>
> and the trace is:
> Downloading :hibernate-core:pom:
> Buildr aborted!
> RuntimeError : Failed to download :hibernate-core:pom:, tried the following
> repositories:
> http://repository.jboss.com/maven2//
> /opt/workspaceSMM/smm-web/gui/buildfile:14
> /usr/lib/ruby/gems/1.8/gems/buildr-1.4.1/lib/buildr/core/application.rb:398:in
> `raw_load_buildfile'
> /usr/lib/ruby/gems/1.8/gems/buildr-1.4.1/lib/buildr/core/application.rb:218:in
> `load_buildfile'
> /usr/lib/ruby/gems/1.8/gems/buildr-1.4.1/lib/buildr/core/application.rb:213:in
> `load_buildfile'
>
> So it seems  that ${groupId} and ${version} variables are not resolved
> Jacek
>