blob: 294d7c14cc0cd8159f6e317c65c49344814844bb [file] [log] [blame]
////
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
////
Generates reports of dependency resolving. One report per configuration is generated, but all reports generated together are hyperlinked one to each other.
This task should be used only after a call to resolve, even if the call was not done during the same Ant build.
In fact, this task uses XML report generated by resolve in cache. So if you call resolve on a module for a given configuration, you can call report safely on this module and this configuration as long as you do not clean your Ivy cache.
If you want to have an idea of what reports look like, check this very simple link:../samples/jayasoft-ivyrep-example-default.html[example].
The task also generates a GraphML file which can be loaded with the free link:https://www.yworks.com/products/yed[yEd] graph editor.
Then following a few link:../yed{outfilesuffix}[simple steps] you can obtain a graph like this link:../samples/jayasoft-ivyrep-example-default.jpg[one].
(*__since 1.4__*) If a custom XSLT is specified, it's possible to specify additional parameters to the stylesheet.
== Attributes
[options="header",cols="15%,50%,35%"]
|=======
|Attribute|Description|Required
|todir|the directory to which reports should be generated|No, defaults to `${ivy.report.todir}`, or execution directory if not defined
|outputpattern|the generated report names pattern|No, defaults to `${ivy.report.output.pattern}`, or `[organisation]-[module]-[conf].[ext]` if not defined
|xsl|`true` to generate a report (by default html report) using xslt, `false` otherwise (*__since 1.3__*)|No, defaults to `true`
|xml|`true` to generate an XML report, `false` otherwise (*__since 1.3__*)|No, defaults to `false`
|graph|`true` to generate GraphML files, `false` otherwise|No, defaults to `true`
|dot|`true` to generate link:http://www.graphviz.org/[Graphviz DOT] files, `false` otherwise (*__since 1.4__*)|No, defaults to `false`
|conf|a comma separated list of the configurations for which a report should be generated|No. Defaults to the configurations resolved by the last resolve call (during same Ant build), or `${ivy.resolved.configurations}` if no resolve was called
|organisation|the name of the organisation of the module for which report should be generated|No, unless resolveId has not been specified and no resolve was called during the build. Defaults to last resolved module organisation.
|module|the name of the module for which report should be generated|No, unless resolveId has not been specified and no resolve was called during the build. Defaults to last resolved module.
|validate|true to force Ivy files validation against ivy.xsd, false to force no validation|No. Defaults to default Ivy value (as configured in settings)
|xslfile|indicates which xsl file should be used to generate the report|No, defaults to Ivy provided xsl which generates html report
|settingsRef|A reference to Ivy settings that must be used by this task (*__since 2.0__*)|No, defaults to `ivy.instance`.
|resolveId|The id which was used for a previous resolve (*__since 2.0__*)|No, defaults to `[org]-[module]`.
|=======
== Examples
To generate a HTML and GraphML report:
[source,xml]
----
<report conf="compile"/>
----
'''
To generate a HTML report only:
[source,xml]
----
<report conf="compile" graph="false"/>
----
'''
To generate an XML report using a custom stylesheet:
[source,xml]
----
<report conf="compile" xslfile="my-custom-stylesheet.xsl" xslext="xml"/>
----
To generate an XML report using a custom stylesheet which needs some parameters:
[source,xml]
----
<report conf="compile" xslfile="my-custom-stylesheet.xsl" xslext="xml">
<param name="param1" expression="value1"/>
<param name="param2" expression="value2"/>
</report>
----