import-bot (20211) [Avatar] Offline
#1
[Originally posted by mpatzak]

Hi,

i just downloaded the sampelapp from mannings and startet the masterbuild
default target.

I got an build failed, because
Building AntBook - Custom Ant Tasks
taskdef:
Building taskdef descriptors
failed.

After a lot of stuff from the taskdef-target i received this error:

java.lang.NoClassDefFoundError: org/apache/log4j/Category
at xdoclet.util.Log.getCategory(Log.java:22)
at xdoclet.DocletTask.execute(DocletTask.java:22smilie
at org.apache.tools.ant.Task.perform(Task.java:319)
at org.apache.tools.ant.Target.execute(Target.java:309)
at org.apache.tools.ant.Target.performTasks(Target.java:336)
at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
at org.apache.tools.ant.Project.executeTargets(Project.java:1250)
at
org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:302)
at
org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:119)
BUILD FAILED


Does anybody know why?

Matthias
import-bot (20211) [Avatar] Offline
#2
Re: Build error in sample app
[Originally posted by erikhatcher]

You'll need the Log4j libraries in ANT_HOME/lib. But your best bet would be
to download a project
that derived from the one we built for the book. You can find it at http://
www.ehatchersolutions.com/JavaDevWithAnt
maarten (1) [Avatar] Offline
#3
Re: Build error in sample app
Erik,

Can you explain WHY we need the log4j jar-files in the
ant/lib directory ?

Shouldn't it be sufficient to have the jar-files from
${basedir}/lib/jakarta-log4j-1.1.3/dist/lib/
in the classpath ?

Thanks