- Documentation (2.3.0)
- Release Notes
- Tutorials
- Reference
- Introduction
- Settings Files
- Ivy Files
- Ant Tasks
- Using standalone
- OSGi
- Developer doc
artifactreport
since 1.4 The artifactreport task generates an xml report of all artifacts dependencies resolved by the last resolve task call during the same build.
since 2.0 This is a post resolve task, with all the behaviour and attributes common to all post resolve tasks.
This report is different from the standard report which reports all modules and artifacts, whle this report is much simpler and focuses only on artifacts, and gives more information on artifacts, such as the original location and the retrieve location.
It is thus easy to use to generate things like a classpath file for an IDE.
See this article by Johan Stuyts (who contributed this task) to see how he uses this task.
Here is an example of generate file:
<?xml version="1.0" encoding="UTF-8"?>
<modules>
<module organisation="hippo" name="sant-classes" rev="1.01.00b04-dev" status="integration">
<artifact name="sant-classes-src" ext="zip" type="zip">
<origin-location is-local="true">
C:/home/jstuyts/data/ivy/local/hippo/sant-classes/1.01.00b04-dev/sant-classes-src-1.01.00b04-dev.zip</origin-location>
<cache-location>
C:/home/jstuyts/data/ivy/cache/hippo/sant-classes/zips/sant-classes-src-1.01.00b04-dev.zip</cache-location>
<retrieve-location>lib/test/sant-classes-src-1.01.00b04-dev.zip</retrieve-location>
</artifact>
<artifact name="sant-classes-unoptimized" ext="jar" type="jar">
<origin-location is-local="true">
C:/home/jstuyts/data/ivy/local/hippo/sant-classes/1.01.00b04-dev/sant-classes-unoptimized-1.01.00b04-dev.jar</origin-location>
<cache-location>
C:/home/jstuyts/data/ivy/cache/hippo/sant-classes/jars/sant-classes-unoptimized-1.01.00b04-dev.jar</cache-location>
<retrieve-location>lib/test/sant-classes-unoptimized-1.01.00b04-dev.jar</retrieve-location>
</artifact>
</module>
<module organisation="testng" name="testng" rev="4.6.1-jdk15" status="release">
<artifact name="testng" ext="jar" type="jar">
<origin-location is-local="false">
http://repository.hippocms.org/maven/testng/jars/testng-4.6.1-jdk15.jar</origin-location>
<cache-location>C:/home/jstuyts/data/ivy/cache/testng/testng/jars/testng-4.6.1-jdk15.jar</cache-location>
<retrieve-location>lib/test/testng-4.6.1-jdk15.jar</retrieve-location>
</artifact>
</module>
Attributes
Attribute | Description | Required |
---|---|---|
tofile | the file to which the report should be written | Yes |
pattern | the retrieve pattern to use to fill the retrieve location information about the artifacts | No. Defaults to ${ivy.retrieve.pattern}. |
conf | a comma separated list of the configurations to use to generate the report | No. Defaults to the configurations resolved by the last resolve call |
haltonfailure | true to halt the build on ivy failure, false to continue | No. Defaults to true |
settingsRef | A reference to the ivy settings that must be used by this task (since 2.0) | No, 'ivy.instance' is taken by default. |
Examples
<ivy:artifactreport tofile="${basedir}/path/to/myreport.xml" />Generates the artifact report for all configurations resolved during the last resolve call (in the same build).
<ivy:artifactreport tofile="${basedir}/path/to/myreport.xml" conf="default"/>Generates the artifact report for only the default configuration resolved during the last resolve call.