You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by cd...@apache.org on 2012/12/02 14:06:14 UTC

svn commit: r1416169 - in /incubator/flex/utilities/trunk/maven-flex-plugin: components/api/src/main/java/org/apache/flex/maven/plugins/flex/compiler/ components/compiler/compiler-asdoc/ components/compiler/compiler-asdoc/src/main/java/org/ components/...

Author: cdutz
Date: Sun Dec  2 13:06:11 2012
New Revision: 1416169

URL: http://svn.apache.org/viewvc?rev=1416169&view=rev
Log:
- Created some dummy implementations of the 4 compiler components
- Implemented a version of the compiler mojo, which is able to use the different compiler implementations, depending on the current execution phase and a "useLegacyCompiler" configuration option

Added:
    incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-asdoc/src/main/java/org/
    incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-asdoc/src/main/java/org/apache/
    incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-asdoc/src/main/java/org/apache/flex/
    incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-asdoc/src/main/java/org/apache/flex/maven/
    incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-asdoc/src/main/java/org/apache/flex/maven/plugins/
    incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-asdoc/src/main/java/org/apache/flex/maven/plugins/flex/
    incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-asdoc/src/main/java/org/apache/flex/maven/plugins/flex/compiler/
    incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-asdoc/src/main/java/org/apache/flex/maven/plugins/flex/compiler/asdoc/
    incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-asdoc/src/main/java/org/apache/flex/maven/plugins/flex/compiler/asdoc/AsdocCompilerImpl.java
    incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-compc/src/main/java/org/
    incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-compc/src/main/java/org/apache/
    incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-compc/src/main/java/org/apache/flex/
    incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-compc/src/main/java/org/apache/flex/maven/
    incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-compc/src/main/java/org/apache/flex/maven/plugins/
    incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-compc/src/main/java/org/apache/flex/maven/plugins/flex/
    incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-compc/src/main/java/org/apache/flex/maven/plugins/flex/compiler/
    incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-compc/src/main/java/org/apache/flex/maven/plugins/flex/compiler/compc/
    incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-compc/src/main/java/org/apache/flex/maven/plugins/flex/compiler/compc/CompcCompilerImpl.java
    incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-falcon/src/main/java/org/
    incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-falcon/src/main/java/org/apache/
    incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-falcon/src/main/java/org/apache/flex/
    incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-falcon/src/main/java/org/apache/flex/maven/
    incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-falcon/src/main/java/org/apache/flex/maven/plugins/
    incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-falcon/src/main/java/org/apache/flex/maven/plugins/flex/
    incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-falcon/src/main/java/org/apache/flex/maven/plugins/flex/compiler/
    incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-falcon/src/main/java/org/apache/flex/maven/plugins/flex/compiler/falcon/
    incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-falcon/src/main/java/org/apache/flex/maven/plugins/flex/compiler/falcon/FalconCompilerImpl.java
    incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-mxmlc/src/main/java/org/
    incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-mxmlc/src/main/java/org/apache/
    incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-mxmlc/src/main/java/org/apache/flex/
    incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-mxmlc/src/main/java/org/apache/flex/maven/
    incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-mxmlc/src/main/java/org/apache/flex/maven/plugins/
    incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-mxmlc/src/main/java/org/apache/flex/maven/plugins/flex/
    incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-mxmlc/src/main/java/org/apache/flex/maven/plugins/flex/compiler/
    incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-mxmlc/src/main/java/org/apache/flex/maven/plugins/flex/compiler/mxmlc/
    incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-mxmlc/src/main/java/org/apache/flex/maven/plugins/flex/compiler/mxmlc/MxmlcCompilerImpl.java
