1 Reply Latest reply on Jul 29, 2011 7:30 AM by jeffreysnell

    build project flex with maven

    main.mxml

      Good afternoon,

      I am currently working with maven and flex in a system development project consulting, I have done all the configuration for the maven pom.xml, but when I generate the install project returns a very strange error dependency. Below is the error and then my maven pom.xml:

      - Log maven
      [WARNING]
      [WARNING] Some Were problems encountered while building the effective settings
      [WARNING] 'pluginRepositories.pluginRepository.id' must not be 'local', this identifier is reserved for the local repository, using it for other repositories will corrupt your metadata repository. @ C: \ Users \ Admin \. M2 \ settings.xml
      [WARNING]
      [INFO] Scanning for projects ...
      [WARNING]
      [WARNING] Some Were problems encountered while building the model is effective consult-flex: consult-flex: swf: 0.0.1
      [WARNING] 'dependencies.dependency. (GroupId: artifactId: type: classifier)' must be unique: com.adobe.flexunit: FlexUnit: swc -> version 0.85 vs. 4.0-beta-2 @ line 101, column 15
      [WARNING] 'dependencyManagement.dependencies.dependency. (GroupId: artifactId: type: classifier)' must be unique: com.adobe.flexunit: FlexUnit: swc -> version 0.85 vs. 4.0-beta-2 @ br.com.tbm. consult, consult-all: 0.0.1, G: \ Fonts \ workspace \ consult-all \ pom.xml, line 235, column 16
      [WARNING] 'dependencies.dependency.scope' is org.graniteds: granite-essentials-swc, swc must be one of [provided, compile, runtime, test, system] is but 'internal'. @ Line 32, column 11
      [WARNING] 'dependencies.dependency.scope' is com.adobe.flex.framework: TextLayout: swc must be one of [provided, compile, runtime, test, system] but is 'caching'. @ Line 41, column 11
      [WARNING] 'dependencies.dependency.scope' is com.adobe.flex.framework: framework: swc must be one of [provided, compile, runtime, test, system] but is 'caching'. @ Line 48, column 11
      [WARNING]  'dependencies.dependency.scope' is com.adobe.flex.framework: spark: swc  must be one of [provided, compile, runtime, test, system] but is  'caching'. @ Line 55, column 11
      [WARNING] 'pluginRepositories.pluginRepository.id' must not be 'local', this identifier is reserved for the local repository, using it for other repositories will corrupt your metadata repository.
      [WARNING]
      [WARNING] It is highly recommended to fix These problems because They Threaten the Stability of your build.
      [WARNING]
      [WARNING] For this reason, future versions Maven Might no longer support building projects such as malformed.
      [WARNING]
      [INFO]
      [INFO] ----------------------------------------------- -------------------------
      [INFO] Building consult flex-0.0.1
      [INFO] ----------------------------------------------- -------------------------
      [INFO]
      [INFO] --- maven-clean-plugin: 2.4.1: clean (default-clean) --- @ consult-flex
      [INFO] Deleting G: \ Fonts \ workspace \ consult-all \ consult-flex \ target
      [INFO]
      [INFO] --- maven-resources-plugin: 2.5: resources (default-resources) @ consult-flex ---
      [Debug] run contextualize
      [INFO] Using 'UTF-8' encoding to copy filtered resources.
      [INFO] skip non existing resourceDirectory G: \ Fonts \ workspace \ consult-all \ consult-flex \ src \ main \ resources
      [INFO]
      [INFO] --- flexmojos-maven-plugin :4.0-pre-alpha-1: compile-swf (default-compile-swf) --- @ consult-flex
      [INFO] Flexmojos 4.0-pre-alpha-1
      [INFO] Apache License - Version 2.0 (NO WARRANTY) - See COPYRIGHT file
      G: \ Fonts \ workspace \ consult-all \ consult-flex \ src \ main \ flex \ main.mxml: Error: Unable to locate specified base class 'spark.components.Application' for component class 'Main'.

      [INFO] ----------------------------------------------- -------------------------
      [INFO] BUILD FAILURE
      [INFO] ----------------------------------------------- -------------------------
      [INFO] Total time: 5.113s
      [INFO] Finished at: Fri Jul 15 13:16:22 EDT 2011
      [INFO] Final Memory: 7M/27M
      [INFO] ----------------------------------------------- -------------------------
      [ERROR] Failed to execute goal org.sonatype.flexmojos: flexmojos-maven-plugin :4.0-pre-alpha-1: compile-swf (default-compile-swf) consult on project-flex: Got a building project errors, check logs -> [Help 1]
      [ERROR]
      [ERROR] To see the full stack trace of the errors, re-run Maven with the-e switch.
      [ERROR] Maven Re-run using the-X switch to enable full debug logging.
      [ERROR]
      [ERROR] For more information about the Possible errors and solutions, please read The Following articles:
      [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

      - Pom.xml

      <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/xsd/maven-4.0.0.xsd">
      <modelVersion> 4.0.0 </ modelVersion>

      <parent>
      <artifactId> consult-all </ artifactId>
      <groupId> br.com.tbm.consult </ groupId>
      VERSION 0.0.1 </ version>
      </ Parent>

      <groupId> consult-flex </ groupId>
      <artifactId> consult-flex </ artifactId>
      VERSION 0.0.1 </ version>
      <packaging> swf </ packaging>
      <name> consult-flex </ name>
      <url> http://maven.apache.org </ url>

      <dependencies>
      <! - GraniteDS Dependencies ->
      <dependency>
      <groupId> org.graniteds </ groupId>
      <artifactId> granite-swc </ artifactId>
      graniteds.version $ {VERSION} </ version>
      <type> swc </ type>
      </ Dependency>
      <dependency>
      <groupId> org.graniteds </ groupId>
      <artifactId> granite-swc-essentials </ artifactId>
      graniteds.version $ {VERSION} </ version>
      <type> swc </ type>
      <! - All the content of this lib must be included in the SWF ->
      <scope> internal </ scope>
      </ Dependency>


      <dependency>
      <groupId> com.adobe.flex.framework </ groupId>
      <artifactId> TextLayout </ artifactId>
      flex.sdk.version $ {VERSION} </ version>
      <type> swc </ type>
      <scope> caching </ scope>
      </ Dependency>
      <dependency>
      <groupId> com.adobe.flex.framework </ groupId>
      <artifactId> framework </ artifactId>
      flex.sdk.version $ {VERSION} </ version>
      <type> swc </ type>
      <scope> caching </ scope>
      </ Dependency>
      <dependency>
      <groupId> com.adobe.flex.framework </ groupId>
      <artifactId> spark </ artifactId>
      flex.sdk.version $ {VERSION} </ version>
      <type> swc </ type>
      <scope> caching </ scope>
      <optional> true </ optional>
      </ Dependency>
      <dependency>
      <groupId> com.adobe.flex.framework </ groupId>
      <artifactId> airspark </ artifactId>
      flex.sdk.version $ {VERSION} </ version>
      <type> swc </ type>
      <scope> compile </ scope>
      </ Dependency>
      <dependency>
      <groupId> com.adobe.flex.framework </ groupId>
      <artifactId> sparkskins </ artifactId>
      flex.sdk.version $ {VERSION} </ version>
      <type> swc </ type>
      <scope> compile </ scope>
      </ Dependency>



      <! - Flex Dependencies ->
      <dependency>
      <groupId> com.adobe.flex.framework </ groupId>
      <artifactId> flex-framework </ artifactId>
      flex.sdk.version $ {VERSION} </ version>
      <type> pom </ type>
      <exclusions>
      <exclusion>
      <groupId> com.adobe.flex.framework </ groupId>
      <artifactId> playerglobal </ artifactId>
      </ Exclusion>
      </ Exclusions>
      </ Dependency>
      <dependency>
      <groupId> com.adobe.flex.framework </ groupId>
      <artifactId> playerglobal </ artifactId>
      flash.player.version $ {VERSION} </ version>
      <type> swc </ type>
      </ Dependency>
      <dependency>
      <groupId> com.adobe.flexunit </ groupId>
      <artifactId> FlexUnit </ artifactId>
      VERSION 0.85 </ version>
      <type> swc </ type>
      <scope> test </ scope>
      </ Dependency>
      <dependency>
      <groupId> com.adobe.flexunit </ groupId>
      <artifactId> FlexUnit </ artifactId>
      VERSION 4.0-beta-2 </ version>
      <type> swc </ type>
      <scope> test </ scope>
      </ Dependency>
      <dependency>
      <groupId> flexlib </ groupId>
      <artifactId> flexlib </ artifactId>
      <type> swc </ type>
      VERSION 2.5 </ version>
      <classifier> FLEX3 </ classifier>
      <scope> compile </ scope>
      </ Dependency>
      </ Dependencies>

      <build>
      <sourceDirectory> src / main / flex </ sourceDirectory>
      <plugins>
      <plugin>
      <groupId> org.sonatype.flexmojos </ groupId>
      <artifactId> flexmojos-maven-plugin </ artifactId>
      VERSION 4.0-pre-alpha-1 </ version>
      <extensions> true </ extensions>

      <dependencies>
      <dependency>
      <groupId> com.adobe.flex </ groupId>
      <artifactId> compiler </ artifactId>
      flex.sdk.version $ {VERSION} </ version>
      <type> pom </ type>
      </ Dependency>
      </ Dependencies>

      <configuration>
      <output> consult-flex </ output>
      <targetPlayer> 10.0.0 </ targetPlayer>
      <debug> false </ debug>
      <locale> en_US </ locale>
      <showWarnings> true </ showWarnings>
      <sourcePaths>
      <path> $ {basedir} / src / main / flex </ path>
      </ SourcePaths>
      <contextRoot> refer-frontend </ contextRoot>
      <testFailureIgnore> true </ testFailureIgnore>
      <! - <services> .. / Consult-frontend / src / main / webapp / WEB-INF / flex / services-config.xml </ services> ->
      <generatorToUse> graniteds2 </ generatorToUse>
      </ Configuration>
      </ Plugin>
      </ Plugins>
      </ Build>
      </ Project>

       

      Has anyone experienced a similar problem??

      note: you sorry because my English is not perfect, but I need your help!