Issue Details (XML | Word | Printable)

Key: IVY-1021
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Critical Critical
Assignee: Gilles Scokart
Reporter: Brian Matzon
Votes: 2
Watchers: 3
Operations

If you were logged in you would be able to see more operations.
Ivy

add flag or exclude option to ivy:install to avoid source or javadoc packages

Created: 28/Jan/09 09:30 AM   Updated: 05/Sep/09 03:27 PM
Return to search
Component/s: Ant
Affects Version/s: 2.0
Fix Version/s: trunk

Time Tracking:
Not Specified

Environment: ivy > beta 2 is affected
Issue Links:
Reference
 

Resolution Date: 05/Sep/09 03:27 PM


 Description  « Hide
Changes comitted in IVY-325 results in ivy:install to install source and javadoc files. This is all fine, except if people dont use [type] in their pattern it will fail because its trying to download multiple files with the same name (but different type).

This is a change in behavior since 2.0 beta2.

it would be nice to either add a flag to avoid this behavior or add and exclude/include section, like the dependencies.



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Alex Taggart added a comment - 20/Apr/09 07:56 PM
This one issue is keeping us on Ivy 2.0.0-beta2 (or more accurately, the breaking change from IVY-325).

It is a huge waste of time updating many hundreds of <dependency/> nodes spread across many dozens of ivy.xml files to only pull the jars, or waste inordinate amounts of bandwidth (and thus time) pulling down entirely useless javadoc and source JARs/ZIPs into my applications' lib.


Maarten Coene added a comment - 20/Apr/09 10:09 PM
You can easily avoid these sources/javadocs from being downloaded by restricting the type to "jar" when calling the ivy:resolve task...

Maarten Coene added a comment - 20/Apr/09 10:23 PM
Maybe a workaround for the ivy:install task problem could be to override the default maven2 patterns Ivy uses and don't specify the [classifier] token inside them. This way, Ivy won't find the sources/javadoc artifacts and will not try to download/install them...

Maarten


Alex Taggart added a comment - 20/Apr/09 11:38 PM
Thanks Maarten! Between the presence of the JIRA entry, and the lack of response to a query to the ivy-users mailing list (http://www.nabble.com/How-to-exclude-source-and-javadoc-download-td20808519.html#a21379869), I had thought this an unsolved problem.

Brian Matzon added a comment - 24/Apr/09 01:03 PM
how does all of this go down with ivy:install?

[ivy:install] :: installing apache#log4j#trunk;1.2.15 ::
[ivy:install] :: resolving dependencies ::
[ivy:install] found apache#log4j#trunk;1.2.15 in external
[ivy:install] :: downloading artifacts to cache ::
[ivy:install] downloading http://repo1.maven.org/maven2/log4j/log4j/1.2.15/log4j-1.2.15.jar ...
[ivy:install] ..................
[ivy:install] . (382kB)
[ivy:install] .. (0kB)
[ivy:install] [SUCCESSFUL ] apache#log4j#trunk;1.2.15!log4j.jar (2187ms)
[ivy:install] downloading http://repo1.maven.org/maven2/log4j/log4j/1.2.15/log4j-1.2.15-sources.jar ...
[ivy:install] ................ (380kB)
[ivy:install] .. (0kB)
[ivy:install] [SUCCESSFUL ] apache#log4j#trunk;1.2.15!log4j.jar(source) (1484ms)
[ivy:install] :: installing in local ::
[ivy:install] published log4j to ivy/local/apache/log4j/trunk/log4j-1.2.15.jar

BUILD FAILED
build.xml:68: impossible to install apache#log4j#trunk;1.2.15: java.io.IOException: file copy not done from ivy\cache\apache\log4j\trunk\sources\log4j-1.2.15-sources.jar to ivy\local\apache\log4j\trunk\log4j-1.2.15.jar: destination already exists and overwrite is false

highly annoying


Maarten Coene added a comment - 24/Apr/09 01:15 PM
I think you could workaround it by either:
  • add the [classifier] token to the artifact patterns of your local resolver; or
  • remove the [classifier] token from the artifact pattern of the ibiblio resolver

Thiam Teck added a comment - 04/Sep/09 09:19 AM
Hi Maarten, I am still a beginner in using Ivy.

After some google, the default attifact pattern I found is "[module]/[type]s/[artifact]-[revision].[ext]"

Do you mind to share with us on how to remove the [classifier] token from the artifact pattern of the ibiblio resolver?


Gilles Scokart added a comment - 05/Sep/09 03:27 PM
There is a type attribute to the install task since a long time, but it was not documented (nor tested).
The documentation is now updated on the trunk.