You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by nirvdrum <km...@servprise.com> on 2007/05/25 20:44:05 UTC

Dealing with POMs with classifications?

Hi,

I'm looking to add a dependency to TestNG 5.5.  TestNG ships in two flavors:
one for JDK < 1.5, one for JDK >= 1.5.  In maven2, the way to pick the right
one is to use a classifier tag, like so:

<dependency>
      <groupId>org.testng</groupId>
      <artifactId>testng</artifactId>
      <version>5.5</version>
      <classifier>jdk15</classifier>
      <scope>test</scope>
</dependency>

Is there a similar concept in ivy?  If not, how should I go about selecting
the proper artifact from ibiblio?

Thanks,
Kevin
-- 
View this message in context: http://www.nabble.com/Dealing-with-POMs-with-classifications--tf3817705.html#a10808232
Sent from the ivy-user mailing list archive at Nabble.com.


Re: Dealing with POMs with classifications?

Posted by Gilles Scokart <gs...@gmail.com>.
Unfortunately, ivy has no similar concepts.  But you are not the first
one to ask for it (there is maybe even already a jira issue for it,
but I didn't find it).  Moreover, the compatibility with maven
repository is very important for the current release.
So, if you find the jira issue
(https://issues.apache.org/jira/browse/IVY), vote for it.  And if
there is not yet a jira issue, just create a new one.

Thanks,
Gilles


2007/5/25, nirvdrum <km...@servprise.com>:
>
> Hi,
>
> I'm looking to add a dependency to TestNG 5.5.  TestNG ships in two flavors:
> one for JDK < 1.5, one for JDK >= 1.5.  In maven2, the way to pick the right
> one is to use a classifier tag, like so:
>
> <dependency>
>       <groupId>org.testng</groupId>
>       <artifactId>testng</artifactId>
>       <version>5.5</version>
>       <classifier>jdk15</classifier>
>       <scope>test</scope>
> </dependency>
>
> Is there a similar concept in ivy?  If not, how should I go about selecting
> the proper artifact from ibiblio?
>
> Thanks,
> Kevin
> --
> View this message in context: http://www.nabble.com/Dealing-with-POMs-with-classifications--tf3817705.html#a10808232
> Sent from the ivy-user mailing list archive at Nabble.com.
>
>


-- 
Gilles SCOKART

Re: Dealing with POMs with classifications?

Posted by Xavier Hanin <xa...@gmail.com>.
Hi,

We do not have a similar concept, but we have already implemented something
to be compatible with this construct in 2.0.0 alpha 1 (see IVY-418).

So you have two options:
- use a pom to define your dependencies and declare the dependency with the
classifier.
- use an ivy file and define your dependency like that:
<dependency org="org.testng" name="testng" rev="5.5">
  <artifact name="testng" type="jar" ext="jar" classifier="jdk15"/>
</dependency>

You will have to deactivate ivy file validation in this case, because
classifier is considered as an extra attribute.

You will also have to make sure to use a good pattern for your resolver
storing the maven 2 artifacts. Something like:
[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]

HTH,

Xavier

On 5/25/07, nirvdrum <km...@servprise.com> wrote:
>
>
> Hi,
>
> I'm looking to add a dependency to TestNG 5.5.  TestNG ships in two
> flavors:
> one for JDK < 1.5, one for JDK >= 1.5.  In maven2, the way to pick the
> right
> one is to use a classifier tag, like so:
>
> <dependency>
>       <groupId>org.testng</groupId>
>       <artifactId>testng</artifactId>
>       <version>5.5</version>
>       <classifier>jdk15</classifier>
>       <scope>test</scope>
> </dependency>
>
> Is there a similar concept in ivy?  If not, how should I go about
> selecting
> the proper artifact from ibiblio?
>
> Thanks,
> Kevin
> --
> View this message in context:
> http://www.nabble.com/Dealing-with-POMs-with-classifications--tf3817705.html#a10808232
> Sent from the ivy-user mailing list archive at Nabble.com.
>
>


-- 
Xavier Hanin - Independent Java Consultant
Manage your dependencies with Ivy!
http://incubator.apache.org/ivy/