Alternatively, if you're on Windows, you can add a file mavenrc_pre.bat and mavenrc_post.bat to your user home directory and Maven will run them before/after running the Maven build process.
But this runs for all builds (not just a specific project) and requires that you distribute these batch/shell script files to every developer and every server where you are executing Maven, so it is far from ideal. Yet another option is to modify the mvn.bat or mvn files themselves. This also requires you to distribute the modified shell script. The exec plugin, as previously mentioned, is a good option as well. Assuming the binaries are the same on all your platforms (or you can tweak with profiles) and you figure out which phase you want to invoke it in, it should work. What you choose really depends on what you're trying to do and why. More details about your specific use case might produce better comments. Wayne On 3/11/08, Olivier Dehon <[EMAIL PROTECTED]> wrote: > Look for the exec plugin. > > -Olivier > > On Tue, 2008-03-11 at 19:45 -0500, Tawfik, Sameh E wrote: > > How to run a perl or batch file at the beginning of the build? > > > > Is there is a command or a plugin I can use to run an external process > > then come back to the build when this process is complete? > > > > I'm using: > > > > Maven version: 2.0.7 > > Java version: 1.6.0_02-ea > > OS name: "windows xp" version: "5.1" arch: "x86" > > > > Thanks, > > > > Sameh > > This email and any files transmitted with it are confidential, proprietary > > and intended solely for the individual or entity to whom they are addressed. > > If you have received this email in error please delete it immediately. > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
