You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Session Mwamufiya <sm...@andrew.cmu.edu> on 2007/06/11 20:59:18 UTC

build.xml file for struts 2

Hello,

 

Could someone point me to a working build.xml file that I could use for a
simple struts 2 application (helloworld)?  I tried the tutorial from
roseindia, and that build file doesn't result in a working web app, though
ant says that the build was successful.  I don't see all of the lib/*.jar
files included in the classpath, and it puts the compiled class files in
WEB-INF/src/classes instead of WEB-INF/classes; there must be other issues
too that I haven't figured out.  Could someone point me to a simple working
build.xml for struts 2 applications, or a good tutorial that I could use?

 

Thanks,

 

Session A. Mwamufiya

Carnegie Mellon University

MBA | Tepper School of Business

MSE (software eng.) | School of Computer Science

T: (412) 508-5455 | semwamufiya@cmu.edu

 


Re: build.xml file for struts 2

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Session,

Session Mwamufiya wrote:
> Thanks for the file, but I would really need to see a working example,
> because all of these files and directories here and there are too confusing.
> I wish someone could point me to a helloworld tutorial that actually has a
> working version.

In my experience, it's always better to build your own ant build
scripts. As you can see, taking someone else's file always results in
some confusion as you have no idea how or why some things work in
certain ways.

The best thing to do is to start with something simple and continue
adding to it until it meets your needs. I recommend starting with a
simple "compile from ./src into ./build/classes, use libs in ./libs"
target and then add onto it from there.

You will get more experience using ant and you will more fully
understand other scripts that you may see in the future.

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGbbxr9CaO5/Lv0PARAvL+AKDESsetAaeI1M7+tjKsLQbTb9AodwCgpvuD
IV7ye0NdB0zsFa848UiOL2g=
=untQ
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: build.xml file for struts 2

Posted by Dave Newton <ne...@yahoo.com>.
Oh, you fixed it?

IIRC the original poster noted some issues he'd had
with it.

--- "RoseIndia.net Help" <te...@roseindia.net>
wrote:

> HI,
> 
> Please visit
>
http://www.roseindia.net/struts/struts2/struts-2-hello-world.shtml
>  and read the tutorial.
> You can download the helloworld project along with
> directory strutcture and
> build.xml file from
>
http://www.roseindia.net/struts/struts2/struts2tutorial.zip
> 
> code is tested and will work on your system.
> 
> Thanks
> 
> 
> -----Original Message-----
> From: James Mitchell
> [mailto:edgetechservices.net@gmail.com]
> Sent: Tuesday, June 12, 2007 3:27 AM
> To: Struts Users Mailing List
> Subject: Re: build.xml file for struts 2
> 
> 
> You can generate an Ant build file from any project
> that uses Maven.
> 
>    $ mvn ant:ant
> 
> 
> --
> James Mitchell
> 
> 
> 
> On Jun 11, 2007, at 4:49 PM, Session Mwamufiya
> wrote:
> 
> > Thanks for the file, but I would really need to
> see a working example,
> > because all of these files and directories here
> and there are too
> > confusing.
> > I wish someone could point me to a helloworld
> tutorial that
> > actually has a
> > working version.
> >
> > Thanks
> >
> > Session A. Mwamufiya
> > Carnegie Mellon University
> > MBA | Tepper School of Business
> > MSE (software eng.) | School of Computer Science
> > T: (412) 508-5455 | semwamufiya@cmu.edu
> >
> > -----Original Message-----
> > From: Carroll, Samuel Nicholas
> [mailto:sncarroll@paychex.com]
> > Sent: Monday, June 11, 2007 3:11 PM
> > To: Struts Users Mailing List
> > Subject: RE: build.xml file for struts 2
> >
> > Here is the basic layout for a build.xml for the
> struts appilcations I
> > develop:
> >
> > <?xml version="1.0"?>
> > <project name="PROJECT NAME"
> default="PICK_A_TARGET" basedir="./">
> >
> > 	<description>FULL PROJECT NAME</description>
> >
> > 	<!-- ********************** -->
> > 	<!-- Application Properties -->
> > 	<!-- ********************** -->
> > 	<property name="SOME.PROPERTY.NAME"
> value="COMMONLYUSED"/>
> > 	......
> >
> > 	<!-- ************************ -->
> > 	<!-- Jar Directory Properties -->
> > 	<!-- ************************ -->
> > 	<property name="log4j.version" value="1.2.9" />
> > 	<property name="log4j.dir"
> > 		location="${lib.dir}/log4j-${log4j.version}" />
> >
> > 	<!-- ************** -->
> > 	<!-- Set Classpaths -->
> > 	<!-- ************** -->
> > 	<path id="sourcepath.compile">
> > 		<pathelement location="${src.dir}" />
> > 	</path>
> >
> > 	<!-- ********* -->
> > 	<!-- Clean All -->
> > 	<!-- ********* -->
> > 	<target name="clean">
> > 		<delete dir="${out.dir}" />
> > 	</target>
> >
> > 	<!-- ******* -->
> > 	<!-- Compile -->
> > 	<!-- ******* -->
> > 	<target name="compile" depends="init">
> >  	<javac destdir="${out.dir}\app\WEB-INF\classes"
> > 			sourcepathref="sourcepath.compile"
> > classpathref="classpath.compile"
> > 			deprecation="${compile.deprecation}"
> > debug="${compile.debug}"
> > 			listfiles="${compile.listfiles}">
> > 			<src refid="sourcepath.compile" />
> > 		</javac>
> > 	</target>
> >
> > 	<!--
> >
>
****************************************************************
> -->
> > 	<!-- COPY OVER ALL OTHER FILES/LIBS INTO THE
> PROPER WEB-INF
> > STRUCTURE -->
> > 	<!--
> >
>
****************************************************************
> -->
> > 	<!-- Copy JSP Pages Over -->
> > 		<copy todir="${out.dir}\app\WEB-INF\pages">
> > 			<fileset dir="${jspPages.dir}"
> > 				excludes="**/*.keep">
> > 			</fileset>
> > 		</copy>
> > 	etc...
> >
> >
> > 	<!-- ********** -->
> > 	<!-- Distribute -->
> > 	<!-- ********** -->
> > 	<target name="dist" >
> > 		<jar jarfile="${warfile.name}.war"
> > basedir="${out.dir}\app" />
> > 	</target>
> >
> > </project>
> >
> > Something along those lines should suffice google
> and the ant page
> > should suffice
> > To fill in all the blanks, but to review basically
> set all the
> > properties (dirs,
> > Files, libs, etc.) then move them to the
> appropriate folders for the
> > WEB-INF,
> > Then compile and make a war file and distribute
> accordingly.
> >
> >
> > -----Original Message-----
> > From: Session Mwamufiya
> [mailto:smwamufi@andrew.cmu.edu]
> > Sent: Monday, June 11, 2007 2:59 PM
> > To: 'Struts Users Mailing List'
> > Subject: build.xml file for struts 2
> >
> > Hello,
> >
> >
> >
> > Could someone point me to a working build.xml file
> that I could use
> > for
> > a
> > simple struts 2 application (helloworld)?  I tried
> the tutorial from
> > roseindia, and that build file doesn't result in a
> working web app,
> > though
> > ant says that the build was successful.  I don't
> see all of the
> > lib/*.jar
> > files included in the classpath, and it puts the
> compiled class
> > files in
> > WEB-INF/src/classes instead of WEB-INF/classes;
> there must be other
> > issues
> > too that I haven't figured out.  Could someone
> point me to a simple
> > working
> > build.xml for struts 2 applications, or a good
> tutorial that I could
> > use?
> >
> >
> >
> > Thanks,
> >
> >
> >
> > Session A. Mwamufiya
> >
> 
=== message truncated ===



 
____________________________________________________________________________________
TV dinner still cooling? 
Check out "Tonight's Picks" on Yahoo! TV.
http://tv.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: build.xml file for struts 2

Posted by "RoseIndia.net Help" <te...@roseindia.net>.
HI,

Please visit
http://www.roseindia.net/struts/struts2/struts-2-hello-world.shtml
 and read the tutorial.
You can download the helloworld project along with directory strutcture and
build.xml file from
http://www.roseindia.net/struts/struts2/struts2tutorial.zip

code is tested and will work on your system.

Thanks


-----Original Message-----
From: James Mitchell [mailto:edgetechservices.net@gmail.com]
Sent: Tuesday, June 12, 2007 3:27 AM
To: Struts Users Mailing List
Subject: Re: build.xml file for struts 2


You can generate an Ant build file from any project that uses Maven.

   $ mvn ant:ant


--
James Mitchell



On Jun 11, 2007, at 4:49 PM, Session Mwamufiya wrote:

> Thanks for the file, but I would really need to see a working example,
> because all of these files and directories here and there are too
> confusing.
> I wish someone could point me to a helloworld tutorial that
> actually has a
> working version.
>
> Thanks
>
> Session A. Mwamufiya
> Carnegie Mellon University
> MBA | Tepper School of Business
> MSE (software eng.) | School of Computer Science
> T: (412) 508-5455 | semwamufiya@cmu.edu
>
> -----Original Message-----
> From: Carroll, Samuel Nicholas [mailto:sncarroll@paychex.com]
> Sent: Monday, June 11, 2007 3:11 PM
> To: Struts Users Mailing List
> Subject: RE: build.xml file for struts 2
>
> Here is the basic layout for a build.xml for the struts appilcations I
> develop:
>
> <?xml version="1.0"?>
> <project name="PROJECT NAME" default="PICK_A_TARGET" basedir="./">
>
> 	<description>FULL PROJECT NAME</description>
>
> 	<!-- ********************** -->
> 	<!-- Application Properties -->
> 	<!-- ********************** -->
> 	<property name="SOME.PROPERTY.NAME" value="COMMONLYUSED"/>
> 	......
>
> 	<!-- ************************ -->
> 	<!-- Jar Directory Properties -->
> 	<!-- ************************ -->
> 	<property name="log4j.version" value="1.2.9" />
> 	<property name="log4j.dir"
> 		location="${lib.dir}/log4j-${log4j.version}" />
>
> 	<!-- ************** -->
> 	<!-- Set Classpaths -->
> 	<!-- ************** -->
> 	<path id="sourcepath.compile">
> 		<pathelement location="${src.dir}" />
> 	</path>
>
> 	<!-- ********* -->
> 	<!-- Clean All -->
> 	<!-- ********* -->
> 	<target name="clean">
> 		<delete dir="${out.dir}" />
> 	</target>
>
> 	<!-- ******* -->
> 	<!-- Compile -->
> 	<!-- ******* -->
> 	<target name="compile" depends="init">
>  	<javac destdir="${out.dir}\app\WEB-INF\classes"
> 			sourcepathref="sourcepath.compile"
> classpathref="classpath.compile"
> 			deprecation="${compile.deprecation}"
> debug="${compile.debug}"
> 			listfiles="${compile.listfiles}">
> 			<src refid="sourcepath.compile" />
> 		</javac>
> 	</target>
>
> 	<!--
> **************************************************************** -->
> 	<!-- COPY OVER ALL OTHER FILES/LIBS INTO THE PROPER WEB-INF
> STRUCTURE -->
> 	<!--
> **************************************************************** -->
> 	<!-- Copy JSP Pages Over -->
> 		<copy todir="${out.dir}\app\WEB-INF\pages">
> 			<fileset dir="${jspPages.dir}"
> 				excludes="**/*.keep">
> 			</fileset>
> 		</copy>
> 	etc...
>
>
> 	<!-- ********** -->
> 	<!-- Distribute -->
> 	<!-- ********** -->
> 	<target name="dist" >
> 		<jar jarfile="${warfile.name}.war"
> basedir="${out.dir}\app" />
> 	</target>
>
> </project>
>
> Something along those lines should suffice google and the ant page
> should suffice
> To fill in all the blanks, but to review basically set all the
> properties (dirs,
> Files, libs, etc.) then move them to the appropriate folders for the
> WEB-INF,
> Then compile and make a war file and distribute accordingly.
>
>
> -----Original Message-----
> From: Session Mwamufiya [mailto:smwamufi@andrew.cmu.edu]
> Sent: Monday, June 11, 2007 2:59 PM
> To: 'Struts Users Mailing List'
> Subject: build.xml file for struts 2
>
> Hello,
>
>
>
> Could someone point me to a working build.xml file that I could use
> for
> a
> simple struts 2 application (helloworld)?  I tried the tutorial from
> roseindia, and that build file doesn't result in a working web app,
> though
> ant says that the build was successful.  I don't see all of the
> lib/*.jar
> files included in the classpath, and it puts the compiled class
> files in
> WEB-INF/src/classes instead of WEB-INF/classes; there must be other
> issues
> too that I haven't figured out.  Could someone point me to a simple
> working
> build.xml for struts 2 applications, or a good tutorial that I could
> use?
>
>
>
> Thanks,
>
>
>
> Session A. Mwamufiya
>
> Carnegie Mellon University
>
> MBA | Tepper School of Business
>
> MSE (software eng.) | School of Computer Science
>
> T: (412) 508-5455 | semwamufiya@cmu.edu
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: build.xml file for struts 2

Posted by James Mitchell <ed...@gmail.com>.
You can generate an Ant build file from any project that uses Maven.

   $ mvn ant:ant


--
James Mitchell



On Jun 11, 2007, at 4:49 PM, Session Mwamufiya wrote:

> Thanks for the file, but I would really need to see a working example,
> because all of these files and directories here and there are too  
> confusing.
> I wish someone could point me to a helloworld tutorial that  
> actually has a
> working version.
>
> Thanks
>
> Session A. Mwamufiya
> Carnegie Mellon University
> MBA | Tepper School of Business
> MSE (software eng.) | School of Computer Science
> T: (412) 508-5455 | semwamufiya@cmu.edu
>
> -----Original Message-----
> From: Carroll, Samuel Nicholas [mailto:sncarroll@paychex.com]
> Sent: Monday, June 11, 2007 3:11 PM
> To: Struts Users Mailing List
> Subject: RE: build.xml file for struts 2
>
> Here is the basic layout for a build.xml for the struts appilcations I
> develop:
>
> <?xml version="1.0"?>
> <project name="PROJECT NAME" default="PICK_A_TARGET" basedir="./">
>
> 	<description>FULL PROJECT NAME</description>
> 	
> 	<!-- ********************** -->
> 	<!-- Application Properties -->
> 	<!-- ********************** -->
> 	<property name="SOME.PROPERTY.NAME" value="COMMONLYUSED"/>
> 	......
>
> 	<!-- ************************ -->	
> 	<!-- Jar Directory Properties -->
> 	<!-- ************************ -->	
> 	<property name="log4j.version" value="1.2.9" />
> 	<property name="log4j.dir"
> 		location="${lib.dir}/log4j-${log4j.version}" />
>
> 	<!-- ************** -->
> 	<!-- Set Classpaths -->
> 	<!-- ************** -->
> 	<path id="sourcepath.compile">
> 		<pathelement location="${src.dir}" />
> 	</path>
>
> 	<!-- ********* -->		
> 	<!-- Clean All -->
> 	<!-- ********* -->	
> 	<target name="clean">
> 		<delete dir="${out.dir}" />
> 	</target>
>
> 	<!-- ******* -->
> 	<!-- Compile -->
> 	<!-- ******* -->
> 	<target name="compile" depends="init">
>  	<javac destdir="${out.dir}\app\WEB-INF\classes"
> 			sourcepathref="sourcepath.compile"
> classpathref="classpath.compile"
> 			deprecation="${compile.deprecation}"
> debug="${compile.debug}"
> 			listfiles="${compile.listfiles}">
> 			<src refid="sourcepath.compile" />
> 		</javac>
> 	</target>
>
> 	<!--
> **************************************************************** -->
> 	<!-- COPY OVER ALL OTHER FILES/LIBS INTO THE PROPER WEB-INF
> STRUCTURE -->
> 	<!--
> **************************************************************** -->
> 	<!-- Copy JSP Pages Over -->
> 		<copy todir="${out.dir}\app\WEB-INF\pages">
> 			<fileset dir="${jspPages.dir}"
> 				excludes="**/*.keep">
> 			</fileset>
> 		</copy>
> 	etc...
>
>
> 	<!-- ********** -->
> 	<!-- Distribute -->
> 	<!-- ********** -->
> 	<target name="dist" >
> 		<jar jarfile="${warfile.name}.war"
> basedir="${out.dir}\app" />
> 	</target>
>
> </project>
>
> Something along those lines should suffice google and the ant page
> should suffice
> To fill in all the blanks, but to review basically set all the
> properties (dirs,
> Files, libs, etc.) then move them to the appropriate folders for the
> WEB-INF,
> Then compile and make a war file and distribute accordingly.
>
>
> -----Original Message-----
> From: Session Mwamufiya [mailto:smwamufi@andrew.cmu.edu]
> Sent: Monday, June 11, 2007 2:59 PM
> To: 'Struts Users Mailing List'
> Subject: build.xml file for struts 2
>
> Hello,
>
>
>
> Could someone point me to a working build.xml file that I could use  
> for
> a
> simple struts 2 application (helloworld)?  I tried the tutorial from
> roseindia, and that build file doesn't result in a working web app,
> though
> ant says that the build was successful.  I don't see all of the
> lib/*.jar
> files included in the classpath, and it puts the compiled class  
> files in
> WEB-INF/src/classes instead of WEB-INF/classes; there must be other
> issues
> too that I haven't figured out.  Could someone point me to a simple
> working
> build.xml for struts 2 applications, or a good tutorial that I could
> use?
>
>
>
> Thanks,
>
>
>
> Session A. Mwamufiya
>
> Carnegie Mellon University
>
> MBA | Tepper School of Business
>
> MSE (software eng.) | School of Computer Science
>
> T: (412) 508-5455 | semwamufiya@cmu.edu
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: build.xml file for struts 2

Posted by Session Mwamufiya <sm...@andrew.cmu.edu>.
Thanks for the file, but I would really need to see a working example,
because all of these files and directories here and there are too confusing.
I wish someone could point me to a helloworld tutorial that actually has a
working version.

Thanks

Session A. Mwamufiya
Carnegie Mellon University
MBA | Tepper School of Business
MSE (software eng.) | School of Computer Science
T: (412) 508-5455 | semwamufiya@cmu.edu

-----Original Message-----
From: Carroll, Samuel Nicholas [mailto:sncarroll@paychex.com] 
Sent: Monday, June 11, 2007 3:11 PM
To: Struts Users Mailing List
Subject: RE: build.xml file for struts 2

Here is the basic layout for a build.xml for the struts appilcations I
develop:

<?xml version="1.0"?>
<project name="PROJECT NAME" default="PICK_A_TARGET" basedir="./">

	<description>FULL PROJECT NAME</description>
	
	<!-- ********************** -->
	<!-- Application Properties -->
	<!-- ********************** -->
	<property name="SOME.PROPERTY.NAME" value="COMMONLYUSED"/>
	......

	<!-- ************************ -->	
	<!-- Jar Directory Properties -->
	<!-- ************************ -->	
	<property name="log4j.version" value="1.2.9" />
	<property name="log4j.dir"
		location="${lib.dir}/log4j-${log4j.version}" />

	<!-- ************** -->
	<!-- Set Classpaths -->
	<!-- ************** -->
	<path id="sourcepath.compile">
		<pathelement location="${src.dir}" />
	</path>

	<!-- ********* -->		
	<!-- Clean All -->
	<!-- ********* -->	
	<target name="clean">
		<delete dir="${out.dir}" />
	</target>

	<!-- ******* -->
	<!-- Compile -->
	<!-- ******* -->
	<target name="compile" depends="init">
 	<javac destdir="${out.dir}\app\WEB-INF\classes"
			sourcepathref="sourcepath.compile"
classpathref="classpath.compile"
			deprecation="${compile.deprecation}"
debug="${compile.debug}"
			listfiles="${compile.listfiles}">
			<src refid="sourcepath.compile" />
		</javac>
	</target>

	<!--
**************************************************************** -->
	<!-- COPY OVER ALL OTHER FILES/LIBS INTO THE PROPER WEB-INF
STRUCTURE -->
	<!--
**************************************************************** -->
	<!-- Copy JSP Pages Over -->
		<copy todir="${out.dir}\app\WEB-INF\pages">
			<fileset dir="${jspPages.dir}"
				excludes="**/*.keep">
			</fileset>
		</copy>
	etc...


	<!-- ********** -->
	<!-- Distribute --> 
	<!-- ********** -->
	<target name="dist" >
		<jar jarfile="${warfile.name}.war"
basedir="${out.dir}\app" />
	</target>

</project>

Something along those lines should suffice google and the ant page
should suffice
To fill in all the blanks, but to review basically set all the
properties (dirs,
Files, libs, etc.) then move them to the appropriate folders for the
WEB-INF,
Then compile and make a war file and distribute accordingly.


-----Original Message-----
From: Session Mwamufiya [mailto:smwamufi@andrew.cmu.edu] 
Sent: Monday, June 11, 2007 2:59 PM
To: 'Struts Users Mailing List'
Subject: build.xml file for struts 2

Hello,

 

Could someone point me to a working build.xml file that I could use for
a
simple struts 2 application (helloworld)?  I tried the tutorial from
roseindia, and that build file doesn't result in a working web app,
though
ant says that the build was successful.  I don't see all of the
lib/*.jar
files included in the classpath, and it puts the compiled class files in
WEB-INF/src/classes instead of WEB-INF/classes; there must be other
issues
too that I haven't figured out.  Could someone point me to a simple
working
build.xml for struts 2 applications, or a good tutorial that I could
use?

 

Thanks,

 

Session A. Mwamufiya

Carnegie Mellon University

MBA | Tepper School of Business

MSE (software eng.) | School of Computer Science

T: (412) 508-5455 | semwamufiya@cmu.edu

 



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: build.xml file for struts 2

Posted by "Carroll, Samuel Nicholas" <sn...@paychex.com>.
Here is the basic layout for a build.xml for the struts appilcations I
develop:

<?xml version="1.0"?>
<project name="PROJECT NAME" default="PICK_A_TARGET" basedir="./">

	<description>FULL PROJECT NAME</description>
	
	<!-- ********************** -->
	<!-- Application Properties -->
	<!-- ********************** -->
	<property name="SOME.PROPERTY.NAME" value="COMMONLYUSED"/>
	......

	<!-- ************************ -->	
	<!-- Jar Directory Properties -->
	<!-- ************************ -->	
	<property name="log4j.version" value="1.2.9" />
	<property name="log4j.dir"
		location="${lib.dir}/log4j-${log4j.version}" />

	<!-- ************** -->
	<!-- Set Classpaths -->
	<!-- ************** -->
	<path id="sourcepath.compile">
		<pathelement location="${src.dir}" />
	</path>

	<!-- ********* -->		
	<!-- Clean All -->
	<!-- ********* -->	
	<target name="clean">
		<delete dir="${out.dir}" />
	</target>

	<!-- ******* -->
	<!-- Compile -->
	<!-- ******* -->
	<target name="compile" depends="init">
 	<javac destdir="${out.dir}\app\WEB-INF\classes"
			sourcepathref="sourcepath.compile"
classpathref="classpath.compile"
			deprecation="${compile.deprecation}"
debug="${compile.debug}"
			listfiles="${compile.listfiles}">
			<src refid="sourcepath.compile" />
		</javac>
	</target>

	<!--
**************************************************************** -->
	<!-- COPY OVER ALL OTHER FILES/LIBS INTO THE PROPER WEB-INF
STRUCTURE -->
	<!--
**************************************************************** -->
	<!-- Copy JSP Pages Over -->
		<copy todir="${out.dir}\app\WEB-INF\pages">
			<fileset dir="${jspPages.dir}"
				excludes="**/*.keep">
			</fileset>
		</copy>
	etc...


	<!-- ********** -->
	<!-- Distribute --> 
	<!-- ********** -->
	<target name="dist" >
		<jar jarfile="${warfile.name}.war"
