Estou com o seguinte build.xml
<?xml version=“1.0” encoding=“ISO-8859-1”?>
<project name = “WorkFlow” default = “main” basedir = “.” >
<property environment = “env” />
<property name = "build.lib" value = "./WEB-INF/lib" />
<property name = "build.dir" value = "./WEB-INF/classes" />
<property name = "src.dir" value = "./WEB-INF/src" />
<property name = "servlet.jar" value = "${build.lib}/servlet-api.jar" />
<property name = "jsp.jar" value = "${build.lib}/jsp-api.jar" />
<property name = "war.file" value = "workflow" />
<property name = "war.file.name" value = "${war.file}.war" />
<property name = "jboss.home" value = "${env.JBOSS_HOME}" />
<property name = "deploy.dir" value = "${jboss.home}/server/default/deploy" />
<path id = "project.class.path" >
<pathelement path = "${build.lib}/commons-beanutils.jar" />
<pathelement path = "${build.lib}/commons-collections.jar" />
<pathelement path = "${build.lib}/commons-digester.jar" />
<pathelement path = "${build.lib}/commons-fileupload.jar" />
<pathelement path = "${build.lib}/commons-lang.jar" />
<pathelement path = "${build.lib}/commons-validator.jar" />
<pathelement path = "${build.lib}/jakarta-oro.jar" />
<pathelement path = "${build.lib}/struts.jar" />
<pathelement path = "${src.dir}" />
<pathelement path = "${servlet.jar}" />
<pathelement path = "${jsp.jar}" />
</path>
<target name = "clean" >
<delete dir = "${build.dir}" includeEmptyDirs = "true" />
</target>
<target name = "prep" depends = "clean" >
<mkdir dir = "${build.dir}" />
</target>
<target name = “compile” depends = “prep” >
<javac srcdir= “${src.dir}”
destdir="${build.dir}"
debug = “on”
deprecation = “on” >
<classpath refid = “project.class.path” />
</javac>
</target>
<target name = "cleanWebApp" >
<delete file = "${deploy.dir}/${war.file.name}" />
<delete dir = "${deploy.dir}/${war.file}" includeEmptyDirs="true" />
</target>
<target name = "war" depends = "cleanWebApp" >
<war warfile = "${war.file.name}" webxml = "./WEB-INF/web.xml">
<fileset dir = "./" includes = "*.*" exclude = "*.war, web.xml,
**/WEB-INF/**/*.*, **/project-files/**/*.*" />
<webinf dir = "./WEB-INF" includes = "**/*"
excludes="web.xml, **/*.jar, **/*.class" />
<classes dir = "${build.dir}" includes="**/*.properties" />
</war>
</target>
<target name = "deploy" depends = "war" >
<copy todir ="${deploy.dir}" >
<fileset dir= "./" includes = "${war.file.name}" />
</copy>
</target>
<target name = "main" depends = "clean, prep, cleanWebApp, compile, war" />
</project>
Executando no Eclipse da a seguinte mensagem:
[javac] BUILD FAILED: file:z:/website/totall/build.xml:42: Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK
Total time: 1 second
A váriavel de ambiente JAVA_HOME esta apontando para a instalação. Somente este erro é gerado quando executo dentro do Eclipse. Na linha de comando o mesmo build funciona.
O que esta sendo feito de errado ?
