You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Morgan Delagrange <md...@yahoo.com> on 2003/01/17 18:37:27 UTC

[Jelly] ant and html tags still broken in GUMP

Hey all,

The fact that the HTML tags are broken doesn't impact
any other projects, although it would probably be a
kindness to Xerces and/or nekohtml to figure out what
the problem is.

The Ant tags, on the other hand, are direct
dependencies of three other builds, and indirectly
they are a dependency for Maven.  Here are the
relevant threads IIRC:

 
http://marc.theaimsgroup.com/?t=104201640700003&r=1&w=2
 
http://marc.theaimsgroup.com/?t=104162268400007&r=1&w=2

I've been trying to reproduce these ant and html
taglib errors in Maven, but it's a PITA because
beanutils, ant, and xerces (some of the apparent
culprits) are also Maven dependencies and are not
completely isolated from the build.

James, any further thoughts on the problem with the
ant taglib?  I'll keep trying to get Maven to cough up
an error.

- Morgan

=====
Morgan Delagrange
http://jakarta.apache.org/taglibs
http://jakarta.apache.org/commons
http://axion.tigris.org
http://jakarta.apache.org/watchdog

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [Jelly] ant and html tags still broken in GUMP

Posted by Stefan Bodewig <bo...@apache.org>.
On 20 Jan 2003, Stefan Bodewig <bo...@apache.org> wrote:
> On Mon, 20 Jan 2003, James Strachan <ja...@yahoo.co.uk>

>> The Jelly AntTag used to check that a tag name was an Ant Task
>> by calling the following...
>>
>> project.getTaskDefinitions().containsKey( tagName );
> 
> Do you get a different result if you use contains instead of
> containsKey?

No, I don't know how you should have done that either ;-)

Supposed to be fixed in CVS HEAD now.

Stefan

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [Jelly] ant and html tags still broken in GUMP

Posted by Stefan Bodewig <bo...@apache.org>.
On Mon, 20 Jan 2003, James Strachan <ja...@yahoo.co.uk>
wrote:
> From: "Stefan Bodewig" <bo...@apache.org>
>> On Mon, 20 Jan 2003, James Strachan <ja...@yahoo.co.uk>
>> > just passing on my observation that behaviour changed when I
>> > switched Ant versions.
>>
>> But are you using build.sysclasspath=only as well in your
>> experiments?
> 
> I'm not sure I understand how this relates to running Ant with
> forked JVMs running the JUnit test cases;

If you use nested <classpath> in <junit>, they'll get ignored - if
build.sysclasspath=only.

> this has always been a problematic area for me in the past. e.g. if
> you want to use a different version of an XML parser than the one
> Ant uses etc.

Different issue, solution includeantruntime=false.

>> > The Jelly AntTag used to check that a tag name was an Ant Task by
>> > calling the following...
>> >
>> > project.getTaskDefinitions().containsKey( tagName );

Do you get a different result if you use contains instead of
containsKey?  I see that AntTaskTable only overrides contains (and
will fix that shortly).

> I can't remember all the details, but I remember Maven folks using a
> tree of class loaders to prevent Maven, Ant or maven plugins from
> polluting the system class loader.

Yes.  Having a clean classloader hierarchy is great.  Unfortunately we
can't do it in Ant as easily for backwards compatibility reasons.  But
we are improving that situation.

> Using a single system class loader sounds like a problem as
> Ant/JUnit would pollute it wouldn't they?

This only happens with the specific build.sysclasspath setting - which
is necessary for an environment like Gumo but probably completely
unused otherwise.

As Gump needs complete control over all classes that you load, it can
only build the classpath upfront and force you to use it by allowing
only the system classloader.

Stefan

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [Jelly] ant and html tags still broken in GUMP

Posted by James Strachan <ja...@yahoo.co.uk>.
From: "Stefan Bodewig" <bo...@apache.org>
> On Mon, 20 Jan 2003, James Strachan <ja...@yahoo.co.uk>
> > just passing on my observation that behaviour changed when I
> > switched Ant versions.
>
> But are you using build.sysclasspath=only as well in your experiments?

I'm not sure I understand how this relates to running Ant with forked JVMs
running the JUnit test cases; this has always been a problematic area for me
in the past. e.g. if you want to use a different version of an XML parser
than the one Ant uses etc.


