ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wellie W. Chao" <wc...@caraveltech.com>
Subject RE: 1.5b2 and TaskDefs 'override' warnings
Date Tue, 18 Jun 2002 23:09:44 GMT
I'm having this same problem with the added pain that it actually breaks
something (i.e. not just display of warnings). I have a feeling that the
problem relates to classloaders. How does one use the loaderRef
attribute? The documentation is a bit spare.

Excerpt from my build below:
-----
init:
Trying to override old definition of task ejbdoclet
Trying to override old definition of task webdoclet

support-lib:
    [mkdir] Created dir: /home/wchao/projects/shared/build/lib
     [copy] Copying 11 files to /home/wchao/projects/shared/build/lib

ejbdoclet:
    [mkdir] Created dir:
/home/wchao/projects/shared/build/gen-src/classes
[ejbdoclet] /home/wchao/projects/shared/build.xml:143: At least one
fileset must be specified
[ejbdoclet]     at
xjavadoc.ant.XJavadocTask.validateOptions(XJavadocTask.java:114)
[ejbdoclet]     at
xdoclet.DocletTask.validateOptions(DocletTask.java:361)
[ejbdoclet]     at
xdoclet.modules.ejb.EjbDocletTask.validateOptions(EjbDocletTask.java:107
)
[ejbdoclet]     at
xjavadoc.ant.XJavadocTask.execute(XJavadocTask.java:50)
[ejbdoclet]     at org.apache.tools.ant.Task.perform(Task.java)
[ejbdoclet]     at org.apache.tools.ant.Task.perform(Task.java)
[ejbdoclet]     at org.apache.tools.ant.Target.execute(Target.java)
[ejbdoclet]     at org.apache.tools.ant.Target.performTasks(Target.java)
[ejbdoclet]     at
org.apache.tools.ant.Project.executeTarget(Project.java)
[ejbdoclet]     at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java)
[ejbdoclet]     at org.apache.tools.ant.Task.perform(Task.java)
[ejbdoclet]     at org.apache.tools.ant.Target.execute(Target.java)
[ejbdoclet]     at org.apache.tools.ant.Target.performTasks(Target.java)
[ejbdoclet]     at
org.apache.tools.ant.Project.executeTarget(Project.java)
[ejbdoclet]     at
org.apache.tools.ant.Project.executeTargets(Project.java)
[ejbdoclet]     at org.apache.tools.ant.Main.runBuild(Main.java)
[ejbdoclet]     at org.apache.tools.ant.Main.start(Main.java)
[ejbdoclet]     at org.apache.tools.ant.Main.main(Main.java)

BUILD FAILED
/home/wchao/projects/shared/build.xml:143: Unexpected error
-----


Original message:
-----
Subject:  Re: 1.5b2 and TaskDefs 'override' warnings
From:     Stefan Bodewig <bodewig@apache.org>
Date:     2002-06-11 16:14:51

On Mon, 10 Jun 2002, Dominique Devienne <DDevienne@lgc.com> wrote:

> But isn't this a bug Stefan!?!?!

I don't think so.

The second <taskdef> will be loaded via a different classloader.  Some
people use static information or Singleton like stuff to hold state in
the tasks and they will want to know what's going on.

In general people will probably want to know when they override an
existing taskdef with a different one.  You won't get the message if
you use the same classloader in all taskdefs, which can be achieved
with 1.5beta2's new loaderref attribute.

We might decrease the logging level to verbose output only if the
classes are different but the class names are the same (i.e. the tasks
only differ in the classloader being used).

Stefan


--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message