What I came up with is really just writing and Ant script to do these tasks that uses some Ant macrodef tricks and the maven-ant-tasks library to not let the Ant script have to worry about dependencies or anything. The macrodef is generic and should work with any Maven project and loads all of the settings needed from the pom. All that the macro has to be supplied with is a name for the Ant properties that are declared and a path to the pom.
Here is the build.xml that we are using: http://developer.ja-sig.org/source/browse/~raw,r=42461/jasigsvn/up2/branches/working-maven2/build.xml
If you search for the 'maven-artifact-macro' macrodef you can see what is done as far as loading of poms, generating classpaths and such. The 'deploy-war' target makes use of a macro to ensure that the Maven generated WAR is built and up-to-date before doing the deployment to the application server.
I was planning on doing a more in-depth write-up of this technique as an example for the Maven community so my description here may be a bit rough but I am more than happy to answer questions about our approach.
-Eric Dave Rathnow wrote:
So I've now got Maven to build my jars, wars, and ears, it installs them in my local repository and deploys to my remote repositories. But what do I do now? In order to run and test my apps, I have to manualy copy files to the appropriate directories, which seems a bit primative for such a complex tool as Maven. The next step I'll have to figure out is how to build an install kit with Maven, which may not be that hard since everything is in the respository.Still, I'm wondering how others are using Maven in their developmentprocess? Do you us Maven to build and deploy your files and then have another script copy them to directories for testing/kit building?Thanks,Dave.
smime.p7s
Description: S/MIME Cryptographic Signature
