Hi guys,
I'm new to the israfil flex plugin, and I have a little problem when
creating my war file: I can't include the asset files from the swf
project into the war, generated in a war project.
When I compile my swf app, the assets folder is in the target
directory, but if i look in my local respository, only the swf file is
deployed, and then the war-project only downloads the swf file,
without the assets.
If I deploy my war, when I browse the app, the images aren't loaded.
this is my project structure:
app-parent (tipo do pom: pom)
|
|- app-flex (tipo do pom: swf)
| |
| |- app.mxml
| |
| |- assets
| | |
| | |- imagens .png
|
|
|- app-war (tipo do pom: war)
| |
| |- index.jsp
| |- WEB-INF
--------------------------------------------
my swf pom:
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>meu.grupo</groupId>
<artifactId>parent-app</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<groupId>meu.grupo</groupId>
<artifactId>flex-app</artifactId>
<packaging>swf</packaging>
<version>1.0-SNAPSHOT</version>
<properties>
<flex.home>D:/desenvolvimento/flex/blazeds-turnkey-3.2.0.3978/
resources/flex_sdk</flex.home>
</properties>
<build>
<finalName>app</finalName>
<plugins>
<plugin>
<groupId>net.israfil.mojo</groupId>
<artifactId>maven-flex2-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<flexHome>${flex.home}</flexHome>
<useNetwork>true</useNetwork>
<main>app.mxml</main>
</configuration>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>automationresources</id>
<phase>install</phase>
<goals>
<goal>resources</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/target</
outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
</build>
</project>
----------------------------------------------
and my war pom:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="
http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://
www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>my.group</groupId>
<artifactId>parent-app</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<groupId>my.group</groupId>
<artifactId>war-app</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>Orion - Flash_C1 War</name>
<dependencies>
<!-- Módulos swf que compõem este war -->
<dependency>
<groupId>my.group</groupId>
<artifactId>flex-app</artifactId>
<type>swf</type>
</dependency>
<!-- Dependencias do Blaze DS -->
(...)
</dependencies>
<build>
<finalName>my-app</finalName>
<plugins>
<plugin>
<groupId>net.israfil.mojo</groupId>
<artifactId>maven-flex2-plugin</artifactId>
<executions>
<execution>
<id>copy-flex</id>
<phase>process-classes</phase>
<goals>
<goal>copy-flex-applications</goal>
</goals>
<configuration>
<modules>
<swfModule>
<groupId>my.group</groupId>
<artifactId>flex-app</artifactId>
<targetPath>$
{project.build.directory}/flex-resources</targetPath>
<targetFilename>app.swf</
targetFilename>
</swfModule>
</modules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<webResources>
<resource>
<directory>${project.build.directory}/flex-
resources</directory>
</resource>
</webResources>
</configuration>
</plugin>
</plugins>
</build>
</project>
----------------------------------------------
Thanks for ur time guys,
Jorge.