L
Laura Schmidt
Hello,
I have a web project W, which uses a java library L. This "usage" is
based on the eclipse confguration: I just told eclipse that W uses L.
Since then, the java compiler finds the source files of L when compiling W.
I delpoy the web project as a war file using ant:
<target name="buildwar">
<war basedir="war" destfile="myproject.war"
webxml="war/WEB-INF/web.xml">
</war>
When I deploy this war file to a tomcat server, the class files of L are
missing.
I tried to resolve this by adding a symbolic link pointing from
$W/WEB-INF/classes to $L/classes. This worked, but after some rebuilds
this link was deleted somehow. I assume that the contents of
$w/WEB-INF/classes is deleted sometimes by some build procedures.
Then, I tried to add the dependency in the ant file:
<target name="buildwar">
<war ...>
<fileset dir="path/to/L/classes"/>
</war>
</target>
But this also didn't work.
Within the produced war file, the class files of L were in the root
directory. I believe that the class files should be placed into the
WEB-INF/classes directory of the war file.
However, this problem cannot be new and there must be a standard way to
do it. I would be glad if someone can tell me how to do it right.
Thanks
Laura
I have a web project W, which uses a java library L. This "usage" is
based on the eclipse confguration: I just told eclipse that W uses L.
Since then, the java compiler finds the source files of L when compiling W.
I delpoy the web project as a war file using ant:
<target name="buildwar">
<war basedir="war" destfile="myproject.war"
webxml="war/WEB-INF/web.xml">
</war>
When I deploy this war file to a tomcat server, the class files of L are
missing.
I tried to resolve this by adding a symbolic link pointing from
$W/WEB-INF/classes to $L/classes. This worked, but after some rebuilds
this link was deleted somehow. I assume that the contents of
$w/WEB-INF/classes is deleted sometimes by some build procedures.
Then, I tried to add the dependency in the ant file:
<target name="buildwar">
<war ...>
<fileset dir="path/to/L/classes"/>
</war>
</target>
But this also didn't work.
Within the produced war file, the class files of L were in the root
directory. I believe that the class files should be placed into the
WEB-INF/classes directory of the war file.
However, this problem cannot be new and there must be a standard way to
do it. I would be glad if someone can tell me how to do it right.
Thanks
Laura