Modified:
    incubator/flex/utilities/trunk/maven-flex-plugin/components/api/src/main/java/org/apache/flex/maven/plugins/flex/compiler/Compiler.java
    incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-asdoc/pom.xml
    incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-compc/pom.xml
    incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-falcon/pom.xml
    incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-mxmlc/pom.xml
    incubator/flex/utilities/trunk/maven-flex-plugin/plugins/maven-flex-plugin/pom.xml
    incubator/flex/utilities/trunk/maven-flex-plugin/plugins/maven-flex-plugin/src/main/java/org/apache/flex/maven/plugins/flex/compiler/CompilerMojo.java
    incubator/flex/utilities/trunk/maven-flex-plugin/testsuite/projects/concepts/flex/general/simple-swc/pom.xml
    incubator/flex/utilities/trunk/maven-flex-plugin/testsuite/projects/concepts/flex/general/simple-swf/pom.xml

Modified: incubator/flex/utilities/trunk/maven-flex-plugin/components/api/src/main/java/org/apache/flex/maven/plugins/flex/compiler/Compiler.java
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/trunk/maven-flex-plugin/components/api/src/main/java/org/apache/flex/maven/plugins/flex/compiler/Compiler.java?rev=1416169&r1=1416168&r2=1416169&view=diff
==============================================================================
--- incubator/flex/utilities/trunk/maven-flex-plugin/components/api/src/main/java/org/apache/flex/maven/plugins/flex/compiler/Compiler.java (original)
+++ incubator/flex/utilities/trunk/maven-flex-plugin/components/api/src/main/java/org/apache/flex/maven/plugins/flex/compiler/Compiler.java Sun Dec  2 13:06:11 2012
@@ -24,6 +24,6 @@ package org.apache.flex.maven.plugins.fl
  */
 public interface Compiler {
 
-    boolean compatible();
+    void compile();
 
 }

Modified: incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-asdoc/pom.xml
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-asdoc/pom.xml?rev=1416169&r1=1416168&r2=1416169&view=diff
==============================================================================
--- incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-asdoc/pom.xml (original)
+++ incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-asdoc/pom.xml Sun Dec  2 13:06:11 2012
@@ -36,12 +36,41 @@
 
     <name>Maven-Flex-Plugin / Components / Compiler / ASDoc</name>
 
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.codehaus.plexus</groupId>
+                <artifactId>plexus-component-metadata</artifactId>
+                <version>1.5.5</version>
+                <executions>
+                    <execution>
+                        <id>process-classes</id>
+                        <goals>
+                            <goal>generate-metadata</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
     <dependencies>
         <dependency>
             <groupId>org.apache.flex.components</groupId>
             <artifactId>api</artifactId>
             <version>1.0.0-SNAPSHOT</version>
         </dependency>
+        <dependency>
+            <groupId>org.apache.maven</groupId>
+            <artifactId>maven-plugin-api</artifactId>
+            <version>3.0.4</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.maven.plugin-tools</groupId>
+            <artifactId>maven-plugin-annotations</artifactId>
+            <version>3.2</version>
+            <scope>compile</scope>
+        </dependency>
     </dependencies>
 
 </project>
\ No newline at end of file

Added: incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-asdoc/src/main/java/org/apache/flex/maven/plugins/flex/compiler/asdoc/AsdocCompilerImpl.java
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-asdoc/src/main/java/org/apache/flex/maven/plugins/flex/compiler/asdoc/AsdocCompilerImpl.java?rev=1416169&view=auto
==============================================================================
--- incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-asdoc/src/main/java/org/apache/flex/maven/plugins/flex/compiler/asdoc/AsdocCompilerImpl.java (added)
+++ incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-asdoc/src/main/java/org/apache/flex/maven/plugins/flex/compiler/asdoc/AsdocCompilerImpl.java Sun Dec  2 13:06:11 2012
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.flex.maven.plugins.flex.compiler.asdoc;
+
+import org.apache.flex.maven.plugins.flex.compiler.Compiler;
+import org.codehaus.plexus.component.annotations.Component;
+
+/**
+ * Created with IntelliJ IDEA.
+ * User: cdutz
+ * Date: 02.12.12
+ * Time: 12:40
+ */
+@Component(role = Compiler.class, hint = "asdoc")
+public class AsdocCompilerImpl implements Compiler {
+
+    public AsdocCompilerImpl() {
+        System.out.println("Compiler Instance Created: Asdoc");
+    }
+
+    @Override
+    public void compile() {
+        System.out.println("Executing Compiler: Asdoc");
+    }
+
+}

