I'm using Maven 3.0.3. I have an SCM plugin (v 1.5) that checks out a version of my code to the target/checkout directory. I would like to build my WAR from there, but I can't figure out how to do it. Any ideas? For what it's worth, I'm using Git 18.104.22.168.
Dave, if I understand you correctly, you have a pom.xml that have the scm plugin configured and you run mvn with that pom.xml to extract the projects contents from the repository. And now you would like to know how to get mvn to finish the job by doing the rest of the build. Is that correct? (I hope so, otherwise the rest of my response will make no sense.)
You have a chicken-and-egg problem here. The pom.xml should really be in the source control system along with the rest of the project's files. So you actually have to pull one of the files (pom.xml) out of source control before you can even get started.
One of the possibilities is to configure the scm plugin to run as part of one of the early build lifecycle phases, such as generate-sources. Note that you would do this within the same pom.xml used to build the WAR. Your steps would then be to first extract the pom.xml file source control and then run Maven.
But I think that a better mechanism is to use a continuous integration system such as Jenkins (aka Hudson) to manage the build. When you configure Jenkins to build something, you tell it where to grab the source from version control and what tool to use to build it (e.g., Ant, Maven, etc). Jenkins then does all the rest.