> > Did you run the tests after my patch to Jelly and they still failed?
>
> I'll tell you, as soon as Xerces-J compiles again 8-)

:-)


> > The Jelly AntTag used to check that a tag name was an Ant Task by
> > calling the following...
> >
> > project.getTaskDefinitions().containsKey( tagName );
>
> I'll look into it, there've been a bunch of changes in that area in
> CVS HEAD.

My guess was that the getTaskDefinitions() is now created lazily as tasks
are created, or something like that. I've no idea if thats true or not :-)


> > (rather than Maven which has a very strict hierarchial class loader
> > tree)
>
> Does Maven have the equivalent of Ant's build.sysclasspath flag?  I
> think this will be a must if we want to use Maven inside Gump.
>
> When you run Ant inside Gump, things are usually pretty easy.  The
> only classloader you have is the system classloader.

Maven has a slightly different mechanism - you tell it exactly the jars to
use using a version ID. You can also overload where the jars live (or just
make your own jar repository). So I think the same control is available,
just in a different way.

I can't remember all the details, but I remember Maven folks using a tree of
class loaders to prevent Maven, Ant or maven plugins from polluting the
system class loader. Using a single system class loader sounds like a
problem as Ant/JUnit would pollute it wouldn't they?

James
-------
http://radio.weblogs.com/0112098/

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [Jelly] ant and html tags still broken in GUMP

Posted by Stefan Bodewig <bo...@apache.org>.
On Mon, 20 Jan 2003, James Strachan <ja...@yahoo.co.uk>
wrote:
> From: "Stefan Bodewig" <bo...@apache.org>
>> On Sat, 18 Jan 2003, James Strachan <ja...@yahoo.co.uk>
>> wrote:
>>
>> > Its an Ant issue.
>>
>> I doubt so, more probably a classloader issue.
> 
> Could be. I could reproduce the bug by switching the Maven build
> from Ant 1.5.1 to CVS HEAD, so figured it was Ant related. I wasn't
> trying to finger point or anything,

That wasn't my interpretation either, don't worry.

> just passing on my observation that behaviour changed when I
> switched Ant versions.

But are you using build.sysclasspath=only as well in your experiments?

> Did you run the tests after my patch to Jelly and they still failed?

I'll tell you, as soon as Xerces-J compiles again 8-)

> The Jelly AntTag used to check that a tag name was an Ant Task by
> calling the following...
> 
> project.getTaskDefinitions().containsKey( tagName );

I'll look into it, there've been a bunch of changes in that area in
CVS HEAD.

> (rather than Maven which has a very strict hierarchial class loader
> tree)

Does Maven have the equivalent of Ant's build.sysclasspath flag?  I
think this will be a must if we want to use Maven inside Gump.

When you run Ant inside Gump, things are usually pretty easy.  The
only classloader you have is the system classloader.

Stefan

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [Jelly] ant and html tags still broken in GUMP

Posted by James Strachan <ja...@yahoo.co.uk>.
From: "Stefan Bodewig" <bo...@apache.org>
> On Sat, 18 Jan 2003, James Strachan <ja...@yahoo.co.uk>
> wrote:
>
> > Its an Ant issue.
>
> I doubt so, more probably a classloader issue.

Could be. I could reproduce the bug by switching the Maven build from Ant
1.5.1 to CVS HEAD, so figured it was Ant related. I wasn't trying to finger
point or anything, just passing on my observation that behaviour changed
when I switched Ant versions.


> > I can run the tests using CVS HEAD of Maven with the current
> > dependencies and the tests work fine;
>
> I run Gump with Ant's 1.5 branch and the tests fail.  Unless we've
> introduced the same bug in both branches, it is probably not an Ant
> problem.

Did you run the tests after my patch to Jelly and they still failed? The
tests work fine for me in Maven and Ant.


> In case you find that it *is* an Ant problem, we (us Ant developers)
> would love to learn about it 8-)

:-)

The Jelly AntTag used to check that a tag name was an Ant Task by calling
the following...

project.getTaskDefinitions().containsKey( tagName );

The behaviour of the above seemed to change - it returned true for Ant 1.5.1
and false for CVS HEAD. Note this was all tested inside Maven with the unit
tests running in a spawned JVM.

I modified the code of AntTag to just go ahead and try create the Task
anyways - and if that returned null then assume its not a Task.