Modified: incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-compc/pom.xml
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-compc/pom.xml?rev=1416169&r1=1416168&r2=1416169&view=diff
==============================================================================
--- incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-compc/pom.xml (original)
+++ incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-compc/pom.xml Sun Dec  2 13:06:11 2012
@@ -36,12 +36,41 @@
 
     <name>Maven-Flex-Plugin / Components / Compiler / Compc</name>
 
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.codehaus.plexus</groupId>
+                <artifactId>plexus-component-metadata</artifactId>
+                <version>1.5.5</version>
+                <executions>
+                    <execution>
+                        <id>process-classes</id>
+                        <goals>
+                            <goal>generate-metadata</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
     <dependencies>
         <dependency>
             <groupId>org.apache.flex.components</groupId>
             <artifactId>api</artifactId>
             <version>1.0.0-SNAPSHOT</version>
         </dependency>
+        <dependency>
+            <groupId>org.apache.maven</groupId>
+            <artifactId>maven-plugin-api</artifactId>
+            <version>3.0.4</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.maven.plugin-tools</groupId>
+            <artifactId>maven-plugin-annotations</artifactId>
+            <version>3.2</version>
+            <scope>compile</scope>
+        </dependency>
     </dependencies>
 
 </project>
\ No newline at end of file

Added: incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-compc/src/main/java/org/apache/flex/maven/plugins/flex/compiler/compc/CompcCompilerImpl.java
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-compc/src/main/java/org/apache/flex/maven/plugins/flex/compiler/compc/CompcCompilerImpl.java?rev=1416169&view=auto
==============================================================================
--- incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-compc/src/main/java/org/apache/flex/maven/plugins/flex/compiler/compc/CompcCompilerImpl.java (added)
+++ incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-compc/src/main/java/org/apache/flex/maven/plugins/flex/compiler/compc/CompcCompilerImpl.java Sun Dec  2 13:06:11 2012
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.flex.maven.plugins.flex.compiler.compc;
+
+import org.apache.flex.maven.plugins.flex.compiler.Compiler;
+import org.codehaus.plexus.component.annotations.Component;
+
+/**
+ * Created with IntelliJ IDEA.
+ * User: cdutz
+ * Date: 02.12.12
+ * Time: 12:40
+ */
+@Component(role = Compiler.class, hint = "compc")
+public class CompcCompilerImpl implements Compiler {
+
+    public CompcCompilerImpl() {
+        System.out.println("Compiler Instance Created: Compc");
+    }
+
+    @Override
+    public void compile() {
+        System.out.println("Executing Compiler: Compc");
+    }
+
+}

Modified: incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-falcon/pom.xml
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-falcon/pom.xml?rev=1416169&r1=1416168&r2=1416169&view=diff
==============================================================================
--- incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-falcon/pom.xml (original)
+++ incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-falcon/pom.xml Sun Dec  2 13:06:11 2012
@@ -36,12 +36,41 @@
 
     <name>Maven-Flex-Plugin / Components / Compiler / Falcon</name>
 
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.codehaus.plexus</groupId>
+                <artifactId>plexus-component-metadata</artifactId>
+                <version>1.5.5</version>
+                <executions>
+                    <execution>
+                        <id>process-classes</id>
+                        <goals>
+                            <goal>generate-metadata</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
     <dependencies>
         <dependency>
             <groupId>org.apache.flex.components</groupId>
             <artifactId>api</artifactId>
             <version>1.0.0-SNAPSHOT</version>
         </dependency>
