You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Xavier Hanin <xa...@gmail.com> on 2007/12/19 16:16:29 UTC

Ivy jar packaging

Hi,

ATM Ivy is provided in the form of two jars: ivy.jar and ivy-core.jar. The
ivy-core.jar is basically the same as ivy.jar except that it doesn't contain
Ant related classes (mostly Ivy Ant tasks). This was introduced a long time
ago for IvyDE, as a workaround to a classloader issue when contributing
ivy.jar to ant classpath in eclipse.

The downside of this is that most people do not understand the difference
between the two, and I often see people putting both ivy.jar and
ivy-core.jar in ant/lib. Not that much a problem, until someone change only
one jar out of the two, which can lead to strange bugs difficult to diagnose
if ivy-core.jar is before ivy.jar in the classpath.

Moreover, in recent tests I've found that the eclipse ant classpath problem
was still present in some cases, and preferred to use an easy and
straightforward solution: configure ant classpath manually in eclipse to add
ivy.jar (or point to another ant home where ivy.jar is already present).

Thus I'm wondering if it wouldn't be easier to abandon ivy-core.jar, and
tell IvyDE users they have to configure their ant classpath manually IF they
want to use Ivy tasks in their ant build from eclipse (as they have to do
for any other custom ant tasks anyway).

WDYT?

Xavier
-- 
Xavier Hanin - Independent Java Consultant
http://xhab.blogspot.com/
http://ant.apache.org/ivy/
http://www.xoocode.org/

Re: Ivy jar packaging

Posted by Peter Reilly <pe...@gmail.com>.
+1 to remove ivy-core.jar

Peter

On Dec 19, 2007 3:16 PM, Xavier Hanin <xa...@gmail.com> wrote:
> Hi,
>
> ATM Ivy is provided in the form of two jars: ivy.jar and ivy-core.jar. The
> ivy-core.jar is basically the same as ivy.jar except that it doesn't contain
> Ant related classes (mostly Ivy Ant tasks). This was introduced a long time
> ago for IvyDE, as a workaround to a classloader issue when contributing
> ivy.jar to ant classpath in eclipse.
>
> The downside of this is that most people do not understand the difference
> between the two, and I often see people putting both ivy.jar and
> ivy-core.jar in ant/lib. Not that much a problem, until someone change only
> one jar out of the two, which can lead to strange bugs difficult to diagnose
> if ivy-core.jar is before ivy.jar in the classpath.
>
> Moreover, in recent tests I've found that the eclipse ant classpath problem
> was still present in some cases, and preferred to use an easy and
> straightforward solution: configure ant classpath manually in eclipse to add
> ivy.jar (or point to another ant home where ivy.jar is already present).
>
> Thus I'm wondering if it wouldn't be easier to abandon ivy-core.jar, and
> tell IvyDE users they have to configure their ant classpath manually IF they
> want to use Ivy tasks in their ant build from eclipse (as they have to do
> for any other custom ant tasks anyway).
>
> WDYT?
>
> Xavier
> --
> Xavier Hanin - Independent Java Consultant
> http://xhab.blogspot.com/
> http://ant.apache.org/ivy/
> http://www.xoocode.org/
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: Ivy jar packaging

Posted by Xavier Hanin <xa...@gmail.com>.
On 12/20/07, Gilles Scokart <gs...@gmail.com> wrote:
>
>
>
> > -----Original Message-----
> > From: Peter Reilly [mailto:peter.kitt.reilly@gmail.com]
> > Sent: jeudi 20 décembre 2007 10:34
> > To: Ant Developers List
> > Subject: Re: Ivy jar packaging
> >
> > On Dec 19, 2007 7:49 PM, Gilles Scokart <gs...@gmail.com> wrote:
> > > I'm confused.
> > > Is it really related to IvyDE or just to launching ant from eclipse?
> > > Also, If you don't put the the ivy ant task into the ant classpath,
> but only
> > > the core.  How does ant launched from eclipse find those tasks?
> > > I guess I miss something.
> > >
> > > Anyway, I think it is a good idea to simplify our main distribution.
> > > However, once we will have a clear published interface, I think we
> could
> > > further split the distribution in the maven repository.
> > Please no,
> > There is quite enough jars in ant at the moment, having a number of
> extra
> > ivy jars to make things work is not in my opinion a good idea.
> > Peter
>
> I was not talking about splitting the binary/source distribution.  I think
> we have to keep them simple, and I'm thus
> rather in favour of having a single ivy.jar.  And if we want to put it
> into the ant project, we can use this single jar.
>
> The idea that I proposed of splitting it further was only for the
> distribution that we have in the maven repository.
> Some users might want to have only the core some will use an ftp resolver,
> other will also require the ant tasks, etc.
> I think it could make sense to split that into individual jars when
> published in the maven repository.  That would allow
> the user to only get the class that he need.


