Note that there are some explanatory texts on larger screens.

plurals
  1. POivy report for entire repo?
    primarykey
    data
    text
    <p>I'm working on an internal ivy repository with a decent number of projects under it, each with many revisions. I would like to make a dependency report for the entire repository showing which versions of which artifacts depend on which revisions of other artifacts. Obviously it isn't too difficult to make a script to parse the published ivy xml files, but if this functionality exists already I'll use that. Something like the repreport task would be nice, but for a whole repo.</p> <p>My main goal here is to get a report of artifacts that are not referenced by any other artifacts so as to make a list of candidates for removal from the repo.</p> <p>So, does ivy have any way to build a dependency report against and entire repository?</p> <p>Edit: Working through this, it looks like ivy:repreport is the way to go.</p> <p>Here is my build.xml file:</p> <pre><code>&lt;project name="Report Build" xmlns:ivy="antlib:org.apache.ivy.ant" basedir="."&gt; &lt;property name="ivy.version" value="2.2.0"/&gt; &lt;property name="ivy.home" value="${user.home}/.ivy2"/&gt; &lt;target name="fetch-ivy" unless="offline" description="Install Ivy if it doesn't already exist"&gt; &lt;mkdir dir="${ivy.home}"/&gt; &lt;get src="http://repo2.maven.org/maven2/org/apache/ivy/ivy/${ivy.version}/ivy-${ivy.version}.jar" dest="${ivy.home}" usetimestamp="true"/&gt; &lt;/target&gt; &lt;target name="init-ivy" depends="fetch-ivy" unless="ivy-initialized"&gt; &lt;path id="ivy.lib.path"&gt; &lt;fileset dir="${ivy.home}" includes="*.jar"/&gt; &lt;/path&gt; &lt;taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path"/&gt; &lt;property name="ivy-initialized" value="yes"/&gt; &lt;/target&gt; &lt;target name="report" depends="init-ivy"&gt; &lt;ivy:settings file="ivy-settings-report.xml" id="report.ivy.settings"/&gt; &lt;ivy:repreport settingsref="report.ivy.settings"/&gt; &lt;/target&gt; &lt;/project&gt; </code></pre> <p>And here is my ivy settings file:</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;ivy-settings&gt; &lt;settings defaultResolver="main"/&gt; &lt;resolvers&gt; &lt;chain name="main"&gt; &lt;url name="internalartifacts" m2compatible="false"&gt; &lt;artifact pattern="http://internalartifacts.local/[organization]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]"/&gt; &lt;ivy pattern="http://internalartifacts.local/[organization]/[module]/[revision]/ivy-[revision].xml"/&gt; &lt;/url&gt; &lt;/chain&gt; &lt;/resolvers&gt; &lt;/ivy-settings&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload