Eric-

I have been doing exactly what you are suggesting for a few weeks now, I
think.  If I understand correctly, what you really would like to do is
to be able to use a TDK style directory structure with maven such that
when you compile your app (using maven) you are able to boot it up
directly behind tomcat without needing to deploy a war to your tomcat
installation.

The way I have done this is to copy the default.properties over to the
root directory of my app, rename it project.properties, and change
around some of the directories so that they work with maven.  There are
a few key variables that need to be changed to accomplish this:

maven.src.dir = ${basedir}/WEB-INF/src
maven.prepareSourceDirectory = ${basedir}/WEB-INF/src
maven.prepareSourceTarget = update-tr-props
maven.conf.dir = ${basedir}/WEB-INF/conf
maven.build.dir = ${basedir}/target
maven.build.src = ${maven.build.dir}/src
maven.build.dest = ${basedir}/WEB-INF/classes

I have also tweaked my hand one of the build files so that it cleans up
the classes directory under WEB-INF correctly:

Index: src/templates/build/build-maven.xml
===================================================================
RCS file:
/home/cvspublic/jakarta-turbine-maven/src/templates/build/build-maven.xml,v
retrieving revision 1.47
diff -u -r1.47 build-maven.xml
--- src/templates/build/build-maven.xml 8 May 2002 02:27:39 -0000      
1.47
+++ src/templates/build/build-maven.xml 15 May 2002 06:35:24 -0000
@@ -722,7 +722,10 @@
     name="clean"
     depends="local-init"
     description="o Cleans up the build directory">
-    <echo message="Cleaning up ${maven.build.dir}"/>
+    <echo message="Cleaning up ${build.dir}"/>
+    <delete>
+      <fileset dir="${maven.build.dest}" includes="**/*.class"/>
+    </delete>
     <delete dir="${maven.build.dir}"/>
     <delete dir="${maven.test.reportsDirectory}"/>
   </target>

Hopefully this is what you are trying to accomplish...

-B


On Mon, 2002-05-13 at 12:12, Eric Pugh wrote:
> Not quite sure what you mean..  I do have my Turbine app pretty much setup
> with a similar directory structure to Scarab( actually it mirrors almost
> perfectly the default newapp).
> 
> Now I am trying to bring the code base into Maven management...
> 
> So I put everything in webapp/myapp directory of Maven.  Cool.  Now, I want
> to run my turbine app without having to create and deploy a war?
> 
> I am currently changing my server.conf to have my webapp root be my
> webapp/myapp directory..  And then add some steps in so the compiled classes
> get copied into my webapp/myapp directory...
> 
> I downloaded the beta7 of scarab, but didn't see a project.xml file in it..
> Is Scarab using maven for builds?
> 
> Eric
> 
> -----Original Message-----
> From: Jon Scott Stevens [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 13, 2002 2:46 PM
> To: Turbine Maven Users List
> Subject: Re: How do people set up Turbine apps using Maven?
> 
> 
> on 5/13/02 11:31 AM, "Eric Pugh" <[EMAIL PROTECTED]> wrote:
> 
> > Hi all,
> >
> > I have been playing with the new J2EE support in Maven, and trying to get
> it
> > to work with a Turbine style app where you compile and run the java
> classes
> > "in site" so to speak, instead of deploying a war.  I don't want to create
> a
> > war file until deployment because it slows down Turbine development.  I
> was
> > thinking of doing something like setting up my web root to the target
> > directory, and then keeping my java classes in /src/java...
> >
> > What have other people done?
> >
> > Eric
> 
> I don't understand why this doesn't work exactly like Scarab's method of
> webapp development.
> 
> -jon
> 
> 
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to