A bit of an odd problem after upgrading to Flexmojos 4 to get the new
support for modules.

We have a multi-module project that compiled ok with Flexmojos 3.
After upgrading to Flex 4 it first complained that it couldn't find
the CSS file.  So the code     <mx:Style source="/
default_lifecycle.css" />  resulted in the error "Error: Problem
finding external stylesheet: /default_lifecycle.css".  I found the
solution to this problem in a previous post where the following code
allows it to find the CSS file:

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>1.5</version>
                <executions>
                    <execution>
                        <id>add-source</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>add-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>src/main/resources</source>
                            </sources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

Within my CSS I have some embedded images such as: email-broadcast-
icon: Embed('/icons/email_broadcast_50.png');
Flexmojos 4 now complains with the error " Error: Invalid Embed
directive in stylesheet - can't resolve source 'Embed("/icons/
email_broadcast_50.png")'."

The one difference I have from a simple project is that I store all my
resources/icons up a few directories in a shared directory called
"resources/icons".  In Flexmojos 3 I simply needed code like:

        <resources>
            <resource>
                <directory>${basedir}/../../resources</directory>
                <includes>
                    <include>**/sms_50.png</include>
                    <include>**/email_broadcast_50.png</include>
                    <include>**/email_50.png</include>
                    <include>**/phone_50.png</include>
                </includes>
            </resource>
        </resources>
In the <build> section of the POM and it would work.  In Flexmojos 4
this no longer seems to work.  I've tried various other things such as
copying the resources directly into src/main/resources but still with
no luck.  The only thing that has worked has been to actually copy the
resources into src/main/flex which seems really odd.

So as a summary, Flexmojos 4 can't seem to find my CSS nor my icons
under src/main/resources.  Furthermore, the build-helper-maven-plugin
solution I mentioned above only seems to work for the CSS and not for
the icons.

I guess my questions in the simplest form are:
 * What should go in src/main/resources if not for resources such as
CSS/images?  Or is this a regression?
 * How do you specify an alternative directory to find resources?

P.S. I am using Flexmojos4-beta1 as both beta2 and SNAPSHOT currently
fail with the asdoc-dita issue as described here:
http://groups.google.com/group/flex-mojos/browse_thread/thread/16043168bea5142d

-- 
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

http://flexmojos.sonatype.org/

Reply via email to