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 2016/09/29 09:29:57 UTC

[2/4] git commit: [flex-asjs] [refs/heads/develop] - - Added a first version of a simple FlexJS application archetype (the lib is just a skeleton at the moment)

- Added a first version of a simple FlexJS application archetype (the lib is just a skeleton at the moment)


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/da7d1ac9
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/da7d1ac9
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/da7d1ac9

Branch: refs/heads/develop
Commit: da7d1ac90aabc76ca81c888e5e2ee6d4d44d8f03
Parents: 0be30cb
Author: Christofer Dutz <ch...@codecentric.de>
Authored: Thu Sep 29 10:32:46 2016 +0200
Committer: Christofer Dutz <ch...@codecentric.de>
Committed: Thu Sep 29 10:32:46 2016 +0200

----------------------------------------------------------------------
 .../flexjs-simple-application-archetype/pom.xml |  6 +-
 .../archetype-resources/.mvn/extensions.xml     | 30 ++++++++
 .../main/resources/archetype-resources/pom.xml  | 73 ++++++++++++++++++--
 .../src/main/resources/maven/archetype.xml      | 14 ++--
 archetypes/pom.xml                              | 34 +++++++++
 5 files changed, 143 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/da7d1ac9/archetypes/flexjs-simple-application-archetype/pom.xml
----------------------------------------------------------------------
diff --git a/archetypes/flexjs-simple-application-archetype/pom.xml b/archetypes/flexjs-simple-application-archetype/pom.xml
index a3024a3..a9136c6 100644
--- a/archetypes/flexjs-simple-application-archetype/pom.xml
+++ b/archetypes/flexjs-simple-application-archetype/pom.xml
@@ -26,11 +26,11 @@
     <version>0.8.0-SNAPSHOT</version>
   </parent>
 
-  <artifactId>flexjs-application-archetype</artifactId>
+  <artifactId>flexjs-simple-application-archetype</artifactId>
   <version>0.8.0-SNAPSHOT</version>
   <packaging>jar</packaging>
 
-  <name>Apache Flex - FlexJS: Framework: Archetypes: Application</name>
-  <description>Maven archetype for creating flexjs maven project for building an application</description>
+  <name>Apache Flex - FlexJS: Framework: Archetypes: Simple FlexJS Application</name>
+  <description>Maven archetype for creating FlexJS Maven project for building a simple FlexJS application with both Flash and JavaScript output.</description>
 
 </project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/da7d1ac9/archetypes/flexjs-simple-application-archetype/src/main/resources/archetype-resources/.mvn/extensions.xml
----------------------------------------------------------------------
diff --git a/archetypes/flexjs-simple-application-archetype/src/main/resources/archetype-resources/.mvn/extensions.xml b/archetypes/flexjs-simple-application-archetype/src/main/resources/archetype-resources/.mvn/extensions.xml
new file mode 100644
index 0000000..71ce517
--- /dev/null
+++ b/archetypes/flexjs-simple-application-archetype/src/main/resources/archetype-resources/.mvn/extensions.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+  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.
+
+-->
+<extensions xmlns="http://maven.apache.org/EXTENSIONS/1.0.0"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="http://maven.apache.org/EXTENSIONS/1.0.0 http://maven.apache.org/xsd/core-extensions-1.0.0.xsd">
+
+    <extension>
+        <groupId>org.apache.flex.utilities.converter</groupId>
+        <artifactId>flex-sdk-converter-maven-extension</artifactId>
+        <version>1.0.0-SNAPSHOT</version>
+    </extension>
+
+</extensions>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/da7d1ac9/archetypes/flexjs-simple-application-archetype/src/main/resources/archetype-resources/pom.xml
----------------------------------------------------------------------
diff --git a/archetypes/flexjs-simple-application-archetype/src/main/resources/archetype-resources/pom.xml b/archetypes/flexjs-simple-application-archetype/src/main/resources/archetype-resources/pom.xml
index 4d55544..23392a6 100644
--- a/archetypes/flexjs-simple-application-archetype/src/main/resources/archetype-resources/pom.xml
+++ b/archetypes/flexjs-simple-application-archetype/src/main/resources/archetype-resources/pom.xml
@@ -22,12 +22,77 @@
          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>
 