+        <dependency>
+            <groupId>org.apache.maven</groupId>
+            <artifactId>maven-plugin-api</artifactId>
+            <version>3.0.4</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.maven.plugin-tools</groupId>
+            <artifactId>maven-plugin-annotations</artifactId>
+            <version>3.2</version>
+            <scope>compile</scope>
+        </dependency>
     </dependencies>
 
 </project>
\ No newline at end of file

Added: incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-falcon/src/main/java/org/apache/flex/maven/plugins/flex/compiler/falcon/FalconCompilerImpl.java
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-falcon/src/main/java/org/apache/flex/maven/plugins/flex/compiler/falcon/FalconCompilerImpl.java?rev=1416169&view=auto
==============================================================================
--- incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-falcon/src/main/java/org/apache/flex/maven/plugins/flex/compiler/falcon/FalconCompilerImpl.java (added)
+++ incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-falcon/src/main/java/org/apache/flex/maven/plugins/flex/compiler/falcon/FalconCompilerImpl.java Sun Dec  2 13:06:11 2012
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.flex.maven.plugins.flex.compiler.falcon;
+
+import org.apache.flex.maven.plugins.flex.compiler.Compiler;
+import org.codehaus.plexus.component.annotations.Component;
+
+/**
+ * Created with IntelliJ IDEA.
+ * User: cdutz
+ * Date: 02.12.12
+ * Time: 12:40
+ */
+@Component(role = Compiler.class, hint = "falcon")
+public class FalconCompilerImpl implements Compiler {
+
+    public FalconCompilerImpl() {
+        System.out.println("Compiler Instance Created: Falcon");
+    }
+
+    @Override
+    public void compile() {
+        System.out.println("Executing Compiler: Falcon");
+    }
+
+}

Modified: incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-mxmlc/pom.xml
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-mxmlc/pom.xml?rev=1416169&r1=1416168&r2=1416169&view=diff
==============================================================================
--- incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-mxmlc/pom.xml (original)
+++ incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-mxmlc/pom.xml Sun Dec  2 13:06:11 2012
@@ -36,12 +36,41 @@
 
     <name>Maven-Flex-Plugin / Components / Compiler / MXMLC</name>
 
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.codehaus.plexus</groupId>
+                <artifactId>plexus-component-metadata</artifactId>
+                <version>1.5.5</version>
+                <executions>
+                    <execution>
+                        <id>process-classes</id>
+                        <goals>
+                            <goal>generate-metadata</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
     <dependencies>
         <dependency>
             <groupId>org.apache.flex.components</groupId>
             <artifactId>api</artifactId>
             <version>1.0.0-SNAPSHOT</version>
         </dependency>
+        <dependency>
+            <groupId>org.apache.maven</groupId>
+            <artifactId>maven-plugin-api</artifactId>
+            <version>3.0.4</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.maven.plugin-tools</groupId>
+            <artifactId>maven-plugin-annotations</artifactId>
+            <version>3.2</version>
+            <scope>compile</scope>
+        </dependency>
     </dependencies>
 
 </project>
\ No newline at end of file

