Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #19789

problem creating WAR file with ant

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!news.musoftware.de!wum.musoftware.de!news.karotte.org!news.space.net!news.m-online.net!.POSTED!not-for-mail
From Laura Schmidt <ls@mailinator.com>
Newsgroups comp.lang.java.programmer
Subject problem creating WAR file with ant
Date Sun, 18 Nov 2012 17:53:58 +0100
Organization (posted via) M-net Telekommunikations GmbH
Lines 40
Message-ID <k8b3pr$7k7$1@news.m-online.net> (permalink)
NNTP-Posting-Host ppp-188-174-14-80.dynamic.mnet-online.de
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-Trace news.m-online.net 1353257595 7815 188.174.14.80 (18 Nov 2012 16:53:15 GMT)
X-Complaints-To news@news.m-online.net
NNTP-Posting-Date Sun, 18 Nov 2012 16:53:15 +0000 (UTC)
User-Agent Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20120724 Iceowl/1.0b1 Icedove/3.0.11
Xref csiph.com comp.lang.java.programmer:19789

Show key headers only | View raw


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

Back to comp.lang.java.programmer | Previous | NextNext in thread | Find similar | Unroll thread


Thread

problem creating WAR file with ant Laura Schmidt <ls@mailinator.com> - 2012-11-18 17:53 +0100
  Re: problem creating WAR file with ant Arne Vajhøj <arne@vajhoej.dk> - 2012-11-18 12:01 -0500
    Re: problem creating WAR file with ant Laura Schmidt <ls@mailinator.com> - 2012-11-19 04:21 +0100
      Re: problem creating WAR file with ant Lew <lewbloch@gmail.com> - 2012-11-18 20:18 -0800
      Re: problem creating WAR file with ant Arne Vajhøj <arne@vajhoej.dk> - 2012-11-19 09:41 -0500

csiph-web