-  <groupId>${groupId}</groupId>
-  <artifactId>${artifactId}</artifactId>
-  <version>${version}</version>
-  <packaging>jar</packaging>
+  <groupId>\${groupId}</groupId>
+  <artifactId>\${artifactId}</artifactId>
+  <version>\${version}</version>
+  <packaging>swf</packaging>
+
+  <build>
+    <sourceDirectory>src/main/flex</sourceDirectory>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.flex.flexjs.compiler</groupId>
+        <artifactId>flexjs-maven-plugin</artifactId>
+        <version>${flexjs.compiler.version}</version>
+        <extensions>true</extensions>
+        <configuration>
+          <flashVersion>${flash.version}</flashVersion>
+          <mainClass>App.mxml</mainClass>
+        </configuration>
+        <executions>
+          <!-- Add a second execution with output set to JavaScript (Flash is the default) -->
+          <execution>
+            <id>compile-javascript</id>
+            <phase>compile</phase>
+            <goals>
+              <goal>compile-app</goal>
+            </goals>
+            <configuration>
+              <outputJavaScript>true</outputJavaScript>
+            </configuration>
+          </execution>
+        </executions>
+        <dependencies>
+          <dependency>
+            <groupId>org.apache.flex.flexjs.compiler</groupId>
+            <artifactId>compiler-jx</artifactId>
+            <version>${flexjs.compiler.version}</version>
+          </dependency>
+        </dependencies>
+      </plugin>
+    </plugins>
+  </build>
 
   <dependencies>
+    <dependency>
+      <groupId>org.apache.flex.flexjs.framework</groupId>
+      <artifactId>Core</artifactId>
+      <version>0.8.0-SNAPSHOT</version>
+      <type>swc</type>
+    </dependency>
+
+    <!-- Needed for Flash compilation -->
+    <dependency>
+      <groupId>com.adobe.flash.framework</groupId>
+      <artifactId>playerglobal</artifactId>
+      <version>${flash.version}</version>
+      <type>swc</type>
+      <scope>provided</scope>
+    </dependency>
+
+    <!-- Needed for JavaScript compilation -->
+    <dependency>
+      <groupId>org.apache.flex.flexjs.framework</groupId>
+      <artifactId>HTML</artifactId>
+      <version>0.8.0-SNAPSHOT</version>
+      <type>swc</type>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.flex.flexjs.framework</groupId>
+      <artifactId>Language</artifactId>
+      <version>0.8.0-SNAPSHOT</version>
+      <type>swc</type>
+    </dependency>
   </dependencies>
 
 </project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/da7d1ac9/archetypes/flexjs-simple-library-archetype/src/main/resources/maven/archetype.xml
----------------------------------------------------------------------
diff --git a/archetypes/flexjs-simple-library-archetype/src/main/resources/maven/archetype.xml b/archetypes/flexjs-simple-library-archetype/src/main/resources/maven/archetype.xml
index 279c0f1..561c04e 100644
--- a/archetypes/flexjs-simple-library-archetype/src/main/resources/maven/archetype.xml
+++ b/archetypes/flexjs-simple-library-archetype/src/main/resources/maven/archetype.xml
@@ -20,11 +20,11 @@
 <archetype xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype/1.0.0"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype/1.0.0 http://maven.apache.org/xsd/archetype-1.0.0.xsd">
-  <id>quickstart</id>
-  <sources>
-    <source>src/main/java/App.java</source>
-  </sources>
-  <testSources>
-    <source>src/test/java/AppTest.java</source>
-  </testSources>
+  <id>flexjs-simple-library-archetype</id>
+  <resources>
+    <resource>src/main/java/App.java</resource>
+  </resources>
+  <testResources>
+    <resource>src/test/java/AppTest.java</resource>
+  </testResources>
 </archetype>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/da7d1ac9/archetypes/pom.xml
----------------------------------------------------------------------
diff --git a/archetypes/pom.xml b/archetypes/pom.xml
index 4d15bcf..f56130c 100644
--- a/archetypes/pom.xml
+++ b/archetypes/pom.xml
@@ -38,4 +38,38 @@
     <module>flexjs-simple-library-archetype</module>
   </modules>
 
+  <build>
+    <resources>
+      <resource>
+        <directory>src/main/resources</directory>
+        <filtering>true</filtering>
+        <includes>
+          <include>**/pom.xml</include>
+          <include>**/descriptor.xml</include>
+        </includes>
+      </resource>
+      <resource>
+        <directory>src/main/resources</directory>
+        <filtering>false</filtering>
+        <excludes>
+          <exclude>**/pom.xml</exclude>
+          <exclude>**/descriptor.xml</exclude>
+        </excludes>
+      </resource>
+    </resources>
+
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-resources-plugin</artifactId>
+        <configuration>
+          <escapeString>\</escapeString>
+          <nonFilteredFileExtensions>
+            <nonFilteredFileExtension>p12</nonFilteredFileExtension>
+          </nonFilteredFileExtensions>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
 </project>
\ No newline at end of file