Date: 2004-07-09T05:29:13
Editor: 212.34.160.69 <>
Wiki: Ant Wiki
Page: AntNewbies
URL: http://wiki.apache.org/ant/AntNewbies
no comment
Change Log:
------------------------------------------------------------------------------
@@ -66,3 +66,49 @@
be used to set a default value for this attribute for all javac tasks.
This is exactly what Answer #1 uses, you just don't need to write the compiler
adapter since somebody else has already done so for you.
+
+```Question#2,5``` It doesnt work... I don't find the Bug in my Script... :(
+
+No i tried as told with the Help from the Eclipse Page. I copied the directory
$ECLIPSE_JDT_HOME/plugins/org.eclipse.jdt.core_2.1.3 to
+$BUILD_PATH/compiler. I also tried to copy the jdtCompilerAdapter.jar to local
Directory, to $ANT_HOME/lib, and so on and it doesn't work.
+
+{{{
+<path id="classpath">
+ <pathelement path="${classpath}"/>
+ <pathelement location="${basedir}/compiler/jdtCompilerAdapter.jar"/>
+</path>
+<target name="buildSources">
+ <property name="build.compiler"
value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
+ <javac includes="**/*.java, *.java" srcdir="${dir.project.root}/src"
destdir="${dir.build}">
+ <classpath refid="classpath"/>
+ </javac>
+</target>
+
+}}}
+
+and all what i get is
+
+{{{
+BUILD FAILED
+~/ant/build.xml:62: Compiler Adapter 'org/eclipse/jdt/core/JDTCompilerAdapter'
can't be found.
+ at
org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.resolveClassName(CompilerAdapterFactory.java:167)
+ at
org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.getCompiler(CompilerAdapterFactory.java:131)
+ at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:935)
+ at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:764)
+ at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
+ at org.apache.tools.ant.Task.perform(Task.java:364)
+ at org.apache.tools.ant.Target.execute(Target.java:301)
+ at org.apache.tools.ant.Target.performTasks(Target.java:328)
+ at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
+ at org.apache.tools.ant.Project.executeTargets(Project.java:1063)
+ at org.apache.tools.ant.Main.runBuild(Main.java:632)
+ at org.apache.tools.ant.Main.startAnt(Main.java:183)
+ at org.apache.tools.ant.launch.Launcher.run(Launcher.java:197)
+ at org.apache.tools.ant.launch.Launcher.main(Launcher.java:56)
+Caused by: java.lang.ClassNotFoundException:
org/eclipse/jdt/core/JDTCompilerAdapter
+ at java.lang.Class.forName0(Native Method)
+ at java.lang.Class.forName(Class.java:141)
+ at
org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.resolveClassName(CompilerAdapterFactory.java:163)
+ ... 13 more
+
+}}}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]