Hi there,
you could do the following include the plugin configuration in a profile
and make sure that profile is only activated when you execute a module
build.
That would allow you to keep the build spec in just one place - the
master pom, but use it only for the modules (I assume that is what you
want to
achieve).
You should not have the profile active by default, but activate it using
a property (e.g. isModule=true) - see also
http://maven.apache.org/pom.html#Activation.
The second question, you can select an OS specific script using a
profile as well. That one you would activate depending on the underlying
OS.
HTH
Andreas
Erwin Mueller schrieb:
Hallo
I'm a pretty new user of mvn2 and I have a question:
I use the exec-plugin to execute a script that starts the compilation of an
IzPack installer.
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.1-beta-1</version>
<executions>
<execution>
<id>compile-install</id>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>install/compile_install.sh</executable>
<workingDirectory>install/</workingDirectory>
</configuration>
</plugin>
The path install/compile_install.sh is in a module of a main project. Like
mainproject/
|/subproject
|/subproject
If I start mvn package in mainproject/subproject it works fine, but if I start
mvn package in mainproject/ it will of course fail.
Hava maven a build in variable like ${module-directory} that I can use like
that:
<configuration>
<executable>${module-directory}/install/compile_install.sh</executable>
<workingDirectory>${module-directory}/install/</workingDirectory>
</configuration>
Other question is, how can I start different scripts if I work on diferrent
systems? Like if I work in Windows it'll start compile_install.bat and on
linux it'll start compile_install.sh.
Thanks for help, Erwin.
---------------------------------------------------------------------
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]