You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by Troy Bull <tr...@gmail.com> on 2009/03/03 21:55:25 UTC

How to upgrade from 1.4.1 to 2

Hi

I have taken over a build system that uses ant and ivy.  It uses ivy 1.4.1
and ant.  It is written in java and is extra tasks for ant that are smart
about building our projects.  I have upgraded many parts of it, in fact the
last thing in it that is outdated is ivy.  I tried just switching the jars
and recompiling this was disasterous :)

Anyway, here is an example of one of the classes and how ivy is used.  Is
there a step by step documentation anywhere that explains how to
upgrade??

        String ivyConfFile = ProjectUtils.resolveProperty("basedir") +
"/ivyconf.xml";
        IvyConfigure ivyConfigureTask = new IvyConfigure();
        ivyConfigureTask.setProject(project);
        ivyConfigureTask.setTaskName("ivy:configure");

        try {
            ivyConfigureTask.setUrl("
http://c2r7u07:8080/enterprise-updates/ivyconf.xml");
        } catch(MalformedURLException ex) {
            ivyConfigureTask.setFile(new File(ivyConfFile));
        }

        ivyConfigureTask.execute();

        IvyRetrieve ivyRetrieveTask = new IvyRetrieve();
        ivyRetrieveTask.setProject(project);
        ivyRetrieveTask.setTaskName("ivy:retrieve");
        ivyRetrieveTask.setPattern(javaLibraryDir +
"/[conf]/[artifact]-[revision].[ext]");
        ivyRetrieveTask.setConf("*");
        ivyRetrieveTask.execute();

        task.log("[RESOLVE DEPENDENCIES] Finished resolving dependencies");

For an example of my problems, IvyConfigure doesnt seem to exist any more?
Any and all tips are greatly appreciated.

Thanks
troy

Re: How to upgrade from 1.4.1 to 2

Posted by Maarten Coene <ma...@yahoo.com>.
Most of it still should compile after you renamed the packages to "org.apache.ivy"...
For instance, the org.apache.ivy.ant.IvyConfigure task still exists.

Maarten




----- Original Message ----
From: Troy Bull <tr...@gmail.com>
To: ivy-user@ant.apache.org
Sent: Tuesday, March 3, 2009 9:55:25 PM
Subject: How to upgrade from 1.4.1 to 2

Hi

I have taken over a build system that uses ant and ivy.  It uses ivy 1.4.1
and ant.  It is written in java and is extra tasks for ant that are smart
about building our projects.  I have upgraded many parts of it, in fact the
last thing in it that is outdated is ivy.  I tried just switching the jars
and recompiling this was disasterous :)

Anyway, here is an example of one of the classes and how ivy is used.  Is
there a step by step documentation anywhere that explains how to
upgrade??

        String ivyConfFile = ProjectUtils.resolveProperty("basedir") +
"/ivyconf.xml";
        IvyConfigure ivyConfigureTask = new IvyConfigure();
        ivyConfigureTask.setProject(project);
        ivyConfigureTask.setTaskName("ivy:configure");

        try {
            ivyConfigureTask.setUrl("
http://c2r7u07:8080/enterprise-updates/ivyconf.xml");
        } catch(MalformedURLException ex) {
            ivyConfigureTask.setFile(new File(ivyConfFile));
        }

        ivyConfigureTask.execute();

        IvyRetrieve ivyRetrieveTask = new IvyRetrieve();
        ivyRetrieveTask.setProject(project);
        ivyRetrieveTask.setTaskName("ivy:retrieve");
        ivyRetrieveTask.setPattern(javaLibraryDir +
"/[conf]/[artifact]-[revision].[ext]");
        ivyRetrieveTask.setConf("*");
        ivyRetrieveTask.execute();

        task.log("[RESOLVE DEPENDENCIES] Finished resolving dependencies");

For an example of my problems, IvyConfigure doesnt seem to exist any more?
Any and all tips are greatly appreciated.

Thanks
troy