Added: incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-mxmlc/src/main/java/org/apache/flex/maven/plugins/flex/compiler/mxmlc/MxmlcCompilerImpl.java
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-mxmlc/src/main/java/org/apache/flex/maven/plugins/flex/compiler/mxmlc/MxmlcCompilerImpl.java?rev=1416169&view=auto
==============================================================================
--- incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-mxmlc/src/main/java/org/apache/flex/maven/plugins/flex/compiler/mxmlc/MxmlcCompilerImpl.java (added)
+++ incubator/flex/utilities/trunk/maven-flex-plugin/components/compiler/compiler-mxmlc/src/main/java/org/apache/flex/maven/plugins/flex/compiler/mxmlc/MxmlcCompilerImpl.java Sun Dec  2 13:06:11 2012
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.flex.maven.plugins.flex.compiler.mxmlc;
+
+import org.apache.flex.maven.plugins.flex.compiler.Compiler;
+import org.codehaus.plexus.component.annotations.Component;
+
+/**
+ * Created with IntelliJ IDEA.
+ * User: cdutz
+ * Date: 02.12.12
+ * Time: 12:40
+ */
+@Component(role = Compiler.class, hint = "mxmlc")
+public class MxmlcCompilerImpl implements Compiler {
+
+    public MxmlcCompilerImpl() {
+        System.out.println("Compiler Instance Created: MXMLC");
+    }
+
+    @Override
+    public void compile() {
+        System.out.println("Executing Compiler: MXMLC");
+    }
+
+}

Modified: incubator/flex/utilities/trunk/maven-flex-plugin/plugins/maven-flex-plugin/pom.xml
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/trunk/maven-flex-plugin/plugins/maven-flex-plugin/pom.xml?rev=1416169&r1=1416168&r2=1416169&view=diff
==============================================================================
--- incubator/flex/utilities/trunk/maven-flex-plugin/plugins/maven-flex-plugin/pom.xml (original)
+++ incubator/flex/utilities/trunk/maven-flex-plugin/plugins/maven-flex-plugin/pom.xml Sun Dec  2 13:06:11 2012
@@ -67,6 +67,11 @@
             <version>3.0.4</version>
         </dependency>
         <dependency>
+            <groupId>org.apache.maven</groupId>
+            <artifactId>maven-core</artifactId>
+            <version>3.0.4</version>
+        </dependency>
+        <dependency>
             <groupId>org.apache.maven.plugin-tools</groupId>
             <artifactId>maven-plugin-annotations</artifactId>
             <version>3.2</version>
@@ -77,6 +82,27 @@
             <artifactId>api</artifactId>
             <version>1.0.0-SNAPSHOT</version>
         </dependency>
+        <!-- Compiler implementations -->
+        <dependency>
+            <groupId>org.apache.flex.components</groupId>
+            <artifactId>compiler-falcon</artifactId>
+            <version>1.0.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.flex.components</groupId>
+            <artifactId>compiler-mxmlc</artifactId>
+            <version>1.0.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.flex.components</groupId>
+            <artifactId>compiler-compc</artifactId>
+            <version>1.0.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.flex.components</groupId>
+            <artifactId>compiler-asdoc</artifactId>
+            <version>1.0.0-SNAPSHOT</version>
+        </dependency>
     </dependencies>
 
 </project>
\ No newline at end of file

Modified: incubator/flex/utilities/trunk/maven-flex-plugin/plugins/maven-flex-plugin/src/main/java/org/apache/flex/maven/plugins/flex/compiler/CompilerMojo.java
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/trunk/maven-flex-plugin/plugins/maven-flex-plugin/src/main/java/org/apache/flex/maven/plugins/flex/compiler/CompilerMojo.java?rev=1416169&r1=1416168&r2=1416169&view=diff
==============================================================================
--- incubator/flex/utilities/trunk/maven-flex-plugin/plugins/maven-flex-plugin/src/main/java/org/apache/flex/maven/plugins/flex/compiler/CompilerMojo.java (original)
+++ incubator/flex/utilities/trunk/maven-flex-plugin/plugins/maven-flex-plugin/src/main/java/org/apache/flex/maven/plugins/flex/compiler/CompilerMojo.java Sun Dec  2 13:06:11 2012
@@ -17,8 +17,18 @@
 package org.apache.flex.maven.plugins.flex.compiler;
 
 import org.apache.flex.maven.plugins.flex.AbstractFlexMojo;
+import org.apache.maven.MavenExecutionException;
+import org.apache.maven.execution.MavenSession;
+import org.apache.maven.plugin.MojoExecution;
+import org.apache.maven.plugin.descriptor.PluginDescriptor;
+import org.apache.maven.plugins.annotations.Component;
 import org.apache.maven.plugins.annotations.LifecyclePhase;
 import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.Parameter;
