Hello, I was trying to compile an air-application using flexmojos 4
When I ran the dependency tree on the application, the result contained the following [INFO] | +- br.com.p2d.thirdparty.flex:flexlib:swc:1.0:external [INFO] | +- com.adobe.flex.framework:airframework:rb.swc: 3.5.0.12683:runtime [INFO] | +- com.adobe.flex.framework:airframework:swc: 3.5.0.12683:external [INFO] | +- com.adobe.flex.framework:applicationupdater:swc: 3.5.0.12683:runtime [INFO] | +- com.adobe.flex.framework:applicationupdater_ui:swc: 3.5.0.12683:runtime [INFO] | +- com.adobe.flex.framework:flex:swc:3.5.0.12683:external [INFO] | +- com.adobe.flex.framework:flex-framework:pom: 3.5.0.12683:external (scope managed from runtime) [INFO] | +- com.adobe.flex.framework:framework:rb.swc: 3.5.0.12683:runtime [INFO] | +- com.adobe.flex.framework:framework:swc: 3.5.0.12683:external [INFO] | +- com.adobe.flex.framework:framework:zip:configs: 3.5.0.12683:runtime [INFO] | +- com.adobe.flex.framework:playerglobal:swc: 9:3.5.0.12683:runtime [INFO] | +- com.adobe.flex.framework:rpc:rb.swc:3.5.0.12683:runtime [INFO] | +- com.adobe.flex.framework:rpc:swc:3.5.0.12683:external [INFO] | +- com.adobe.flex.framework:servicemonitor:swc: 3.5.0.12683:runtime [INFO] | \- com.adobe.flex.framework:utilities:swc: 3.5.0.12683:runtime [INFO] +- com.adobe.flex.framework:air-framework:pom: 3.5.0.12683:external [INFO] \- com.adobe.flex.framework:airglobal:swc:3.5.0.12683:external When I compiled, in the test-compile goal it gave out the message: Error: Type was not found or was not a compile-time constant: NativeWindow. So I went and debugged flexmojos code. I found out that in the TestCompileMojo, there's a method called getExternalLibraryPath(), that eventually calls getDependency() on AbstractMavenMojo that in its turn calls: return selectFirst( getDependencies(), allOf( matchers ) ); And the Matcher matchers accepts airglobal.swc and playerglobal.swc. My question is: is this the expected behaviour? Shouldn't it declare airglobal instead since if I'm declaring a dependency to airglobal my application is an AIR application, or at least signal an error saying that I shouldn't have both playerglobal and airglobal in the dependency:tree? I'm asking this because it gets very confusing. For example, if I declare the airglobal as the first dependency on the pom.xml, the dependency:tree contains: [INFO] +- com.adobe.flex.framework:airglobal:swc:3.5.0.12683:external [INFO] | +- br.com.p2d.thirdparty.flex:flexlib:swc:1.0:external [INFO] | +- com.adobe.flex.framework:airframework:rb.swc: 3.5.0.12683:runtime [INFO] | +- com.adobe.flex.framework:airframework:swc: 3.5.0.12683:external [INFO] | +- com.adobe.flex.framework:applicationupdater:swc: 3.5.0.12683:runtime [INFO] | +- com.adobe.flex.framework:applicationupdater_ui:swc: 3.5.0.12683:runtime [INFO] | +- com.adobe.flex.framework:flex:swc:3.5.0.12683:external [INFO] | +- com.adobe.flex.framework:flex-framework:pom: 3.5.0.12683:external (scope managed from runtime) [INFO] | +- com.adobe.flex.framework:framework:rb.swc: 3.5.0.12683:runtime [INFO] | +- com.adobe.flex.framework:framework:swc: 3.5.0.12683:external [INFO] | +- com.adobe.flex.framework:framework:zip:configs: 3.5.0.12683:runtime [INFO] | +- com.adobe.flex.framework:playerglobal:swc: 9:3.5.0.12683:runtime [INFO] | +- com.adobe.flex.framework:rpc:rb.swc:3.5.0.12683:runtime [INFO] | +- com.adobe.flex.framework:rpc:swc:3.5.0.12683:external [INFO] | +- com.adobe.flex.framework:servicemonitor:swc: 3.5.0.12683:runtime [INFO] | \- com.adobe.flex.framework:utilities:swc: 3.5.0.12683:runtime [INFO] +- com.adobe.flex.framework:air-framework:pom: 3.5.0.12683:external And the compilation works (since selectFirst will now get airglobal instead of playerglobal. Thanks for the help, Rafael ---------- Forwarded message ---------- From: John <[email protected]> Date: Aug 20 2009, 3:02 pm Subject: Compile error: Type was not found or was not a compile-time constant: NativeWindow To: Flex Mojos That would be a great news to a lot of users. Look forward to it. Thanks, John On Aug 20, 12:51 pm, Marvin Froeder <[email protected]> wrote: > I will need to customize artifact resolution... flex and current maven > resolution aren't playing nice together .... > Flexmojos needs some custom rules, for instance, if current project declares > air-framework or flex-framework it should ignore air/flex deps from deps > tree. > VELO > On Thu, Aug 20, 2009 at 1:44 PM, John <[email protected]> wrote: > > You are right. I will try to exclude that to see if it helps. > > Thanks, > > John > > [INFO] [dependency:tree {execution: default-cli}] > > [INFO] com.jtv:simpleProto:swf:1.0-SNAPSHOT > > [INFO] +- org.springextensions.actionscript:spring-actionscript- > > core:swc:0.8:external > > [INFO] | \- com.adobe.flex.framework:playerglobal:swc: > > 9-3.2.0.3958:runtime > > [INFO] +- org.springextensions.actionscript:spring-actionscript- > > puremvc-standard:swc:0.8:compile > > [INFO] +- org.puremvc:puremvc-as3-standard:swc:2.0.4:compile > > [INFO] +- org.as3commons:as3commons-lang:swc:1.0.0-SNAPSHOT:merged > > [INFO] | \- com.adobe.flex.framework:flex-framework:pom: > > 3.2.0.3958:runtime > > [INFO] | \- com.adobe.flex.framework:playerglobal:swc: > > 9:3.2.0.3958:runtime > > [INFO] +- org.as3commons:as3commons-logging:swc:1.0.0:merged > > [INFO] +- org.as3commons:as3commons-reflect:swc:1.0.0:merged > > [INFO] +- com.adobe.flex.framework:air-framework:pom: > > 3.3.0.4852:compile > > [INFO] | +- com.adobe.flex.framework:airframework:swc: > > 3.3.0.4852:compile > > [INFO] | +- com.adobe.flex.framework:airglobal:swc:3.3.0.4852:compile > > [INFO] | +- com.adobe.flex.framework:applicationupdater:swc: > > 3.3.0.4852:compile > > [INFO] | +- com.adobe.flex.framework:applicationupdater_ui:swc: > > 3.3.0.4852:compile > > [INFO] | +- com.adobe.flex.framework:servicemonitor:swc: > > 3.3.0.4852:compile > > [INFO] | +- com.adobe.flex.framework:flex:swc:3.2.0.3958:compile > > [INFO] | +- com.adobe.flex.framework:framework:swc:3.2.0.3958:compile > > [INFO] | +- com.adobe.flex.framework:rpc:swc:3.2.0.3958:compile > > [INFO] | +- com.adobe.flex.framework:utilities:swc:3.3.0.4852:compile > > [INFO] | +- com.adobe.flex.framework:airframework:rb.swc: > > 3.3.0.4852:compile > > [INFO] | +- com.adobe.flex.framework:rpc:rb.swc:3.2.0.3958:compile > > [INFO] | +- com.adobe.flex.framework:framework:rb.swc: > > 3.2.0.3958:compile > > [INFO] | \- com.adobe.flex.framework:framework:zip:configs: > > 3.3.0.4852:compile > > [INFO] +- flexlib:flexlib-bin:swc:2.4:compile > > [INFO] +- org.sonatype.flexmojos:flexmojos-unittest-support:swc: > > 3.2.0:test > > [INFO] | +- org.funit:funit:swc:0.50.0245:test > > [INFO] | +- com.swirlyvision:swirly-vision:swc:1.0:test > > [INFO] | +- net.digitalprimates:fluint:swc:v1:test > > [INFO] | +- com.asunit:asunit:swc:20071011:test > > [INFO] | \- advancedflex:debugger:swc:0.2alpha2:test > > [INFO] \- com.adobe.flexunit:flexunit:swc:4.0-alpha-1.0:test (scope > > not updated to runtime) > > [INFO] > > ------------------------------------------------------------------------ > > On Aug 20, 12:20 pm, Marvin Froeder <[email protected]> wrote: > > > Somehow a player global is sneaking into your build.... > > > mvn dependency:tree > > > On Thu, Aug 20, 2009 at 1:16 PM, John <[email protected]> wrote: > > > > Yes. I saw two posts, one used flex super pom only and the other used > > > > air super pom only. Thus, I tried both ways, but seems got the same > > > > result. > > > > Thanks, > > > > John > > > > On Aug 20, 12:09 pm, Marvin Froeder <[email protected]> wrote: > > > > > I mean, why did you comment air super pom and only let flex super > > pom? > > > > > VELO > > > > > On Thu, Aug 20, 2009 at 1:04 PM, John <[email protected]> > > wrote: > > > > > > Copied from the following wiki. > > > > > >https://docs.sonatype.org/display/FLEXMOJOS/Package+AIR+Application > > > > > > If I remove it, the result is the same. > > > > > > Thanks, > > > > > > John > > > > > > On Aug 20, 11:51 am, velo <[email protected]> wrote: > > > > > > > Why is that? > > > > > > > > <parent> > > > > > > > > <groupId>org.sonatype.flexmojos</groupId> > > > > > > > > <artifactId>flexmojos-flex-super-pom</artifactId> > > > > > > > > <!--artifactId>flexmojos-air-super-pom</artifactId--> > > > > > > > > <version>3.2.0</version> > > > > > > > > </parent> > > > > > > > VELO -- 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/
