Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ant buildfile does not contain a javac task

I have build.xml file and I want to create Java project from Existing Ant Buildfile. But I have an error: Specified buildfile does not contain a javac task My file has simple structure:

<project>
     <target ...>
     </target>
     ...
</project>
like image 239
Heniek Avatar asked May 28 '12 08:05

Heniek


People also ask

What is Javac task?

Ant Javac task is used to compile Java source file. It scans source and destination directory to compile the source file. It only compiles if either . class is not present or . class is older than Java file.

What is includeAntRuntime in ant?

includeAntRuntime. Whether to include the Ant run-time libraries in the classpath. It is usually best to set this to false so the script's behavior is not sensitive to the environment in which it is run. No; defaults to yes , unless build.sysclasspath property is set.


1 Answers

Provide javac to your build.xml as below:

<javac srcdir="src" destdir="bin" />
like image 176
Puneet Pandey Avatar answered Sep 22 '22 08:09

Puneet Pandey