+import org.apache.maven.project.MavenProject;
+import org.apache.maven.settings.Settings;
+
+import java.util.Map;
 
 /**
  * Created with IntelliJ IDEA.
@@ -31,8 +41,43 @@ import org.apache.maven.plugins.annotati
         threadSafe = true)
 public class CompilerMojo extends AbstractFlexMojo {
 
+    @Parameter(defaultValue = "false")
+    protected boolean useLegacyCompiler;
+
+    @Component
+    private Map<String, Compiler> compilerMap;
+
+    @Component
+    private MavenSession session;
+
+    @Component
+    private MavenProject project;
+
+    @Component
+    private MojoExecution mojoEcecution;
+
+    @Component
+    private PluginDescriptor plugin;
+
+    @Component
+    private Settings settings;
+
     public void execute() {
-        getLog().debug("Executing compiler-mojo");
+        if(mojoEcecution.getLifecyclePhase().equalsIgnoreCase(LifecyclePhase.COMPILE.toString())) {
+            if(useLegacyCompiler) {
+                if(project.getPackaging().equalsIgnoreCase("SWC")) {
+                    compilerMap.get("compc").compile();
+                } else if(project.getPackaging().equalsIgnoreCase("SWF")) {
+                    compilerMap.get("mxmlc").compile();
+                } else {
+                    throw new RuntimeException("Wrong packaging");
+                }
+            } else {
+                compilerMap.get("falcon").compile();
+            }
+        } else if(mojoEcecution.getLifecyclePhase().equalsIgnoreCase(LifecyclePhase.PROCESS_SOURCES.toString())) {
+            compilerMap.get("asdoc").compile();
+        }
     }
 
 }

Modified: incubator/flex/utilities/trunk/maven-flex-plugin/testsuite/projects/concepts/flex/general/simple-swc/pom.xml
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/trunk/maven-flex-plugin/testsuite/projects/concepts/flex/general/simple-swc/pom.xml?rev=1416169&r1=1416168&r2=1416169&view=diff
==============================================================================
--- incubator/flex/utilities/trunk/maven-flex-plugin/testsuite/projects/concepts/flex/general/simple-swc/pom.xml (original)
+++ incubator/flex/utilities/trunk/maven-flex-plugin/testsuite/projects/concepts/flex/general/simple-swc/pom.xml Sun Dec  2 13:06:11 2012
@@ -35,6 +35,9 @@
                 <artifactId>maven-flex-plugin</artifactId>
                 <version>1.0.0-SNAPSHOT</version>
                 <extensions>true</extensions>
+                <configuration>
+                    <useLegacyCompiler>true</useLegacyCompiler>
+                </configuration>
             </plugin>
         </plugins>
     </build>

Modified: incubator/flex/utilities/trunk/maven-flex-plugin/testsuite/projects/concepts/flex/general/simple-swf/pom.xml
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/trunk/maven-flex-plugin/testsuite/projects/concepts/flex/general/simple-swf/pom.xml?rev=1416169&r1=1416168&r2=1416169&view=diff
==============================================================================
--- incubator/flex/utilities/trunk/maven-flex-plugin/testsuite/projects/concepts/flex/general/simple-swf/pom.xml (original)
+++ incubator/flex/utilities/trunk/maven-flex-plugin/testsuite/projects/concepts/flex/general/simple-swf/pom.xml Sun Dec  2 13:06:11 2012
@@ -35,6 +35,9 @@
                 <artifactId>maven-flex-plugin</artifactId>
                 <version>1.0.0-SNAPSHOT</version>
                 <extensions>true</extensions>
+                <configuration>
+                    <useLegacyCompiler>true</useLegacyCompiler>
+                </configuration>
             </plugin>
         </plugins>
     </build>