Having said all that, when running the unit tests inside Ant (rather than
Maven which has a very strict hierarchial class loader tree) the tests don't
seem to run properly (as Morgan noted on this list) though the tests do pass
correctly (even though they're not working :-).

So I think there is some class loading issue with running the Ant unit tests
inside Ant - am looking into it...

James
-------
http://radio.weblogs.com/0112098/

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [Jelly] ant and html tags still broken in GUMP

Posted by Stefan Bodewig <bo...@apache.org>.
On Sat, 18 Jan 2003, James Strachan <ja...@yahoo.co.uk>
wrote:

> Its an Ant issue.

I doubt so, more probably a classloader issue.

> I can run the tests using CVS HEAD of Maven with the current
> dependencies and the tests work fine;

I run Gump with Ant's 1.5 branch and the tests fail.  Unless we've
introduced the same bug in both branches, it is probably not an Ant
problem.

In case you find that it *is* an Ant problem, we (us Ant developers)
would love to learn about it 8-)

Stefan

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [Jelly] ant and html tags still broken in GUMP

Posted by James Strachan <ja...@yahoo.co.uk>.
From: "Morgan Delagrange" <md...@yahoo.com>
> --- James Strachan <ja...@yahoo.co.uk> wrote:
> > From: "Morgan Delagrange" <md...@yahoo.com>
> > > You were able to reproduce the error?  You're
> > further
> > > along than me.  The email threads above seem to
> > > suggest a problem between Ant and BeanUtils, but
> > when
> > > I try Maven with the the HEAD versions, Maven just
> > > silently exits with BUILD SUCCESSFUL.
> >
> > Try just changing the ant version to some made up
> > token (say 'dev') then
> > copying CVS HEAD builds of Ant into your local maven
> > repo as ant-dev.jar
> > (and ant-optional-dev.jar) and you should get the
> > same error.
>
> I finally zeroed in on it by using the Ant script (ran
> it once, replaced the ant libs with HEAD, and then ran
> it again with JAR downloading off).  It's kind of
> goofy that log.error(Exception) doesn't print out
> stack traces.  :P

Agreed. Its always suprised me that one.


> I noticed that in one place the AntTag class catches
> Throwable.  Is that intentional?  Throwable catches
> all sorts of important errors potentially unrelated to
> Jelly.  Shouldn't that be Exception or a specific set
> of Exceptions?

I forget now but I think the reasoning behind that was so that someone could
catch Throwable exceptions in Jelly scripts.


> Cool.  I just tried it with the Ant build, and it
> passes, although there was a block of error messages:
>
>     [junit] [ERROR] AntTag - -Class
> org.apache.commons.jelly.tags.junit.CaseTag

I get the same, irrespectively of the Ant version I try (HEAD or 1.5.1). Am
a little stumped. Most of my testing up to now has been inside Maven. This
could be a class loader problem when using Ant, as Stefan mentioned.  Though
at least the tests don't actually fail, so it shouldn't break the Gump build
:-)

James
-------
http://radio.weblogs.com/0112098/

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [Jelly] ant and html tags still broken in GUMP

Posted by Morgan Delagrange <md...@yahoo.com>.
--- James Strachan <ja...@yahoo.co.uk> wrote:
> From: "Morgan Delagrange" <md...@yahoo.com>
> > You were able to reproduce the error?  You're
> further
> > along than me.  The email threads above seem to
> > suggest a problem between Ant and BeanUtils, but
> when
> > I try Maven with the the HEAD versions, Maven just
> > silently exits with BUILD SUCCESSFUL.
> 
> Try just changing the ant version to some made up
> token (say 'dev') then
> copying CVS HEAD builds of Ant into your local maven
> repo as ant-dev.jar
> (and ant-optional-dev.jar) and you should get the
> same error.

I finally zeroed in on it by using the Ant script (ran
it once, replaced the ant libs with HEAD, and then ran
it again with JAR downloading off).  It's kind of
goofy that log.error(Exception) doesn't print out
stack traces.  :P

I noticed that in one place the AntTag class catches
Throwable.  Is that intentional?  Throwable catches
all sorts of important errors potentially unrelated to
Jelly.  Shouldn't that be Exception or a specific set
of Exceptions?

> 
> I've just checked in a fix which I'm hoping will fix
> the gump builds.
> Fingers crossed.
>
> James

