ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicola Ken Barozzi" <nicola...@apache.org>
Subject Can't put optional tasks jar out of ant/lib
Date Sat, 06 Apr 2002 14:56:11 GMT
I'm trying to use the JDepend optional task without having to put the
jdepend.jar in the ant/lib dir.

So I have (yesterday's CVS version of jar):

./tools/ant/lib/ant.jar
./tools/ant/lib/optional.jar

./tools/tmp/tasks.properties (containing the task definition)

./tools/other/lib/jdepend.jar

I write:

    <!-- define the tasks found in cents -->
    <taskdef file="./tools/tmp/tasks.properties">
     <classpath>
      <fileset dir="./tools">
        <include name="**/*.jar"/>
      </fileset>
     </classpath>
    </taskdef>

But in verbose mode it says:

  [taskdef] Loading definitions from file
C:\jbprojects\jakarta-poi\tools\tmp\ta
sks.properties

BUILD FAILED
C:\jbprojects\jakarta-poi\build.xml:68: taskdef class
org.apache.tools.ant.taskd
efs.optional.jdepend.JDependTask cannot be found
        at
org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:189)

        at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:167)
        at org.apache.tools.ant.Task.perform(Task.java:313)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:334)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1176)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1118)
        at org.apache.tools.ant.Main.runBuild(Main.java:573)
        at org.apache.tools.ant.Main.start(Main.java:179)
        at org.apache.tools.ant.Main.main(Main.java:201)
--- Nested Exception ---
java.lang.NoClassDefFoundError: jdepend/xmlui/JDepend
        at java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:1576)
        at java.lang.Class.getDeclaredConstructors(Class.java:1140)
        at
org.apache.tools.ant.AntClassLoader.initializeClass(AntClassLoader.ja
va:478)
        at
org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:180)

        at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:167)
        at org.apache.tools.ant.Task.perform(Task.java:313)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:334)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1176)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1118)
        at org.apache.tools.ant.Main.runBuild(Main.java:573)
        at org.apache.tools.ant.Main.start(Main.java:179)
        at org.apache.tools.ant.Main.main(Main.java:201)

If I put jdepend.jar in ant/lib it works but I don't want to do it.
Also changeing the script is not an option because some use build.xml
directly with ant called via java.

Any clues?

Thanks in advance :-)

--
Nicola Ken Barozzi                   nicolaken@apache.org
            - verba volant, scripta manent -
   (discussions get forgotten, just code remains)
---------------------------------------------------------------------


--
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