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

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

Maarten:
Yes, it was my first idea about IVY-418, but it simply didn't work. Because the 
extra attribute is only available on the dependency descriptor, not in the the 
module descritor of the dependency. And I can't inject it in the module 
descriptor of the dependency, because if several modules depends on bar with a 
different classifier, it will lead to unpredictable results. So the solution 
would be to keep a Map of extra attributes by caller in the IvyNode, but then 
when I ask the artifacts to the node, what should it do?  The problem is that 
with classifiers maven2 allows some sort of module descriptor modification from 
the module declaring the dependency. You have no hint in the module of which 
classifiers it accept. It's strange IMHO, but it's like that.

Stephane:
I agree that I will almost never recommend to use this feature, but I see at 
least one use case where it could be useful. Imagine you have a module A 1.0 in 
your repository with a module descriptor, you depend on it, everything works 
fine, you're happy and release your product depending on it. Then later another 
project need a dependency on this same module, but it happens that for some 
reason an artifact published by module A wasn't declared in the module 
descriptor. Should you modifiy A module descriptor, and possibly break your 
build reproducibility? Or create a new fake version for this purpose? Maybe 
using the feature defined here could help in this case.

And for the assumePublished attribute, I agree it doesn't really make sense, 
and will remove it: internally assumePublished will always be true when you use 
an artifact tag and false when you use include, until we refactor this code to 
properly separate artifact and include implementations.


> 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