title: Maven and flex compile problem
body: <p>I tried to compile using <code>maven-flex2-plugin</code> plugin with maven here is the error I got:</p>
  
  <pre><code>D:\PROJECTS\flex\Reports&gt;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] ------------------------------------------------------------------------
  </code></pre>
  
  <p>Here is my pom :</p>
  
  <pre><code>&lt;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;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
    &lt;groupId&gt;com.test.flex&lt;/groupId&gt;
    &lt;artifactId&gt;Reports&lt;/artifactId&gt;
    &lt;packaging&gt;swf&lt;/packaging&gt;
    &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
    &lt;name&gt;Reports Maven Flex&lt;/name&gt;
    &lt;url&gt;http://maven.apache.org&lt;/url&gt;
  
    &lt;properties&gt;
      &lt;flex.home&gt;C:\Program Files\Adobe\Adobe Flash Builder 4\sdks\4.1.0&lt;/flex.home&gt;
    &lt;/properties&gt;
    &lt;build&gt;
      &lt;sourceDirectory&gt;src/main/flex&lt;/sourceDirectory&gt;
      &lt;plugins&gt;
        &lt;plugin&gt;
          &lt;groupId&gt;net.israfil.mojo&lt;/groupId&gt;
          &lt;artifactId&gt;maven-flex2-plugin&lt;/artifactId&gt;
          &lt;extensions&gt;true&lt;/extensions&gt;
          &lt;configuration&gt;
            &lt;flexHome&gt;${flex.home}&lt;/flexHome&gt;
            &lt;useNetwork&gt;true&lt;/useNetwork&gt;
            &lt;main&gt;Main.mxml&lt;/main&gt;
          &lt;/configuration&gt;
        &lt;/plugin&gt;
      &lt;/plugins&gt;
      &lt;defaultGoal&gt;install&lt;/defaultGoal&gt;
    &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>Has anyone encountered this problem ? is there solution ? is there a better way? I want to run my flex application on server as war</p>