0

I'm trying to compile a main application (.mxml) to SWF file and many CSS files to SWF files to create skins that can be loaded at runtime.

I use this :

...
<execution>
    <id>default-compile-swf</id>
    <configuration>
        <sourceFile>./com/sim/tide/views/impls/application/Sim.mxml</sourceFile>
        <debug>true</debug>
        <services>${web.services.location}/services-config.xml</services>
    </configuration>
</execution>
<execution>
    <id>compile-css-black_is_mine</id>
    <phase>compile</phase>
    <goals>
        <goal>compile-swf</goal>
    </goals>
    <configuration>
        <finalName>black_is_mine</finalName>
        <sourceFile>../resources/styles/black_is_mine.css</sourceFile>                      
    </configuration>
</execution>
...

This code seems to work because in my ${project.build.directory} I have 2 SWF files, one for my application and one for my skin.

My problem occured in the install phase. Now, it's my SWF skin file which is installed on my local repository, it's no longer my SWF based on my application but the artifact's name remains the name of my application skin...To summarize, if m.swf is my generated SWF file based on my application file and c.swf is my generated SWF file based on my css file, the goal install will install c.swf on my local repository with the name m.swf.

I tried to change configuration of the execution like this :

<execution>
     <id>default-install</id>
        <phase>install</phase>
        <goals>
          <goal>install</goal>
        </goals>            
        <configuration>                    
        <file>${project.build.directory}/${project.artifactId}-${sim-flex.version}.swf</file>
        </configuration>
      </execution>

to select the right SWF to install but no effect...

So how can I use Flexmojos to compile as many SWF files that I want and to install them properly into local repository please ? It seems that only one SWF file can be installed.

Olivier J.
  • 3,115
  • 11
  • 48
  • 71

1 Answers1

0

I found a "hack", just install the SWF that I want with org.apache.maven.plugins:maven-install-plugin:install-file into my local repository and cancel the default install goal :

<execution>
    <id>default-install</id>
    <phase>non_existing_phase</phase>
</execution> 

Now, this goal will never be triggered because its bounded phase does not exist.

Olivier J.
  • 3,115
  • 11
  • 48
  • 71