We use the assembly to create a zip file that is an attached artifact,
so it's versioned just like the swf (we build 3 swfs, they each create
a zip file along with their swf file).
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptors>
<descriptor>src/main/assembly/html-assembly.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>make-html-assembly</id>
<phase>package</phase>
<goals>
<goal>attached</goal>
</goals>
</execution>
</executions>
</plugin>
The html-assembly.xml looks similar to this (depending on the project):
<assembly>
<includeBaseDirectory>false</includeBaseDirectory>
<formats>
<format>zip</format>
</formats>
<fileSets>
<fileSet>
<directory>target</directory>
<outputDirectory>/</outputDirectory>
<includes>
<include>history/**</include>
<include>*.js</include>
<include>*.swf</include>
<include>*.swz</include>
<include>*.html</include>
<include>help/**</include>
<include>html/**</include>
<include>images/**</include>
<include>config.xml</include>
</includes>
</fileSet>
</fileSets>
</assembly>
We then use a war overlay [1] to include the 3 zip files in our war
project like this:
<dependency>
<groupId>com.example</groupId>
<artifactId>swfproject1</artifactId>
<version>${project.version}</version>
<type>zip</type>
<scope>runtime</scope>
</dependency>
.....
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<archive>
<addMavenDescriptor>false</addMavenDescriptor>
</archive>
<overlays>
<overlay>
<groupId>com.example</groupId>
<artifactId>swfproject1</artifactId>
<type>zip</type>
</overlay>
<overlay>
<groupId>com.example</groupId>
<artifactId>swfproject2</artifactId>
<type>zip</type>
</overlay>
</overlays>
</configuration>
</plugin>
I can't say it's the right way for everyone, but it works for us. When
we use the release plugin, the zip file gets attached to the swf as an
artifact and versioned the same, so no snapshot dependency problems
(at least that I remember).
Logan
[1] http://maven.apache.org/plugins/maven-war-plugin/overlays.html
On Sat, Oct 17, 2009 at 1:21 PM, Allan Ditzel <[email protected]> wrote:
> Hi Logan,
>
> The web module does contain other non-flex related code (java, groovy,
> etc.), so it looks like we can't merge the modules. When using the assembly
> plugin, are you creating a war? Are you then simply including it as a
> dependency in the web module? And the release plugin doesn't complain about
> a snapshot dependency?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Flex Mojos" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/flex-mojos?hl=en?hl=en
http://blog.flex-mojos.info/
-~----------~----~----~----~------~----~------~--~---