Unfortunately the modules support on flexmojos 3.x series is broken. It build broken SWFs and I have no clue why. But it is working perfectly on flexmojos 4.x
On Sat, Jul 17, 2010 at 4:49 PM, Michael Bushe <[email protected]> wrote: > I think I found an error in the processing of Flex modules in 3.7.1 – if > the package of the flex module class does not match the groupId+artifactId, > flexmojos can't find code to compile. > > I have a simple project with one AS file in it. The top of the pom looks > like this: > <?xml version="1.0"?> > <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> > <groupId>com.mindfulsoftware</groupId> > <artifactId>flexmodule</artifactId> > <version>1.0-SNAPSHOT</version> > <packaging>swf</packaging> > <name>Testing FlexMojos Module Building</name> > > If the package of the module matches the groupId + artifactId in the pom, > then Flexmojos compiles the module: > … > INFO] Compiling module > …mod/src/main/flex/com/mindfulsoftware/flexmodule/MyModule.mxml > … > > However, if I change the name of the package to foomodule (rename the > directory and change the <moduleFile> contents to match) , then I get this: > [INFO] Flexmojos 3.7.1 > [INFO] Apache License - Version 2.0 (NO WARRANTY) - See COPYRIGHT file > [WARNING] Source file was not defined, flexmojos will guess one. > [INFO] > ------------------------------------------------------------------------ > [ERROR] BUILD ERROR > [INFO] > ------------------------------------------------------------------------ > [INFO] Source file not expecified and no default found! > > Is this the expected behavior or a shall I file a bug? > > The full failing pom is: > ?xml version="1.0"?> > <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> > <groupId>com.mindfulsoftware</groupId> > <artifactId>flexmodule</artifactId> > <version>1.0-SNAPSHOT</version> > <packaging>swf</packaging> > <name>Testing FlexMojos Module Building</name> > > <properties> > <flexFrameworkVersion>3.5.0.12683</flexFrameworkVersion> > <flashPlayerMajorVersion>10</flashPlayerMajorVersion> > <flashPlayerVersion>10.0.45.2</flashPlayerVersion> > <flexmojos.version>3.7.1</flexmojos.version> > </properties> > > <build> > <sourceDirectory>src/main/flex</sourceDirectory> > <testSourceDirectory>src/test/flex</testSourceDirectory> > <plugins> > <plugin> > <groupId>org.sonatype.flexmojos</groupId> > <artifactId>flexmojos-maven-plugin</artifactId> > <version>${flexmojos.version}</version> > <extensions>true</extensions> > <configuration> > <optimize>true</optimize> > <!-- When true, tells flexmojos to use link > reports/load externs on modules compilation --> > <loadExternsOnModules>true</loadExternsOnModules> > <locales> > <locale>en_US</locale> > </locales> > <debug>true</debug> > <targetPlayer>${flashPlayerVersion}</targetPlayer> > <verboseStacktraces>true</verboseStacktraces> > <!--- > Same effects if this is included or not. > <includeSources> > <sources>${basedir}/src/main/flex</sources> > </includeSources> > --> > <moduleFiles> > > <moduleFile>com/mindfulsoftware/foomodule/MyModule.mxml</moduleFile> > </moduleFiles> > </configuration> > <dependencies> > <dependency> > <groupId>com.adobe.flex</groupId> > <artifactId>compiler</artifactId> > <version>${flexFrameworkVersion}</version> > <type>pom</type> > </dependency> > </dependencies> > </plugin> > </plugins> > </build> > > > <dependencies> > <!-- Flex --> > <dependency> > <groupId>com.adobe.flex.framework</groupId> > <artifactId>flex-framework</artifactId> > <version>${flexFrameworkVersion}</version> > <type>pom</type> > <exclusions> > <!-- exclude the default 'playerglobal' transitive > dependency (9.0) --> > <exclusion> > <groupId>com.adobe.flex.framework</groupId> > <artifactId>playerglobal</artifactId> > </exclusion> > </exclusions> > </dependency> > <dependency> > <groupId>com.adobe.flex.framework</groupId> > <artifactId>playerglobal</artifactId> > <version>${flexFrameworkVersion}</version> > <classifier>${flashPlayerMajorVersion}</classifier> > <type>swc</type> > </dependency> > <dependency> > <groupId>com.adobe.flex.framework</groupId> > <artifactId>airframework</artifactId> > <version>${flexFrameworkVersion}</version> > <type>pom</type> > </dependency> > <!-- flexmojos Unit testing support --> > <dependency> > <groupId>org.sonatype.flexmojos</groupId> > <artifactId>flexmojos-unittest-support</artifactId> > <version>${flexmojos.version}</version> > <type>swc</type> > <scope>test</scope> > </dependency> > > <!-- Based on testing library dependency specified, FlexMojos will > know how to test your application --> > <dependency> > <groupId>com.adobe.flexunit</groupId> > <artifactId>flexunit</artifactId> > <version>4.0-beta-2</version> > <type>swc</type> > <scope>test</scope> > </dependency> > </dependencies> > <repositories> > <repository> > <id>flexmojos</id> > <url>http://repository.sonatype.org/content/groups/flexgroup/ > </url> > <releases> > <enabled>true</enabled> > </releases> > <snapshots> > <enabled>true</enabled> > </snapshots> > </repository> > </repositories> > > </project> > > Thanks, > > Michael Bushe > RIA Architect > Mindful Software > www.bushe.com > www.mindfulsoftware.com > > -- > 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]<flex-mojos%[email protected]> > For more options, visit this group at > http://groups.google.com/group/flex-mojos > > http://flexmojos.sonatype.org/ > -- 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/
