Since Maven 3.0.3 all plugins are executed in the order in which they are in your pom.xml. Thus, setting a valid flag in an independent platform is as simple as using the maven-enforcer plugin right after your appassembler plugin.
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> <version>1.3.1</version> <executions> <execution> <id>enforce-beanshell</id> <phase>package</phase> <goals> <goal>enforce</goal> </goals> <configuration> <rules> <evaluateBeanshell> <condition> import java.io.File; print("set executable for file ${basedir}/dist/bin/mql"); new File("${basedir}/dist/bin/mql").setExecutable(true,false); true; </condition> </evaluateBeanshell> </rules> <fail>false</fail> </configuration> </execution> </executions> </plugin>
source share