tags:

views:

24

answers:

0

I tried to compile using maven-flex2-plugin plugin with maven here is the error I got:

D:\PROJECTS\flex\Reports>mvn clean install
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Reports Maven Flex
[INFO]    task-segment: [clean, install]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean {execution: default-clean}]
[INFO] Deleting directory D:\PROJEKTI\flex\Reports\target
[INFO] [flex2:compile-swf {execution: default-compile-swf}]
[INFO] Attaching licenses.
[INFO] Adding Extra Parameters: []
[INFO] Failed to invoke null with parameters: [+flexlib=C:\Program Files\Adobe\A
dobe Flash Builder 4\sdks\4.1.0\frameworks, -load-config, C:\Program Files\Adobe
\Adobe Flash Builder 4\sdks\4.1.0\frameworks\flex-config.xml, -source-path, D:\P
ROJEKTI\flex\Reports\src\main\flex, -output, D:\PROJEKTI\flex\Reports\target\Rep
orts-0.0.1-SNAPSHOT.swf, -compiler.locale, en_US, -use-network, -compiler.debug=
false, --, Main.mxml]
[INFO] java.lang.ClassNotFoundException: flex2.tools.Compiler
[INFO]  at java.net.URLClassLoader$1.run(Unknown Source)
[INFO]  at java.security.AccessController.doPrivileged(Native Method)
[INFO]  at java.net.URLClassLoader.findClass(Unknown Source)
[INFO]  at java.lang.ClassLoader.loadClass(Unknown Source)
[INFO]  at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
[INFO]  at java.lang.ClassLoader.loadClass(Unknown Source)
[INFO]  at net.israfil.mojo.flex2.StreamedParameterExecutableWrapper.main(Stream
edParameterExecutableWrapper.java:58)
[INFO] Exception in thread "main" java.lang.RuntimeException: java.lang.ClassNot
FoundException: flex2.tools.Compiler
[INFO]  at net.israfil.mojo.flex2.StreamedParameterExecutableWrapper.main(Stream
edParameterExecutableWrapper.java:66)
[INFO] Caused by: java.lang.ClassNotFoundException: flex2.tools.Compiler
[INFO]  at java.net.URLClassLoader$1.run(Unknown Source)
[INFO]  at java.security.AccessController.doPrivileged(Native Method)
[INFO]  at java.net.URLClassLoader.findClass(Unknown Source)
[INFO]  at java.lang.ClassLoader.loadClass(Unknown Source)
[INFO]  at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
[INFO]  at java.lang.ClassLoader.loadClass(Unknown Source)
[INFO]  at net.israfil.mojo.flex2.StreamedParameterExecutableWrapper.main(Stream
edParameterExecutableWrapper.java:58)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Result of flex2.tools.Compiler execution is: '1'.
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4 seconds
[INFO] Finished at: Wed Oct 20 21:57:20 CEST 2010
[INFO] Final Memory: 8M/19M
[INFO] ------------------------------------------------------------------------

Here is my pom :

<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"&gt;
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.test.flex</groupId>
  <artifactId>Reports</artifactId>
  <packaging>swf</packaging>
  <version>0.0.1-SNAPSHOT</version>
  <name>Reports Maven Flex</name>
  <url>http://maven.apache.org&lt;/url&gt;

  <properties>
    <flex.home>C:\Program Files\Adobe\Adobe Flash Builder 4\sdks\4.1.0</flex.home>
  </properties>
  <build>
    <sourceDirectory>src/main/flex</sourceDirectory>
    <plugins>
      <plugin>
        <groupId>net.israfil.mojo</groupId>
        <artifactId>maven-flex2-plugin</artifactId>
        <extensions>true</extensions>
        <configuration>
          <flexHome>${flex.home}</flexHome>
          <useNetwork>true</useNetwork>
          <main>Main.mxml</main>
        </configuration>
      </plugin>
    </plugins>
    <defaultGoal>install</defaultGoal>
  </build>
</project>

Has anyone encountered this problem ? is there solution ? is there a better way? I want to run my flex application on server as war