I'm not sure I'd be in favor of such a split, some users will end up using
ivy-full.jar, other only some modules, which may end up in difficult class
versions issues difficult to diagnose. So IMO I'd stick with only one jar
until people starts complaining about Ivy jar size. But as you said this is
not something that should be addressed now, so there's no reason to start a
long debate on the pros and cons of both approaches :-)

Xavier

But that's not for now.  Before we can do that, we will have to agree on
> what is the API that we publish and for which
> we are willing to keep good backward compatibility.
>
> Gilles
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>
>


-- 
Xavier Hanin - Independent Java Consultant
http://xhab.blogspot.com/
http://ant.apache.org/ivy/
http://www.xoocode.org/

RE: Ivy jar packaging

Posted by Gilles Scokart <gs...@gmail.com>.

> -----Original Message-----
> From: Peter Reilly [mailto:peter.kitt.reilly@gmail.com]
> Sent: jeudi 20 décembre 2007 10:34
> To: Ant Developers List
> Subject: Re: Ivy jar packaging
> 
> On Dec 19, 2007 7:49 PM, Gilles Scokart <gs...@gmail.com> wrote:
> > I'm confused.
> > Is it really related to IvyDE or just to launching ant from eclipse?
> > Also, If you don't put the the ivy ant task into the ant classpath, but only
> > the core.  How does ant launched from eclipse find those tasks?
> > I guess I miss something.
> >
> > Anyway, I think it is a good idea to simplify our main distribution.
> > However, once we will have a clear published interface, I think we could
> > further split the distribution in the maven repository.
> Please no,
> There is quite enough jars in ant at the moment, having a number of extra
> ivy jars to make things work is not in my opinion a good idea.
> Peter

I was not talking about splitting the binary/source distribution.  I think we have to keep them simple, and I'm thus
rather in favour of having a single ivy.jar.  And if we want to put it into the ant project, we can use this single jar.

The idea that I proposed of splitting it further was only for the distribution that we have in the maven repository.
Some users might want to have only the core some will use an ftp resolver, other will also require the ant tasks, etc.
I think it could make sense to split that into individual jars when published in the maven repository.  That would allow
the user to only get the class that he need.

But that's not for now.  Before we can do that, we will have to agree on what is the API that we publish and for which
we are willing to keep good backward compatibility.

Gilles



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: Ivy jar packaging

Posted by Peter Reilly <pe...@gmail.com>.
On Dec 19, 2007 7:49 PM, Gilles Scokart <gs...@gmail.com> wrote:
> I'm confused.
> Is it really related to IvyDE or just to launching ant from eclipse?
> Also, If you don't put the the ivy ant task into the ant classpath, but only
> the core.  How does ant launched from eclipse find those tasks?
> I guess I miss something.
>
> Anyway, I think it is a good idea to simplify our main distribution.
> However, once we will have a clear published interface, I think we could
> further split the distribution in the maven repository.
Please no,
There is quite enough jars in ant at the moment, having a number of extra
ivy jars to make things work is not in my opinion a good idea.
Peter
>
> Gilles
>
> 2007/12/19, Xavier Hanin <xa...@gmail.com>:
>
> >
> > Hi,
> >
> > ATM Ivy is provided in the form of two jars: ivy.jar and ivy-core.jar. The
> > ivy-core.jar is basically the same as ivy.jar except that it doesn't
> > contain
> > Ant related classes (mostly Ivy Ant tasks). This was introduced a long
> > time
> > ago for IvyDE, as a workaround to a classloader issue when contributing
> > ivy.jar to ant classpath in eclipse.
> >
> > The downside of this is that most people do not understand the difference
> > between the two, and I often see people putting both ivy.jar and
> > ivy-core.jar in ant/lib. Not that much a problem, until someone change
> > only
> > one jar out of the two, which can lead to strange bugs difficult to
> > diagnose
> > if ivy-core.jar is before ivy.jar in the classpath.
> >
> > Moreover, in recent tests I've found that the eclipse ant classpath
> > problem
> > was still present in some cases, and preferred to use an easy and
> > straightforward solution: configure ant classpath manually in eclipse to
> > add
> > ivy.jar (or point to another ant home where ivy.jar is already present).
> >
> > Thus I'm wondering if it wouldn't be easier to abandon ivy-core.jar, and
> > tell IvyDE users they have to configure their ant classpath manually IF
> > they
> > want to use Ivy tasks in their ant build from eclipse (as they have to do
> > for any other custom ant tasks anyway).
> >
> > WDYT?
> >
> > Xavier
> > --
> > Xavier Hanin - Independent Java Consultant
> > http://xhab.blogspot.com/
> > http://ant.apache.org/ivy/
> > http://www.xoocode.org/
> >
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: Ivy jar packaging

Posted by Xavier Hanin <xa...@gmail.com>.
On 12/19/07, Gilles Scokart <gs...@gmail.com> wrote:
>
> I'm confused.
> Is it really related to IvyDE or just to launching ant from eclipse?
> Also, If you don't put the the ivy ant task into the ant classpath, but
> only
> the core.  How does ant launched from eclipse find those tasks?
> I guess I miss something.


