[ 
https://issues.apache.org/jira/browse/IVY-419?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12478944
 ] 

Xavier Hanin commented on IVY-419:
----------------------------------

I'm happy to see you react to this, I wasn't really sure if it was a good 
choice or not.

The first reason why I've added this feature is to be able to deal with maven2 
classifiers. Indeed when you specify a classifier in a dependency declaration 
in m2, you actually get an artifact which is not defined by the pom of the 
dependency.

But I think it could be useful, if you don't want or can't "override" a module 
definition of a repository by providing your own, it may be useful to fix the 
definition from the module declaring the dependency. It's already the idea of 
the artifact tag, I prefer avoiding it and create a module descriptor for the 
dependency, but Ivy is flexible and allows this kind of thing.

Now for the attribute, I was wondering if it was necessary or not. I've chosen 
to add it because of some Ivy history, but I'm not sure it makes sense. The 
problem is that in earlier Ivy versions (don't really remember when), there 
were no distinction between artifact and include tags in dependency. And the 
implementation is still like that, artifact and include tags are handled with 
exactly the same code, what makes the difference is that if a module descriptor 
is found for the dependency then the behavior is assumed to be the one defined 
for include, and if it doesn't exist then it's assumed to be artifact. But now 
that the documentation clearly makes the distinction, maybe we could avoid this 
attribute and set it internally when using the artifact tag.

WDYT?

> define artifacts not declared by the dependency module descriptor
> -----------------------------------------------------------------
>
>                 Key: IVY-419
>                 URL: https://issues.apache.org/jira/browse/IVY-419
>             Project: Ivy
>          Issue Type: New Feature
>    Affects Versions: 1.4.1
>            Reporter: Xavier Hanin
>             Fix For: 1.5
>
>
> When you don't control your dependency module descriptor (using a public repo 
> for example) it happens that you want more control over the dependency.
> For the moment, it's possible to define artifacts for the dependency only if 
> the dependency has no module descriptor. What would be interesting would be 
> to be able to declare such artifacts even when the dependency has a module 
> descriptor. To be sure this is what is requested by the user, a boolean 
> attribute would be use on the dependency artifact declaration:
> {code:xml}
> <dependency org="foo" name="bar" rev="1.0">
>   <artifact name="baz" type="source" ext="jar" assumePublished="true"/>
> </dependency>
> {code}
> This feature would also help implement maven2 classifiers (see IVY-418)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to