java - Can I tailor a maven build based on platform? -
specifically, run launch4j-maven-plugin
plugin generate me .exe
file. works on windows, wondering if 'opt-out' of step on other platforms?
the plugin tied execution phase this
<plugin> ... <execution> <id>l4j-clui</id> <phase>package</phase> <goals> <goal>launch4j</goal> </goals> </execution> ...
you can wrap plugin under separate build profile , enable profile on build want
for example:
<project> ... <profile> <id>generate-exe</id> <build> <plugins> <plugin> <!_- plugin configuration --> </plugin> ... </plugins> </build> </profile> ... </project>
now pass parameter while launching maven specify profile
for example:
mvn clean install -pgenerate-exe
Comments
Post a Comment