Title:
Ant: How to place resource files into bottom of package level structure?
Hello,
Have the following sample project structure:
Wrote an Ant build script which does this:
(1) Creates a build directory
(2) Compiles the
Java code into the build directory
(3) Packages the compiled code into a war file
(4) Moves the war file into $TOMCAT_HOME/webapps
Ant build script:
When I run this build script, it places the mysite.war file under $TOMCAT_HOME/webapps,
which, in turn, unpacks itself like this:
$TOMCAT_HOME/webapps/mysite/WEB-INF/classes/example/HelloWorld.class
What I need is the english.properties (located inside the resources folder) to be parallel with HelloWorld.class.
Am manually doing this by explicitly putting in the directory name inside my compile target:
As you can see this will introduce problems because I am setting the directory structure manually.
What would happen if my package changed to com.mycompany?
I would need the english.properties files to be placed like this:
$TOMCAT_HOME/webapps/mysite/WEB-INF/classes/com/mycompany/english.properties
I have already tried using an asterisk wildcard:
But, that broke the build (causing errors while running Ant)!
Would appreciate it if someone can help me with this issue.
Happy programming...