Just sounds like the <war> task is a little messed up. Feel free to fix locally and submit a patch. :)
Eddie
Scott Semyan wrote:
Further clarification:
My war target from my build.xml looks like this:
<target name="war" description="Build a compressed WAR file that can be deployed to an application container"> <property name="archive.dir" value="${webapp.dir}/.."/>
<!-- this does *not* exclude source from the archive --> <war destfile="${archive.dir}/${contextPath}.war" webxml="${webapp.dir}/WEB-INF/web.xml"> <fileset dir="${webapp.dir}"> <exclude name="WEB-INF/src/**"/> </fileset> </war> </target>
And I do have a file WEB-INF/web.xml in my project.
-----Original Message-----
From: Scott Semyan Sent: Wednesday, March 16, 2005 3:21 PM
To: Beehive Developers
Subject: RE: Proper way to build a webapp from a dist?
I've built a task to do the copy but now I am getting this message from my build:
[war] Building war: D:\Proj\Beehive_projects\PetList.war [war] Warning: selected war files include a WEB-INF/web.xml which will be ignored (please use webxml attribute to war task)
And this message from Apache: INFO: Installing web application at context path /PetList from URL file:D:/Apache/Tomcat_5_0/webapps/PetList Mar 16, 2005 3:11:22 PM org.apache.catalina.startup.ContextConfig applicationConfig INFO: Missing application web.xml, using defaults only StandardEngine[Catalina].StandardHost[localhost].StandardContext[/PetLis t]
Then my app doesn't work.
Any ideas?
-----Original Message----- From: Jeremiah Johnson Sent: Tuesday, March 15, 2005 9:28 PM To: Beehive Developers Subject: RE: Proper way to build a webapp from a dist?
An alternative to hitting the Tomcat console for deployment is to copy the generated war to $CATALINA_HOME/webapps. For example, in the case of the Pet Store, you may do the following:
ant build war mv ../../../petstoreWeb.war $CATALINA_HOME/webapps
Then wait a few seconds for the deployment activities to complete before pointing your browser at http://localhost:8080/petstoreWeb/
For your own applications, you may want to write deploy and undeploy targets appropriate to your application server. As for the Pet Store, the plan (as far as I know) is to leave off the deploy and undeploy targets for now as war files can be consumed, as is, by most application servers.
- jeremiah
-----Original Message----- From: Scott Semyan Sent: Tuesday, March 15, 2005 6:37 PM To: Beehive Developers Subject: RE: Proper way to build a webapp from a dist?
Got it working now. Thanks. It looks like there is no deploy target anymore. This is too bad since hitting the web page everytime you want to deploy is kind of a pain...
Scott
-----Original Message----- From: Jeremiah Johnson Sent: Tuesday, March 15, 2005 4:33 PM To: Beehive Developers Subject: RE: Proper way to build a webapp from a dist?
I believe that this is what is currently the proper way:
1. Copy build.properties and build.xml from <BEEHIVE_HOME>/samples/netui-blank/WEB-INF/src to your WEB-INF/src directory (where <BEEHIVE_HOME> is the root of your distribution). 2. Edit your copy of build.properties to correctly set the value of beehive.home=<BEEHIVE_HOME> (again, where <BEEHIVE_HOME> is the root of your distribution). You can use beehive.home=${os.BEEHIVE_HOME} if you have the BEEHIVE_HOME environment variable set to the root of the distribution. 3. Edit your copy of build.xml to set the contextPath property. 4. ant build war
In the case of the Pet Store, you can find the build.xml scripts in the WEB-INF/src there as well. You probably won't need to update any of the files to build the Pet Store since it is within distribution. Note that petstoreWeb.war is deposited at <BEEHIVE_HOME>/samples if you use 'ant build war'.
- jeremiah
-----Original Message----- From: Scott Semyan Sent: Tuesday, March 15, 2005 5:21 PM To: Beehive Developers Subject: Proper way to build a webapp from a dist?
What is the proper way to build a web app from a distribution? I can't
find any ant scripts for the Petstore app (for example) when I generate
a distribution. I know I can use the script from the svn enlistment but
it seems a distribution should be standalone.
Scott Semyan
