Announcement Announcement Module
Collapse
No announcement yet.
org.as3commons.lang woes Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • org.as3commons.lang woes

    Hi, I pulled in sas3 0.8.1 via the maven repo, and it won't compile for me on the command line with flexmojos. It seems to be missing some as3commons types, but these are pulled in as transitive dependencies. Can someone advise?

    Thanks

    [ERROR] C:\Documents and Settings\dford\.m2\repository\org\springextensions \actionscript\spring-actionscript-core\0.8.1\spring-actionscript-core-0.8.1.swc(org/springextensions/actionscript/utils/ObjectUtils):[-1,-1] Type was not found or was not a compile-time constant: Type.
    [ERROR] C:\Documents and Settings\dford\.m2\repository\org\springextensions \actionscript\spring-actionscript-core\0.8.1\spring-actionscript-core-0.8.1.swc(org/springextensions/actionscript/ioc/ObjectDefinition):[-1,-1] Type was not found or was not a compile-time constant: [org.as3commons.lang]::IEquals.
    [ERROR] C:\Documents and Settings\dford\.m2\repository\org\springextensions \actionscript\spring-actionscript-core\0.8.1\spring-actionscript-core-0.8.1.swc(org/springextensions/actionscript/context/support/mxml/AbstractMXMLObject):[-1,-1] Type was not found or was not a compile-time constant: [org.as3commons.lang]::ICloneable.

  • #2
    Hi Zenocon,

    do you see any artifact download problem/warning before seeing this compile problems? The maven system should automatically download as3commons dependencies for you before the compile.

    Comment


    • #3
      Hi Martino -- see below the output from mvn project-info-reports:depenencies. I think the problem may be that as3commons is scoped as a transitive runtime dependency, not compile. If I import this project into FlexBuilder it compiles just fine. It only fails on the command line. Any thoughts?

      Regards,
      Davis

      Code:
      my.group:my.artifact:swf:6.1.0 
        com.adobe.flexunit:flexunit:swc:4.0-beta-2 (test) 
        mock-as3:mock-as3:swc:svn-rev-30 (test) 
        com.adobe.flex.framework:flex-framework:pom:3.4.0.9271 (compile) 
          com.adobe.flex.framework:flex:swc:3.4.0.9271 (compile) 
          com.adobe.flex.framework:framework:swc:3.4.0.9271 (compile) 
          com.adobe.flex.framework:framework:zip:configs:3.4.0.9271 (compile) 
          com.adobe.flex.framework:rpc:swc:3.4.0.9271 (compile) 
          com.adobe.flex.framework:utilities:swc:3.4.0.9271 (compile) 
          com.adobe.flex.framework:playerglobal:swc:9:3.4.0.9271 (compile) 
          com.adobe.flex.framework:framework:rb.swc:3.4.0.9271 (compile) 
          com.adobe.flex.framework:rpc:rb.swc:3.4.0.9271 (compile) 
        org.springextensions.actionscript:spring-actionscript-core:swc:0.8.1 (compile) 
          org.as3commons:as3commons-lang:swc:0.1 (runtime) 
          org.as3commons:as3commons-logging:swc:1.1 (runtime) 
          org.as3commons:as3commons-reflect:swc:1.1 (runtime)

      Comment


      • #4
        I was able to work around this by adding the following explicit compile scope dependencies:

        Code:
        <dependency>
        	<groupId>org.as3commons</groupId>
        	<artifactId>as3commons-lang</artifactId>
        	<version>0.1</version>
        	<type>swc</type>
        	<exclusions>
        		<exclusion>
        			<groupId>com.adobe.flex.framework</groupId>
        			<artifactId>flex-framework</artifactId>
        		</exclusion>
        	</exclusions>
        	<scope>compile</scope>
        </dependency>
        <dependency>
        	<groupId>org.as3commons</groupId>
        	<artifactId>as3commons-logging</artifactId>
        	<version>1.1</version>
        	<type>swc</type>
        	<exclusions>
        		<exclusion>
        			<groupId>com.adobe.flex.framework</groupId>
        			<artifactId>flex-framework</artifactId>
        		</exclusion>
        	</exclusions>
        	<scope>compile</scope>
        </dependency>
        <dependency>
        	<groupId>org.as3commons</groupId>
        	<artifactId>as3commons-reflect</artifactId>
        	<version>1.1</version>
        	<type>swc</type>
        	<exclusions>
        		<exclusion>
        			<groupId>com.adobe.flex.framework</groupId>
        			<artifactId>flex-framework</artifactId>
        		</exclusion>
        		<exclusion>
        			<groupId>org.as3commons</groupId>
        			<artifactId>as3commons-logging</artifactId>
        		</exclusion>
        	</exclusions>
        	<scope>compile</scope>
        </dependency>
        This is not a big deal, but still kind of defeats the purpose of maven's built-in dependency management. If those transitive deps were scoped as compile in springactionscript-core then I wouldn't have to do this in my pom.

        Also, I'm noting that you're using an older version of flexmojos plugin. I'm using the relatively nice & stable 3.4.2 which has better support for flexunit4.

        Here's a quick snippet on configuring it if you think you might want to move up...it is no longer necessary to pull in flexmojos unittest support dependency.

        Code:
        <properties>
        	<flexmojos.version>3.4.2</flexmojos.version>
        	<flex.sdk.version>3.4.0.9271</flex.sdk.version>
        	<flexunit.version>4.0-beta-2</flexunit.version>
        </properties>
        
        <dependency>
        	<groupId>com.adobe.flex.framework</groupId>
        	<artifactId>flex-framework</artifactId>
        	<version>${flex.sdk.version}</version>
        	<type>pom</type>
        	<scope>compile</scope>
        </dependency>
        
        <plugin>
        	<groupId>org.sonatype.flexmojos</groupId>
        	<artifactId>flexmojos-maven-plugin</artifactId>
        	<version>${flexmojos.version}</version>
        	<dependencies>
        		<dependency>
        			<groupId>com.adobe.flex</groupId>
        			<artifactId>compiler</artifactId>
        			<version>${flex.sdk.version}</version>
        			<type>pom</type>
        		</dependency>
        	</dependencies>
        	<executions>
        		<execution>
        			<goals>
        				<goal>wrapper</goal>
        			</goals>
        		</execution>
        	</executions>
        	<extensions>true</extensions>
        	<configuration>
        		<locales>
        			<locale>en_US</locale>
        		</locales>
        		<debug>true</debug>
        		<configurationReport>true</configurationReport>
        	</configuration>
        </plugin>

        Comment


        • #5
          I'm really surprised about this problem, definitely the dependencies shouldn't be runtime but compile. I will review this for 0.9 which is coming soon and definitely update to newer stable flexmojos, thanks for reporting this.

          Comment

          Working...
          X