Cool.  I just tried it with the Ant build, and it
passes, although there was a block of error messages:

    [junit] [ERROR] AntTag - -Class
org.apache.commons.jelly.tags.junit.CaseTag
doesn't support the nested "property" element.
    [junit] [ERROR] AntTag - -Class
org.apache.commons.jelly.tags.junit.CaseTag
doesn't support the nested "property" element.
    [junit] [ERROR] AntTag - -Class
org.apache.commons.jelly.tags.junit.CaseTag
doesn't support the nested "ant" element.
    [junit] [ERROR] AntTag - -Class
org.apache.commons.jelly.tags.junit.CaseTag
doesn't support the nested "property" element.
    [junit] [ERROR] AntTag - -Class
org.apache.commons.jelly.tags.junit.CaseTag
doesn't support the nested "ant" element.
    [junit] [ERROR] AntTag - -Class
org.apache.commons.jelly.tags.junit.CaseTag
doesn't support the nested "property" element.
    [junit] [ERROR] AntTag - -Class
org.apache.commons.jelly.tags.junit.CaseTag
doesn't support the nested "ant" element.
    [junit] [ERROR] AntTag - -Class
org.apache.commons.jelly.tags.junit.CaseTag
doesn't support the nested "property" element.
    [junit] [ERROR] AntTag - -Class
org.apache.commons.jelly.tags.junit.CaseTag
doesn't support the nested "mkdir" element.
    [junit] [ERROR] AntTag - -Class
org.apache.commons.jelly.tags.junit.CaseTag
doesn't support the nested "copy" element.
    [junit] [ERROR] AntTag - -Class
org.apache.commons.jelly.tags.junit.CaseTag
doesn't support the nested "delete" element.
    [junit] [ERROR] AntTag - -Class
org.apache.commons.jelly.tags.junit.CaseTag
doesn't support the nested "mkdir" element.
    [junit] [ERROR] AntTag - -Class
org.apache.commons.jelly.tags.junit.CaseTag
doesn't support the nested "filterset" element.
    [junit] [ERROR] AntTag - -Class
org.apache.commons.jelly.tags.junit.CaseTag
doesn't support the nested "copy" element.
    [junit] [ERROR] AntTag - -Class
org.apache.commons.jelly.tags.junit.CaseTag
doesn't support the nested "delete" element.
    [junit] [ERROR] AntTag - -Class
org.apache.commons.jelly.tags.junit.CaseTag
doesn't support the nested "mkdir" element.
    [junit] [ERROR] AntTag - -Class
org.apache.commons.jelly.tags.junit.CaseTag
doesn't support the nested "parallel" element.
    [junit] [ERROR] AntTag - -Class
org.apache.commons.jelly.tags.junit.CaseTag
doesn't support the nested "delete" element.
    [junit] [ERROR] AntTag - -Class
org.apache.commons.jelly.tags.junit.CaseTag
doesn't support the nested "mkdir" element.
    [junit] [ERROR] AntTag - -Class
org.apache.commons.jelly.tags.junit.CaseTag
doesn't support the nested "filterset" element.
    [junit] [ERROR] AntTag - -Class
org.apache.commons.jelly.tags.junit.CaseTag
doesn't support the nested "parallel" element.
    [junit] [ERROR] AntTag - -Class
org.apache.commons.jelly.tags.junit.CaseTag
doesn't support the nested "delete" element.
    [junit] [ERROR] AntTag - -Class
org.apache.commons.jelly.tags.junit.CaseTag
doesn't support the nested "echo" element.
    [junit] [ERROR] AntTag - -Class
org.apache.commons.jelly.tags.junit.CaseTag
doesn't support the nested "echo" element.
    [junit] [ERROR] AntTag - -Class
org.apache.commons.jelly.tags.core.JellyTag
doesn't support the nested "taskdef" element.
    [junit] [ERROR] AntTag - -Class
org.apache.commons.jelly.tags.core.JellyTag
doesn't support the nested "nested" element.
    [junit] [ERROR] AntTag - -Class
org.apache.commons.jelly.tags.junit.CaseTag
doesn't support the nested "taskdef" element.
    [junit] [ERROR] AntTag - -Class
org.apache.commons.jelly.tags.junit.CaseTag
doesn't support the nested "nested" element.
    [junit] [ERROR] AntTag - -Class
