Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven POM dependencies to ivy.xml file

Is there a maven plugin which i can use to convert the maven pom dependencies including transitive dependencies to an ivy.xml file?

like image 510
JavaRocky Avatar asked Sep 15 '10 08:09

JavaRocky


People also ask

Does ivy use Maven?

With no specific settings, Ivy uses the maven 2 repository to resolve the dependencies you declare in an Ivy file.


1 Answers

Here's an Ant script

<project name="convertPomToIvy" basedir="." default="all"
  xmlns:ivy="antlib:fr.jayasoft.ivy.ant"
  xmlns:ac="antlib:net.sf.antcontrib">

    <path id="antlib.classpath">
        <fileset dir="/path/to/ivy/libs" includes="*.jar"/>
    </path>

    <taskdef uri="antlib:fr.jayasoft.ivy.ant"
        resource="fr/jayasoft/ivy/ant/antlib.xml"
        classpathref="antlib.classpath"
        loaderref="antlib.classpath.loader"/>

    <target name="convert">
        <ivy:convertpom pomFile="pom.xml" ivyFile="ivy.xml" />
    </target>

</project>

From here or here (& probably elsewhere)

like image 67
Jon Freedman Avatar answered Sep 20 '22 16:09

Jon Freedman