The problem is the use of ant extraClasspath extension point in IvyDE (not
sure of the exact extension point name). This extension point allows plugins
to contribute to the ant classpath in eclipse, but only with a jar. The
problem is that when loading these classes, they first ask the plugin
classloader to load the class, so if the plugin actually has the Ivy ant
tasks in its classpath (and IvyDE requires ivy, so it has these classes if
it's not using ivy-core.jar) then the plugin classloader is used to load
these classes, BUT the plugin classloader has no access to the ant classes
themselves loaded in another classloader. So the workaround was to use
ivy-core.jar in IvyDE plugin classpath, and contribute ivy.jar as an ant
extra classpath entry. So if we stop providing ivy-core, we won't be able to
contribute ivy as an ant extra classpath entry, and people will have to
configure Ant classpath manually in eclipse even when they have IvyDE
installed.

Xavier

Anyway, I think it is a good idea to simplify our main distribution.
> However, once we will have a clear published interface, I think we could
> further split the distribution in the maven repository.
>
> Gilles
>
> 2007/12/19, Xavier Hanin <xa...@gmail.com>:
> >
> > Hi,
> >
> > ATM Ivy is provided in the form of two jars: ivy.jar and ivy-core.jar.
> The
> > ivy-core.jar is basically the same as ivy.jar except that it doesn't
> > contain
> > Ant related classes (mostly Ivy Ant tasks). This was introduced a long
> > time
> > ago for IvyDE, as a workaround to a classloader issue when contributing
> > ivy.jar to ant classpath in eclipse.
> >
> > The downside of this is that most people do not understand the
> difference
> > between the two, and I often see people putting both ivy.jar and
> > ivy-core.jar in ant/lib. Not that much a problem, until someone change
> > only
> > one jar out of the two, which can lead to strange bugs difficult to
> > diagnose
> > if ivy-core.jar is before ivy.jar in the classpath.
> >
> > Moreover, in recent tests I've found that the eclipse ant classpath
> > problem
> > was still present in some cases, and preferred to use an easy and
> > straightforward solution: configure ant classpath manually in eclipse to
> > add
> > ivy.jar (or point to another ant home where ivy.jar is already present).
> >
> > Thus I'm wondering if it wouldn't be easier to abandon ivy-core.jar, and
> > tell IvyDE users they have to configure their ant classpath manually IF
> > they
> > want to use Ivy tasks in their ant build from eclipse (as they have to
> do
> > for any other custom ant tasks anyway).
> >
> > WDYT?
> >
> > Xavier
> > --
> > Xavier Hanin - Independent Java Consultant
> > http://xhab.blogspot.com/
> > http://ant.apache.org/ivy/
> > http://www.xoocode.org/
> >
>



-- 
Xavier Hanin - Independent Java Consultant
http://xhab.blogspot.com/
http://ant.apache.org/ivy/
http://www.xoocode.org/

Re: Ivy jar packaging

Posted by Gilles Scokart <gs...@gmail.com>.
I'm confused.
Is it really related to IvyDE or just to launching ant from eclipse?
Also, If you don't put the the ivy ant task into the ant classpath, but only
the core.  How does ant launched from eclipse find those tasks?
I guess I miss something.

Anyway, I think it is a good idea to simplify our main distribution.
However, once we will have a clear published interface, I think we could
further split the distribution in the maven repository.

Gilles

2007/12/19, Xavier Hanin <xa...@gmail.com>:
>
> Hi,
>
> ATM Ivy is provided in the form of two jars: ivy.jar and ivy-core.jar. The
> ivy-core.jar is basically the same as ivy.jar except that it doesn't
> contain
> Ant related classes (mostly Ivy Ant tasks). This was introduced a long
> time
> ago for IvyDE, as a workaround to a classloader issue when contributing
> ivy.jar to ant classpath in eclipse.
>
> The downside of this is that most people do not understand the difference
> between the two, and I often see people putting both ivy.jar and
> ivy-core.jar in ant/lib. Not that much a problem, until someone change
> only
> one jar out of the two, which can lead to strange bugs difficult to
> diagnose
> if ivy-core.jar is before ivy.jar in the classpath.
>
> Moreover, in recent tests I've found that the eclipse ant classpath
> problem
> was still present in some cases, and preferred to use an easy and
> straightforward solution: configure ant classpath manually in eclipse to
> add
> ivy.jar (or point to another ant home where ivy.jar is already present).
>
> Thus I'm wondering if it wouldn't be easier to abandon ivy-core.jar, and
> tell IvyDE users they have to configure their ant classpath manually IF
> they
> want to use Ivy tasks in their ant build from eclipse (as they have to do
> for any other custom ant tasks anyway).
>
> WDYT?
>
> Xavier
> --
> Xavier Hanin - Independent Java Consultant
> http://xhab.blogspot.com/
> http://ant.apache.org/ivy/
> http://www.xoocode.org/
>