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 Dave Brosius <db...@mebigfatguy.com> on 2009/08/21 18:09:46 UTC

Ivy and jar references in applets/jnlp, etc.

Greetings, 

    I work on a big legacy ant project that has jars checked in to source control. I am investigating what it would take to stop doing that, and looking at ivy. The switch over to use ivy seems pretty trivial, although perhaps time consuming given the size of the project. But here's a question that hopefully others have thought about - resolved.

    We have more than a few <applet tag>/<jnlp>'s etc that reference jar files by name. In the past we just checked in jar files without version numbers so for instance, we had commons-lang.jar, and when a new version came out, we just updated this jar in source control, again, by stripping the version number from the jar file name.

Now when moving to maven or ivy, this seems more problematic. Perhaps i'm not seeing the correct solution, but ivy uses version number'ed names as gotten from the repo, and so anytime we want to upgrade our jar versions, we've got to go looking for all the references to them in <archive> tags, or jnlp files, or who knows where else. The chances are high that we will forget to update references some where.

What is the preferred solution for this? I really don't want to have to do that any time we upgrade jar files.



Re: Ivy and jar references in applets/jnlp, etc.

Posted by Matt Benson <gu...@yahoo.com>.

--- On Fri, 8/21/09, Dave Brosius <db...@mebigfatguy.com> wrote:

> From: Dave Brosius <db...@mebigfatguy.com>
> Subject: Ivy and jar references in applets/jnlp, etc.
> To: ivy-user@ant.apache.org
> Date: Friday, August 21, 2009, 11:09 AM
> Greetings, 
> 
>     I work on a big legacy ant project that has
> jars checked in to source control. I am investigating what
> it would take to stop doing that, and looking at ivy. The
> switch over to use ivy seems pretty trivial, although
> perhaps time consuming given the size of the project. But
> here's a question that hopefully others have thought about -
> resolved.
> 
>     We have more than a few <applet
> tag>/<jnlp>'s etc that reference jar files by name.
> In the past we just checked in jar files without version
> numbers so for instance, we had commons-lang.jar, and when a
> new version came out, we just updated this jar in source
> control, again, by stripping the version number from the jar
> file name.
> 
> Now when moving to maven or ivy, this seems more
> problematic. Perhaps i'm not seeing the correct solution,
> but ivy uses version number'ed names as gotten from the
> repo, and so anytime we want to upgrade our jar versions,
> we've got to go looking for all the references to them in
> <archive> tags, or jnlp files, or who knows where
> else. The chances are high that we will forget to update
> references some where.
> 
> What is the preferred solution for this? I really don't
> want to have to do that any time we upgrade jar files.
> 
> 

Dave,
  I don't have any specific experience with this requirement, but I would plan to generate those files from templates and look into the various tasks Ivy provides to get the actual name of the artifact associated with a particular org/module in the dependencies of your resolved project.  It might be a large task:  e.g. you might find yourself parsing xml generated by the ivy:artifactreport task, or something equally time-consuming... but IMHO a worthwhile investment were I in your position.

"Why spend five minutes doing what you can spend five years of your life automating?" - Terence Parr, Ph.D.

-Matt

>