What you could do is create a pom project in the base of the WAR, which then kicks off two modules... one as a JAR project which builds first, then the second one builds the WAR, with everything wrapped up inside it. This would require 3 POMs.
For example, if your directory is set up as: BASE_WAR_DIR/java/source/files/ You can create: BASE_WAR_DIR/pom.xml BASE_WAR_DIR/war_pom.xml BASE_WAR_DIR/jar_pom.xml Or better yet, you extend the WAR plugin and branch off another build cycle... the branched cycle would build the .class files into a jar, deploy, and then return to the main build cycle where it would use the jar (presumably with some derrivative name of the war). On 12/28/05, Frank Russo <[EMAIL PROTECTED]> wrote: > > I currently have a standard webapp project with a working m2 build > process. It builds a war with the typical web-inf structure as follows: > > web-inf/classes/* this is where the app's compiled > classes go. > web-inf/lib/*.jar this is where the dependency jars go. > > I want to alter my build so that instead of the app's class files in a > classes folder in the war, I'd prefer they first be built into a jar > file, placed in the local repository for other apps to use, and then > included as a dependcy in war's web-inf/lib folder. > > I know I need to set up two poms (maybe three), but I don't want to > break up the current package structure if possible, and I'd like this to > be done as one build. > > Can someone point me in the right direction? > > Thanks... > > Frank Russo > Senior Developer > FX Alliance, LLC > > >