org.apache.commons.jelly.tags.core.CatchTag
doesn't support the nested "nested" element.

- Morgan




=====
Morgan Delagrange
http://jakarta.apache.org/taglibs
http://jakarta.apache.org/commons
http://axion.tigris.org
http://jakarta.apache.org/watchdog

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [Jelly] ant and html tags still broken in GUMP

Posted by James Strachan <ja...@yahoo.co.uk>.
From: "Morgan Delagrange" <md...@yahoo.com>
> You were able to reproduce the error?  You're further
> along than me.  The email threads above seem to
> suggest a problem between Ant and BeanUtils, but when
> I try Maven with the the HEAD versions, Maven just
> silently exits with BUILD SUCCESSFUL.

Try just changing the ant version to some made up token (say 'dev') then
copying CVS HEAD builds of Ant into your local maven repo as ant-dev.jar
(and ant-optional-dev.jar) and you should get the same error.

I've just checked in a fix which I'm hoping will fix the gump builds.
Fingers crossed.

James
-------
http://radio.weblogs.com/0112098/

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [Jelly] ant and html tags still broken in GUMP

Posted by Morgan Delagrange <md...@yahoo.com>.
--- James Strachan <ja...@yahoo.co.uk> wrote:
> From: "Morgan Delagrange" <md...@yahoo.com>
> > Hey all,
> >
> > The fact that the HTML tags are broken doesn't
> impact
> > any other projects, although it would probably be
> a
> > kindness to Xerces and/or nekohtml to figure out
> what
> > the problem is.
> >
> > The Ant tags, on the other hand, are direct
> > dependencies of three other builds, and indirectly
> > they are a dependency for Maven.  Here are the
> > relevant threads IIRC:
> >
> >
> >
>
http://marc.theaimsgroup.com/?t=104201640700003&r=1&w=2
> >
> >
>
http://marc.theaimsgroup.com/?t=104162268400007&r=1&w=2
> >
> > I've been trying to reproduce these ant and html
> > taglib errors in Maven, but it's a PITA because
> > beanutils, ant, and xerces (some of the apparent
> > culprits) are also Maven dependencies and are not
> > completely isolated from the build.
> >
> > James, any further thoughts on the problem with
> the
> > ant taglib?  I'll keep trying to get Maven to
> cough up
> > an error.
> 
> Its an Ant issue. I can run the tests using CVS HEAD
> of Maven with the
> current dependencies and the tests work fine; switch
> the Ant version from
> 1.5.1 to CVS HEAD and the tests fail. Am
> investigating further.
> 
> James

You were able to reproduce the error?  You're further
along than me.  The email threads above seem to
suggest a problem between Ant and BeanUtils, but when
I try Maven with the the HEAD versions, Maven just
silently exits with BUILD SUCCESSFUL.

- Morgan

=====
Morgan Delagrange
http://jakarta.apache.org/taglibs
http://jakarta.apache.org/commons
http://axion.tigris.org
http://jakarta.apache.org/watchdog

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [Jelly] ant and html tags still broken in GUMP

Posted by James Strachan <ja...@yahoo.co.uk>.
From: "Morgan Delagrange" <md...@yahoo.com>
> Hey all,
>
> The fact that the HTML tags are broken doesn't impact
> any other projects, although it would probably be a
> kindness to Xerces and/or nekohtml to figure out what
> the problem is.
>
> The Ant tags, on the other hand, are direct
> dependencies of three other builds, and indirectly
> they are a dependency for Maven.  Here are the
> relevant threads IIRC:
>
>
> http://marc.theaimsgroup.com/?t=104201640700003&r=1&w=2
>
> http://marc.theaimsgroup.com/?t=104162268400007&r=1&w=2
>
> I've been trying to reproduce these ant and html
> taglib errors in Maven, but it's a PITA because
> beanutils, ant, and xerces (some of the apparent
> culprits) are also Maven dependencies and are not
> completely isolated from the build.
>
> James, any further thoughts on the problem with the
> ant taglib?  I'll keep trying to get Maven to cough up
> an error.

Its an Ant issue. I can run the tests using CVS HEAD of Maven with the
current dependencies and the tests work fine; switch the Ant version from
1.5.1 to CVS HEAD and the tests fail. Am investigating further.

James
-------
http://radio.weblogs.com/0112098/

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>