Originally posted by srikanth venkata:
Hi i user ANT Script to compile a struts application. I user the same ANT script for building the EAR and deploying . Now my main problem is i user application specific jars in my EAR. These Application Specific jars contain both the java files and the class files. Now i think there will be ANT code for removing the java files from the jar file before building the EAR only. Please help me with the need ful.
Hello Srikanth,
Where you have written a code to create a jar file, there you have to write a statement to exclude java files.
In the above code, I am assuming that this build file includes two properties ${nameOfJar} for specifying the name of the distributable jar plus ${pathOfSourceFiles} for specifying the path of the source(.java) files
and this target has dependency on target 'compile-source' which will compile the java files.
**/*.java ensures that the java files in subdirectories are also excluded.
For more options of jar task
Click here