Flex Builder Project Clean file generation

16 views
Skip to first unread message

Rutger

unread,
Mar 20, 2008, 12:03:35 PM3/20/08
to Israfil Mojo User Discussions
Hi,

First of al thanx for this plugin.

Unfortunately I encounter a problem.
When I give the flex builder the project->clean command flex builder
automaticly copies all the assets from the project to the target
directory. (e.g stylesheets and ini files). But when I use the plugin
and run maven, the only file that is generated is the swf

It looks like this option is set in the .actionScriptProperties file
by the copyDependentFiles setting.
Is there a way to give this option to the command line compiler?

Thanx in advanced.


Kind regards,

Rutger

Logan Allred

unread,
Mar 21, 2008, 2:22:34 PM3/21/08
to Israfil Mojo User Discussions


On Mar 20, 10:03 am, Rutger <rhert...@gmail.com> wrote:
> When I give the flex builder the project->clean command flex builder
> automaticly copies all the assets from the project to the target
> directory. (e.g stylesheets and ini files). But when I use the plugin
> and run maven, the only file that is generated is the swf
>
> It looks like this option is set in the .actionScriptProperties file
> by the copyDependentFiles setting.
> Is there a way to give this option to the command line compiler?

There is no way to give the option to the compiler, because the
compiler does not handle that step, even in Flex Builder. The compiler
only generates the swf, but Flex Builder does extra build steps to
package all the other files together into a runnable/deployable
bundle.

The maven plugin could be extended to provide similar functionality.
We currently have a custom maven build setup the does this for us
using profiles and the maven-resources plugin.
We build our main app with Flex Builder, but we use maven to build an
automation version of our application for testing. Here is a snippet
of our build (with some stuff removed):

<profiles>
<profile>
<id>automation</id>
<properties>
<outputDirectory>target</outputDirectory>
</properties>
<build>
<finalName>Main</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>Main.mxml</main>
<javaOpts>-Xmx1024m</javaOpts>
<flex.java.options>-Xmx1024m</
flex.java.options>
<java.options>-Xmx1024m</java.options>

<resolveExtraSwcsFromFlexFrameworksLibs>true</
resolveExtraSwcsFromFlexFrameworksLibs>
<extraParameters>
<parameter>
<name>verbose-stacktraces</name>
</parameter>
<parameter>
<name>include-libraries+=$
{flex.home}/frameworks/libs/automation.swc</name>
</parameter>
<parameter>
<name>include-libraries+=$
{flex.home}/frameworks/libs/automation_agent.swc</name>
</parameter>

</extraParameters>
</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>
<filtering>true</filtering>
</resource>
<resource>
<directory>src/main/flex/</directory>
<excludes>
<exclude>org/**</exclude>
<exclude>com/**</exclude>
<exclude>*.mxml</exclude>
</excludes>
</resource>
<resource>
<directory>${basedir}/html-template</
directory>
</resource>
</resources>

</build>
</profile>
</profiles>

It's not very elegant, but it does the job that we need for now. We
have all of our html/css/images/etc. resources in src/main/flex. Our
src/main/resources dir has a Main.html file with some filter variables
in it so it mimics the same output that Flex Builder does (I basically
copied the Main.html that Flex Builder generates and replaced the
version and app name with variables).

Hope that helps as a stopgap for now.

Logan

Rutger

unread,
Mar 25, 2008, 5:22:42 AM3/25/08
to Israfil Mojo User Discussions

Hi Logan,

Thanx for you help, it works!

Christian Edward Gruber

unread,
Mar 25, 2008, 3:15:05 PM3/25/08
to israfil-m...@googlegroups.com
I just want to say that I'm really happy to see users helping each
other solve their problems. I think this is one of the first times
I've seen this little community do so without a comment from me, and
that's wonderful. I'm going to be getting a bit more time to devote
to this project, so hopefully some of the recent and long-standing
requests can be acted upon.

Having said that, please do everyone vote for issues (by starring the
ones you care about) on the issues tracker at http://code.google.com/p/israfil-mojo/issues/list
.

Christian.

Reply all
Reply to author
Forward
0 new messages