I get the this "Error: unable to resolve '/assets/images/**.png' for transcoding" while building on FlexMojos 4.0-RC2 and Flex SDK 4.5.1.21328. Code is like below

 [Embed(source='/assets/images/lot_dimensions_bg_4digit.png')]

SDK version

<flex.sdk.version>4.5.1.21328</flex.sdk.version>

Flex Mojos version

<flex-mojos.version>4.0-beta-7</flex-mojos.version>

Thanks for any help.

2

There are 2 answers

1
Pete On

You need to specifically add a dependency for flexmojos-threadlocaltoolkit-wrapper before the compiler dependency.

See the following page for more details: https://dev.c-ware.de/confluence/display/PUBLIC/Configuring+your+poms

0
AudioBubble On

I'm using the same version of the Flex SDK, but I'm using flexmojos 4.0-RC2. Embedded assets are working fine for me.

Make sure that when you build, you're copying the embedded assets over into target/classes. I had to include some special configuration for that.

<plugin>
    <groupId>org.sonatype.flexmojos</groupId>
    <artifactId>flexmojos-maven-plugin</artifactId>
    <version>${flexmojos.version}</version>
    <extensions>true</extensions>
    <configuration>
        <debug>true</debug>
        <configurationReport>true</configurationReport>
        <sourceFile>com/example/MyApp.mxml</sourceFile>
        <swfVersion>11</swfVersion>
        <flexBuilderCompatibility>true</flexBuilderCompatibility>
        <descriptorTemplate>${basedir}/${application.name}-app.xml</descriptorTemplate>

        <!-- Here's the extra config -->
        <includeFileSets>
            <fileset>
                <directory>src/main/resources/embedded</directory>
                <includes>
                    <include>*.*</include>
                </includes>
            </fileset>
        </includeFileSets>
    </configuration>
</plugin>