basedir="${out.dir}\app" />
	</target>

</project>

Something along those lines should suffice google and the ant page
should suffice
To fill in all the blanks, but to review basically set all the
properties (dirs,
Files, libs, etc.) then move them to the appropriate folders for the
WEB-INF,
Then compile and make a war file and distribute accordingly.


-----Original Message-----
From: Session Mwamufiya [mailto:smwamufi@andrew.cmu.edu] 
Sent: Monday, June 11, 2007 2:59 PM
To: 'Struts Users Mailing List'
Subject: build.xml file for struts 2

Hello,

 

Could someone point me to a working build.xml file that I could use for
a
simple struts 2 application (helloworld)?  I tried the tutorial from
roseindia, and that build file doesn't result in a working web app,
though
ant says that the build was successful.  I don't see all of the
lib/*.jar
files included in the classpath, and it puts the compiled class files in
WEB-INF/src/classes instead of WEB-INF/classes; there must be other
issues
too that I haven't figured out.  Could someone point me to a simple
working
build.xml for struts 2 applications, or a good tutorial that I could
use?

 

Thanks,

 

Session A. Mwamufiya

Carnegie Mellon University

MBA | Tepper School of Business

MSE (software eng.) | School of Computer Science

T: (412) 508-5455 | semwamufiya@cmu.edu

 



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org