Stephan,

Here is a copy of my very recent email to the list describing the steps required
to have Ant 1.5 as a dependency. The problem you are having should go away if
you follow the steps below.

Even following the steps below, you will still have a few issues with the
plugins using ant tasks that don't quite work the same way in Ant 1.5. I will be
checking in all the required changes soon, after I figure out how to deal with
commons-grant.

-Peter

Begin email
----------------------
Ok, finally have figured out the requirements to move to Ant 1.5 as a
dependency. It was trickier than I first thought due to some wacky classloading
and useless stack traces.

1) change jars.list to refer to ant 1.5 jars, including xerces 2.0.2 and
xml-apis-1.0-b2. These are the jars distributed with ant official release. If
you try xerces 2.0.0 or xml-apis-2.0.2, then Ant don't work. Also need to point
to a grant jar that has no Ant classes in it. ( see below )

2) change forehead.conf to refer to ant-1.5.jar, ant-optional-1.5.jar,
xml-apis-1.0-b2 and xerces-2.0.2

3) Remove AntClassLoader.class and AntClassLoader$ResourceEnumeration.class from
commons-grant-1.0-b1.jar
Took me a while to figure that out. Thanks Bob.

However, I don't know the correct way to fix this going forward.

We need a grant jar without the Ant classes in it. We may not even need grant at
all, but I need advice on how to remove the property wrapper stuff or what that
actually does.

Then we can decide what the grant dependency is.

4) Change dependencies in project.xml as follows:

ant-1.4.1 --> ant-1.5
ant-optional-1.4.1 --> ant-optional-1.5
( maybe remove grant )
xml-apis-2.0.2 --> xml-apis-1.0-b2

This last one is required to do, or else Ant fails. 1.0-b2 contains additional
classes and I never have heard of a 2.0.2 release of xml-apis anyways.

There are also a few minor task changes that are needed ( that I will make ) and
we should be good to go with Ant 1.5.

Waiting on some advice about what to do with grant and having the ant xerces and
xml-api jars put in the repo...

-Peter



----- Original Message -----
From: "Stephan Merker" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 12, 2002 10:03 AM
Subject: maven b5 and ant 1.5


> Hello,
>
> I'm trying to get maven b5 working together with ant 1.5.
> However, I always get an exception like this:
>
> E:\maven\jelly>maven
>  __  __
> |  \/  |__ Jakarta _ ___
> | |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
> |_|  |_\__,_|\_/\___|_||_|   v. 1.0-b5-dev
>
> commons-jelly (commons-jelly) 1.0-dev
> E:\maven\jelly
>
>     [available] DEPRECATED - <available> used to override an existing
> property.
>   Build file should not reuse the same property name for different values.
>     [available] DEPRECATED - <available> used to override an existing
> property.
>   Build file should not reuse the same property name for different values.
>     [taskdef] [ERROR] java.lang.reflect.InvocationTargetException
>     [taskdef] [ERROR]   at
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native M
> ethod)
>     [taskdef] [ERROR]   at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMet
> hodAccessorImpl.java:39)
>     [taskdef] [ERROR]   at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(Deleg
> atingMethodAccessorImpl.java:25)
>     [taskdef] [ERROR]   at java.lang.reflect.Method.invoke(Method.java:324)
>     [taskdef] [ERROR]   at
> com.werken.forehead.Forehead.run(Forehead.java:543)
>     [taskdef] [ERROR]   at
> com.werken.forehead.Forehead.main(Forehead.java:573)
>     [taskdef] [ERROR] Caused by: java.lang.NoSuchMethodError:
> org.apache.tools.a
> nt.AntClassLoader.getClasspath()Ljava/lang/String;
>     [taskdef] [ERROR]   at
> org.apache.tools.ant.Project.addTaskDefinition(Projec
> t.java:897)
>     [taskdef] [ERROR]   at
> org.apache.tools.ant.taskdefs.Taskdef.addDefinition(T
> askdef.java:82)
>     [taskdef] [ERROR]   at
> org.apache.tools.ant.taskdefs.Definer.addDefinition(D
> efiner.java:232)
>     [taskdef] [ERROR]   at
> org.apache.tools.ant.taskdefs.Definer.execute(Definer
> .java:162)
>     [taskdef] [ERROR]   at org.apache.tools.ant.Task.perform(Task.java:317)
>     [taskdef] [ERROR]   at
> org.apache.commons.jelly.tags.ant.AntTag.doTag(AntTag
> .java:185)
>     [taskdef] [ERROR]   at
> org.apache.commons.jelly.impl.DynaTagScript.run(DynaT
> ...
>
> What I did was:
> - get a fresh checkout of maven sources
> - changed the dependencies to ant 1.5
> - modified bin/forehead.conf to load ant 1.5
> - bootstraped maven
>
> The exception occurs on the taskdef tag in the changelog plugin. Using
> maven -vX tells me that it was when the taskdef was loaded the second time
> (always using the ant classloader). In ant 1.4.1, the method
> AntClassLoader.getClasspath() did not exist, but I'm pretty sure that there
> is no ant 1.4.1 in the classpath. I even rebuild the jelly project but it
> didn't help.
>
> Do you have any idea, what I could do?
>
> Thanks,
> Stephan
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to