
Originally Posted by
wari
I Ryan,
I'm interested by your mojo. Who it works ? What i have to do in order to use it in my project ?
Thks
Olivier
Currently, you'll have to download the zip file and then open the directory it is contained in and run "mvn install" on the mojo to get it into your local repository (since nobody is hosting the mojo yet)
Then, you use it like this:
Code:
...
<!-- set up properties to make it easy for both plugins (the prebuild and the maven-mojo) to use the same file locations -->
<properties>
<generatedCompilerConfigName>spring-as-includes.config</generatedCompilerConfigName>
<generatedCompilerConfigDir>${project.build.sourceDirectory}</generatedCompilerConfigDir>
</properties>
<build>
...
<plugins>
<plugin>
<groupId>org.springextensions.actionscript</groupId>
<artifactId>prebuild-mojo</artifactId>
<version>0.1-SNAPSHOT</version>
<executions>
<execution>
<phase>generate-resources</phase>
<goals>
<goal>generate-compiler-config</goal>
</goals>
</execution>
</executions>
<configuration>
<springActionscriptContextFiles>
<param>${basedir}/src/main/flex/YOUR-CONTEXT-FILE.xml</param>
</springActionscriptContextFiles>
<outputDirectory>${generatedCompilerConfigDir}</outputDirectory>
<generatedConfigFileName>${generatedCompilerConfigName}</generatedConfigFileName>
</configuration>
</plugin>
<plugin>
<groupId>org.sonatype.flexmojos</groupId>
<artifactId>flexmojos-maven-plugin</artifactId>
<version>3.6-SNAPSHOT</version>
<configuration>
...
<configFiles>
<file>${generatedCompilerConfigDir}/${generatedCompilerConfigName}</file>
</configFiles>
...
</configuration>
</plugin>
</plugins>
</build>
...
My hope is that the spring-actionscript group would take up the prebuild-mojo and put it in the spring-actionscript repository.
You need to use the flex-mojos 3.6-snapshot version because that's the version with my patches in it to let it handle multiple config files properly.
I'm using this setup in my build in a few apps and it works great.