You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by cd...@apache.org on 2021/02/28 12:43:17 UTC

[royale-asjs] 13/19: maven-archetype: new "royale-jewel-library-archetype" to generate libraries quickly

This is an automated email from the ASF dual-hosted git repository.

cdutz pushed a commit to branch feature/distribution-allignment
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit 31a7933eb5cf4cabd2aeec9f4c5c92ba55f863a8
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Sat Feb 27 16:39:52 2021 +0100

    maven-archetype: new "royale-jewel-library-archetype" to generate libraries quickly
---
 archetypes/royale-jewel-library-archetype/pom.xml  |  45 +++
 .../META-INF/archetype-post-generate.groovy        |  71 +++++
 .../META-INF/maven/archetype-metadata.xml          |  87 ++++++
 .../archetype-resources/.vscode/tasks.json         |  73 +++++
 .../__artifactId__.mxml.as3proj                    | 117 ++++++++
 .../resources/archetype-resources/asconfig.json    |  58 ++++
 .../src/main/resources/archetype-resources/pom.xml | 312 +++++++++++++++++++++
 .../__artifactIdLowerCase__-as-manifest.xml        |  26 ++
 .../resources/__artifactIdLowerCase__-manifest.xml |  26 ++
 .../src/main/royale/SampleClass.as                 |  31 ++
 .../src/main/royale/__artifactId__Classes.as       |  46 +++
 .../archetype-resources/src/main/sass/_global.sass |  25 ++
 .../archetype-resources/src/main/sass/default.sass |  21 ++
 13 files changed, 938 insertions(+)

diff --git a/archetypes/royale-jewel-library-archetype/pom.xml b/archetypes/royale-jewel-library-archetype/pom.xml
new file mode 100644
index 0000000..55948d8
--- /dev/null
+++ b/archetypes/royale-jewel-library-archetype/pom.xml
@@ -0,0 +1,45 @@
+<?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.
+
+--><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>
+    <groupId>org.apache.royale.framework</groupId>
+    <artifactId>royale-maven-archetypes</artifactId>
+    <version>0.9.8-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>royale-jewel-library-archetype</artifactId>
+  <version>0.9.8-SNAPSHOT</version>
+  <packaging>maven-archetype</packaging>
+
+  <name>Apache Royale: Framework: Archetypes: Jewel Royale Library</name>
+  <description>Maven archetype for creating Royale Maven project for building a Jewel Royale library for JavaScript output.</description>
+
+  <build>
+    <extensions>
+      <extension>
+        <groupId>org.apache.maven.archetype</groupId>
+        <artifactId>archetype-packaging</artifactId>
+        <version>3.1.1</version>
+      </extension>
+    </extensions>
+  </build>
+  
+</project>
diff --git a/archetypes/royale-jewel-library-archetype/src/main/resources/META-INF/archetype-post-generate.groovy b/archetypes/royale-jewel-library-archetype/src/main/resources/META-INF/archetype-post-generate.groovy
new file mode 100644
index 0000000..a005cea
--- /dev/null
+++ b/archetypes/royale-jewel-library-archetype/src/main/resources/META-INF/archetype-post-generate.groovy
@@ -0,0 +1,71 @@
+/**
+ *  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.
+ */
+
+
+//  This script will be executed upon creating a project from this archetype.
+//  https://maven.apache.org/archetype/maven-archetype-plugin/advanced-usage.html
+// 
+//  It will delete a the associated Crux folders if the value for the "includeCrux" property
+//  is set to false.
+
+import java.io.File
+import java.nio.file.Files
+import java.nio.file.Path
+import java.nio.file.Paths
+import org.apache.commons.io.FileUtils
+ 
+println "*******************************"
+println "  groovy post processing"
+println "*******************************"
+// println "artifactId: " + artifactId
+// println "request: " + request
+// println "archetypeArtifactId: " + request.getArchetypeArtifactId()
+// println "archetypeGroupId: " + request.getArchetypeGroupId()
+// println "archetypeVersion: " + request.getArchetypeVersion()
+// println "archetypeName: " + request.getArchetypeName()
+// println "artifactId: " + request.getArtifactId()
+// println "groupId: " + request.getGroupId()
+// println "version: " + request.getVersion()
+
+Properties properties = request.properties
+// println "Properties: " + properties
+// println "application: " + request.getProperties().getProperty("application")
+// println "moduele: " + request.getProperties().getProperty("module")
+
+// Application path
+Path appPath = Paths.get(request.outputDirectory, request.artifactId)// + File.separator + properties.get("application"))
+println "appPath prop : " + appPath
+String includeCrux = properties.get("includeCrux")
+println "includeCrux prop : " + includeCrux
+ 
+if (includeCrux.equals("false")) {
+    println "Not includin Crux - Deleting Crux files"
+
+    String packageProp = properties.get("package").equals('') ? "" : properties.get("package").replace(".", File.separator) + File.separator;
+    //println "package prop : " + packageProp
+    Path configPath = appPath.resolve("src" + File.separator + "main" + File.separator + "royale" + File.separator + packageProp + "config")   
+    Path eventsPath = appPath.resolve("src" + File.separator + "main" + File.separator + "royale" + File.separator + packageProp + "events")   
+    
+    //String configurationFile = "Beans.mxml";    
+    //Path cxfConfigPath = configPath.resolve(configurationFile)
+    //println "cxfConfigPath " + cxfConfigPath  
+    //Files.deleteIfExists cxfConfigPath
+
+    FileUtils.deleteDirectory(configPath.toFile());
+    FileUtils.deleteDirectory(eventsPath.toFile());
+}
+println "*******************************"
\ No newline at end of file
diff --git a/archetypes/royale-jewel-library-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml b/archetypes/royale-jewel-library-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
new file mode 100644
index 0000000..89596af
--- /dev/null
+++ b/archetypes/royale-jewel-library-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
@@ -0,0 +1,87 @@
+<?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.
+
+-->
+<archetype-descriptor
+        xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.1.0
+        https://maven.apache.org/xsd/archetype-descriptor-1.1.0.xsd"
+        xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.1.0"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        name="${artifactId}">
+
+  <fileSets>
+    <fileSet filtered="true" encoding="UTF-8">
+      <directory>.vscode</directory>
+      <includes>
+        <include>**/*.json</include>
+      </includes>
+    </fileSet>
+    <fileSet filtered="true" encoding="UTF-8">
+      <directory></directory>
+      <includes>
+        <include>__artifactId__.mxml.as3proj</include>
+        <include>asconfig.json</include>
+      </includes>
+    </fileSet>
+    <fileSet filtered="true" encoding="UTF-8">
+      <directory>src/main/resources</directory>
+      <includes>
+        <include>**/*.xml</include>
+      </includes>
+    </fileSet>
+    <fileSet filtered="true" encoding="UTF-8">
+      <directory>src/main/sass</directory>
+      <includes>
+        <include>**/*.sass</include>
+      </includes>
+    </fileSet>
+    <fileSet filtered="true" encoding="UTF-8">
+      <directory>src/main/royale</directory>
+      <includes>
+        <include>__artifactId__Classes.as</include>
+      </includes>
+    </fileSet>
+    <fileSet filtered="true" packaged="true" encoding="UTF-8">
+      <directory>src/main/royale</directory>
+      <includes>
+        <include>**/*.mxml</include>
+        <include>**/*.as</include>
+      </includes>
+      <excludes>
+        <exclude>__artifactId__Classes.as</exclude>
+      </excludes>
+    </fileSet>      
+    <fileSet filtered="true" packaged="true" encoding="UTF-8">
+      <directory>src/test/royale</directory>
+      <includes>
+        <include>**/*.as</include>
+        <include>**/*.mxml</include>
+      </includes>
+    </fileSet>
+  </fileSets>
+
+  <requiredProperties>
+    <requiredProperty key="artifactIdLowerCase">
+        <defaultValue>${artifactId.toLowerCase()}</defaultValue>
+    </requiredProperty>
+    <requiredProperty key="includeCrux"> 
+     	<defaultValue>false</defaultValue>
+    </requiredProperty>
+  </requiredProperties>
+
+</archetype-descriptor>
diff --git a/archetypes/royale-jewel-library-archetype/src/main/resources/archetype-resources/.vscode/tasks.json b/archetypes/royale-jewel-library-archetype/src/main/resources/archetype-resources/.vscode/tasks.json
new file mode 100644
index 0000000..597385f
--- /dev/null
+++ b/archetypes/royale-jewel-library-archetype/src/main/resources/archetype-resources/.vscode/tasks.json
@@ -0,0 +1,73 @@
+#set($dollar = '$')
+{
+    // See https://go.microsoft.com/fwlink/?LinkId=733558
+    // for the documentation about the tasks.json format
+    "version": "2.0.0",
+    "tasks": [
+        // MAVEN
+        {
+            "label": "Build with Maven",
+            "type": "shell",
+            "command": "mvn",
+            "args": [
+                "clean",
+                "install",
+                // "-P option-with-swf",
+                "-DskipTests"
+            ],
+            "group": "build",
+            "presentation": {
+                "echo": true,
+                "reveal": "always",
+                "focus": true,
+                "panel": "dedicated"
+            },
+            "problemMatcher": []
+        },
+        // AS3&MXML (Debug)
+        {
+            "label": "Build with AS3&MXML (Debug)",
+            "type": "actionscript",
+            "debug": true,
+            "group": "build",
+            "presentation": {
+                "echo": true,
+                "reveal": "always",
+                "focus": true,
+                "panel": "dedicated"
+            },
+            "problemMatcher": []
+        },
+        // AS3&MXML (Release)
+        {
+            "label": "Build with AS3&MXML (Release)",
+            "type": "actionscript",
+            "debug": false,
+            "group": "build",
+            "presentation": {
+                "echo": true,
+                "reveal": "always",
+                "focus": true,
+                "panel": "dedicated"
+            },
+            "problemMatcher": []
+        },
+        // ASCONFIGC
+        {
+            "label": "build with asconfigc",
+            "type": "shell",
+            "command": "asconfigc",
+            "args": [
+                "--sdk=${dollar}{config:as3mxml.sdk.framework}"
+            ],
+            "group": "build",
+            "presentation": {
+                "echo": true,
+                "reveal": "always",
+                "focus": true,
+                "panel": "dedicated"
+            },
+            "problemMatcher": []
+        }
+    ]
+}
\ No newline at end of file
diff --git a/archetypes/royale-jewel-library-archetype/src/main/resources/archetype-resources/__artifactId__.mxml.as3proj b/archetypes/royale-jewel-library-archetype/src/main/resources/archetype-resources/__artifactId__.mxml.as3proj
new file mode 100644
index 0000000..a2952cb
--- /dev/null
+++ b/archetypes/royale-jewel-library-archetype/src/main/resources/archetype-resources/__artifactId__.mxml.as3proj
@@ -0,0 +1,117 @@
+<!--
+
+  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.
+
+-->
+<?xml version="1.0" encoding="utf-8"?>
+<project>
+  <output>
+    <movie width="800"/>
+    <movie disabled="False"/>
+    <movie path="bin-debug/${artifactId}.swf"/>
+    <movie platform="Flash Player"/>
+    <movie fps="60"/>
+    <movie version="11"/>
+    <movie height="600"/>
+    <movie background="#FFFFFF"/>
+    <movie input=""/>
+  </output>
+  &lt;!-- Other classes to be compiled into your SWF --&gt;
+  <jsOutput>
+    <option path="/Users/christofer.dutz/Library/Containers/com.moonshine-ide/Data/Documents/NewJavaScriptBrowserProject"/>
+  </jsOutput>
+  <classpaths>
+    <class path="src"/>
+  </classpaths>
+  <moonshineResourcePaths></moonshineResourcePaths>
+  <moonshineNativeExtensionPaths></moonshineNativeExtensionPaths>
+  <build>
+    <option compilerConstants=""/>
+    <option strict="True"/>
+    <option useResourceBundleMetadata="True"/>
+    <option allowSourcePathOverlap="False"/>
+    <option sourceMap="True"/>
+    <option showDeprecationWarnings="True"/>
+    <option benchmark="False"/>
+    <option showBindingWarnings="True"/>
+    <option warnings="True"/>
+    <option customSDK="/Users/christofer.dutz/Downloads/MoonshineSDKs/Royale_SDK/apache-royale-0.9.8-bin-js/royale-asjs"/>
+    <option showActionScriptWarnings="True"/>
+    <option antBuildPath="build/build.xml"/>
+    <option verboseStackTraces="False"/>
+    <option loadConfig=""/>
+    <option additional="-theme=${royalelib}/themes/JewelTheme/src/main/resources/defaults.css -html-template=src/resources/jewel-index-template.html"/>
+    <option linkReport=""/>
+    <option optimize="False"/>
+    <option locale=""/>
+    <option accessible="False"/>
+    <option staticLinkRSL="False"/>
+    <option showUnusedTypeSelectorWarnings="True"/>
+    <option useNetwork="True"/>
+    <option es="False"/>
+  </build>
+  <mavenBuild>
+    <option settingsFilePath=""/>
+    <option mavenBuildPath="/Users/christofer.dutz/Library/Containers/com.moonshine-ide/Data/Documents/NewJavaScriptBrowserProject"/>
+    <option commandLine=""/>
+    <actions>
+      <action action="install" actionName="Build"/>
+      <action action="clean package" actionName="Clean and package"/>
+      <action action="clean" actionName="Clean"/>
+      <action action="clean install" actionName="Clean and Build"/>
+      <action action="war:exploded" actionName="Exploded"/>
+    </actions>
+  </mavenBuild>
+  <includeLibraries></includeLibraries>
+  <libraryPaths></libraryPaths>
+  <externalLibraryPaths></externalLibraryPaths>
+  <rslPaths></rslPaths>
+  <intrinsics>
+    <element path="Library/AS3/frameworks/Flex4"/>
+    <element path="Library\AS3\frameworks\Flex4"/>
+    <element path="Library\AS3\frameworks\Flex4"/>
+  </intrinsics>
+  <library></library>
+  <compileTargets>
+    <compile path="src/NewJavaScriptBrowserProject.mxml"/>
+  </compileTargets>
+  <hiddenPaths></hiddenPaths>
+  <preBuildCommand>null</preBuildCommand>
+  <postBuildCommand alwaysRun="False">null</postBuildCommand>
+  <trustSVNCertificate>False</trustSVNCertificate>
+  <options>
+    <option testMovieCommand=""/>
+    <option defaultBuildTargets=""/>
+    <option isRoyale="True"/>
+    <option isExportedToExistingSource="False"/>
+    <option showHiddenPaths="False"/>
+    <option isPrimeFacesVisualEditor="False"/>
+    <option testMovie=""/>
+    <option visualEditorExportPath=""/>
+  </options>
+  <moonshineRunCustomization>
+    <option launchMethod="Simulator"/>
+    <option urlToLaunch="/Users/christofer.dutz/Library/Containers/com.moonshine-ide/Data/Documents/NewJavaScriptBrowserProject/bin/js-debug/index.html"/>
+    <option targetPlatform="5"/>
+    <option projectType="2"/>
+    <option customUrlToLaunch=""/>
+    <option deviceSimulator="null"/>
+    <deviceSimulator>null</deviceSimulator>
+    <certAndroid>null</certAndroid>
+    <certIos>null</certIos>
+    <certIosProvisioning>null</certIosProvisioning>
+  </moonshineRunCustomization>
+</project>
\ No newline at end of file
diff --git a/archetypes/royale-jewel-library-archetype/src/main/resources/archetype-resources/asconfig.json b/archetypes/royale-jewel-library-archetype/src/main/resources/archetype-resources/asconfig.json
new file mode 100644
index 0000000..f130bd2
--- /dev/null
+++ b/archetypes/royale-jewel-library-archetype/src/main/resources/archetype-resources/asconfig.json
@@ -0,0 +1,58 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.
+//
+////////////////////////////////////////////////////////////////////////////////
+{
+    "config": "royale",
+    "type": "lib",
+    "compilerOptions": {
+        "debug": true,
+        "targets": ["JSRoyale"],
+        "source-path": [
+            "src/main/royale"
+        ],
+        "include-namespaces": [
+            "library://ns.apache.org/royale/${artifactIdLowerCase}"
+        ],
+        "namespace": [
+            {
+                "uri": "library://ns.apache.org/royale/${artifactIdLowerCase}",
+                "manifest": "src/main/resources/${artifactIdLowerCase}-manifest.xml"
+            }
+            // ,{
+            //     "uri": "library://ns.apache.org/royale/${artifactIdLowerCase}",
+            //     "manifest": "src/main/resources/${artifactIdLowerCase}-as-manifest.xml"
+            // }
+        ],
+        "include-classes": [
+            "${artifactId}Classes"
+        ],
+        "include-sources": [
+            "src/main/royale"
+        ],
+        // "library-path": [
+        //     "${royalelib}/js/libs/MXRoyaleJS.swc"
+        // ],
+        // "js-library-path": [
+        //     "${royalelib}/js/libs/MXRoyaleJS.swc"
+        // ],
+        "source-map": true,
+        "output": "bin/${artifactId}.swc"
+    }
+    // ,
+    // "additionalOptions": "-js-dynamic-access-unknown-members=true"
+}
diff --git a/archetypes/royale-jewel-library-archetype/src/main/resources/archetype-resources/pom.xml b/archetypes/royale-jewel-library-archetype/src/main/resources/archetype-resources/pom.xml
new file mode 100644
index 0000000..d7c2863
--- /dev/null
+++ b/archetypes/royale-jewel-library-archetype/src/main/resources/archetype-resources/pom.xml
@@ -0,0 +1,312 @@
+<?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.
+
+-->
+#set($dollar = '$')
+<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>
+    <groupId>org.apache</groupId>
+    <artifactId>apache</artifactId>
+    <version>23</version>
+    <relativePath />
+  </parent>
+
+  <groupId>\${groupId}</groupId>
+  <artifactId>\${artifactId}</artifactId>
+  <version>\${version}</version>
+  <packaging>swc</packaging>
+
+  <properties>
+    <compiler.debug>true</compiler.debug>
+    <royale.framework.version>0.9.8-SNAPSHOT</royale.framework.version>
+    <compiler.output-dir-debug>${dollar}{basedir}/target/javascript/bin/js-debug</compiler.output-dir-debug>
+    <compiler.output-dir-release>${dollar}{basedir}/target/javascript/bin/js-release</compiler.output-dir-release>
+  </properties>
+
+  <build>
+    <sourceDirectory>src/main/royale</sourceDirectory>
+
+    <pluginManagement>
+      <plugins>
+        <!-- Copy the resources to the compiler output directory -->
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-resources-plugin</artifactId>
+          <executions>
+            <execution>
+              <id>copy-resources-debug</id>
+              <phase>validate</phase>
+              <goals>
+                <goal>copy-resources</goal>
+              </goals>
+              <configuration>
+                <outputDirectory>${dollar}{compiler.output-dir-debug}</outputDirectory>
+                <resources>
+                  <resource>
+                    <directory>src/main/resources</directory>
+                    <filtering>true</filtering>
+                  </resource>
+                </resources>
+              </configuration>
+            </execution>
+            <execution>
+              <id>copy-resources-release</id>
+              <phase>validate</phase>
+              <goals>
+                <goal>copy-resources</goal>
+              </goals>
+              <configuration>
+                <!-- Copy the assets to the assets output directory -->
+                <outputDirectory>${dollar}{compiler.output-dir-release}/assets</outputDirectory>
+                <resources>
+                  <resource>
+                    <directory>src/main/resources/js</directory>
+                    <filtering>true</filtering>
+                  </resource>
+                </resources>
+              </configuration>
+            </execution>
+          </executions>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+
+    <plugins>
+      <plugin>
+        <groupId>org.apache.royale.compiler</groupId>
+        <artifactId>royale-maven-plugin</artifactId>
+        <version>${royale.framework.version}</version>
+        <extensions>true</extensions>
+        <configuration>
+          <targets>JSRoyale</targets>
+          <namespaces>
+            <namespace>
+              <uri>library://ns.apache.org/royale/jewel</uri>
+              <manifest>${dollar}{project.basedir}/src/main/resources/${artifactIdLowerCase}-manifest.xml</manifest>
+            </namespace>
+            <!-- <namespace>
+              <type>as</type>
+              <uri>library://ns.apache.org/royale/jewel</uri>
+              <manifest>${dollar}{basedir}/src/main/resources/${artifactIdLowerCase}-as-manifest.xml</manifest>
+            </namespace> -->
+          </namespaces>
+          <includeClasses>
+            <includeClass>\${artifactId}Classes</includeClass>
+          </includeClasses>
+          <includeFiles>
+            <include-file>
+              <name>default.css</name>
+              <path>../src/main/resources/default.css</path>
+            </include-file>
+            <!-- Uncomment To Include Assets like Images -->
+            <!-- <include-file>
+              <name>assets/*</name>
+              <path>../src/main/resources/assets/*</path>
+            </include-file>
+            <include-file>
+              <name>js/*</name>
+              <path>../src/main/resources/js/*</path>
+            </include-file> -->
+          </includeFiles>
+          <!-- <includeLookupOnly>true</includeLookupOnly>
+          <allowSubclassOverrides>true</allowSubclassOverrides>
+          <skipExtern>true</skipExtern>
+          <skipAS>true</skipAS> -->
+          <!-- <additionalCompilerOptions>
+            -source-map=true;
+            -source-map-source-root=/frameworks/projects/Jewel/src/main/royale/
+          </additionalCompilerOptions> -->
+        </configuration>
+        <dependencies>
+          <dependency>
+            <groupId>org.apache.royale.compiler</groupId>
+            <artifactId>compiler-jx</artifactId>
+            <version>${royale.framework.version}</version>
+          </dependency>
+        </dependencies>
+      </plugin>
+      <plugin>
+        <groupId>nl.geodienstencentrum.maven</groupId>
+        <artifactId>sass-maven-plugin</artifactId>
+        <version>3.7.2</version>
+        <configuration>
+          <resources>
+            <resource>
+              <source>
+                <directory>${dollar}{basedir}/src/main/sass</directory>
+                <includes>
+                  <include>**/*.sass</include>
+                </includes>
+              </source>
+              <destination>${dollar}{basedir}/src/main/resources</destination>
+            </resource>
+          </resources>
+        </configuration>
+        <executions>
+          <execution>
+            <id>generate-css-using-sass</id>
+            <goals>
+                <goal>update-stylesheets</goal>
+            </goals>
+            <phase>generate-resources</phase>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>com.google.code.maven-replacer-plugin</groupId>
+        <artifactId>replacer</artifactId>
+        <version>1.5.3</version>
+        <executions>
+          <execution>
+            <phase>generate-resources</phase>
+            <goals>
+              <goal>replace</goal>
+            </goals>
+          </execution>
+        </executions>
+        <configuration>
+          <includes>
+            <include>${dollar}{basedir}/src/main/resources/**/*.css</include>
+          </includes>
+          <regex>false</regex>
+          <replacements>
+            <replacement>
+              <token>@@ZERO_WIDTH_SPACE</token>
+              <value>\200b</value>
+            </replacement>
+            <replacement>
+              <token>@@NON_BREAKING_SPACE</token>
+              <value>\0a</value>
+            </replacement>
+          </replacements>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+  <dependencies>
+    <!-- For flash compilation, we need the airglobal or playerglobal -->
+    <dependency>
+      <groupId>com.adobe.air.framework</groupId>
+      <artifactId>airglobal</artifactId>
+      <version>20.0</version>
+      <type>swc</type>
+      <scope>provided</scope>
+    </dependency>
+    <!-- For JavaScript compilation, we need some other base classes -->
+    <dependency>
+      <groupId>org.apache.royale.typedefs</groupId>
+      <artifactId>royale-typedefs-gcl</artifactId>
+      <version>${royale.framework.version}</version>
+      <type>swc</type>
+      <classifier>typedefs</classifier>
+    </dependency>
+
+    <!-- Add dependencies you might be needing here -->
+    <dependency>
+      <groupId>org.apache.royale.framework</groupId>
+      <artifactId>Core</artifactId>
+      <version>${royale.framework.version}</version>
+      <type>swc</type>
+      <classifier>js</classifier>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.royale.framework</groupId>
+      <artifactId>Basic</artifactId>
+      <version>0.9.8-SNAPSHOT</version>
+      <type>swc</type>
+      <classifier>js</classifier>
+    </dependency>
+    
+    <dependency>
+      <groupId>org.apache.royale.framework</groupId>
+      <artifactId>Jewel</artifactId>
+      <version>0.9.8-SNAPSHOT</version>
+      <type>swc</type>
+      <classifier>js</classifier>
+    </dependency>
+    
+    <dependency>
+      <groupId>org.apache.royale.framework</groupId>
+      <artifactId>Icons</artifactId>
+      <version>0.9.8-SNAPSHOT</version>
+      <type>swc</type>
+      <classifier>js</classifier>
+    </dependency>
+#if (${includeCrux} == 'true' || ${includeCrux} == 'yes' || ${includeCrux} == 'y')
+    
+    <dependency>
+      <groupId>org.apache.royale.framework</groupId>
+      <artifactId>Crux</artifactId>
+      <version>0.9.8-SNAPSHOT</version>
+      <type>swc</type>
+      <classifier>js</classifier>
+    </dependency>
+#end
+
+    <!-- Needed for JavaScript compilation -->
+    <dependency>
+      <groupId>org.apache.royale.framework</groupId>
+      <artifactId>HTML</artifactId>
+      <version>${royale.framework.version}</version>
+      <type>swc</type>
+      <classifier>js</classifier>
+    </dependency>
+    
+    <dependency>
+      <groupId>org.apache.royale.framework</groupId>
+      <artifactId>Language</artifactId>
+      <version>${royale.framework.version}</version>
+      <type>swc</type>
+      <classifier>js</classifier>
+    </dependency>
+  </dependencies>
+
+  <profiles>
+    <profile>
+      <id>apache-release</id>
+      <properties>
+        <compiler.debug>false</compiler.debug>
+      </properties>
+    </profile>
+
+    <profile>
+      <id>option-with-swf</id>
+      <properties>
+        <!-- no point building the swf target  -->
+        <royale.targets>JSRoyale</royale.targets>
+      </properties>
+      <dependencies>
+        <!-- Needed for Flash compilation -->
+        <!-- <dependency>
+          <groupId>com.adobe.flash.framework</groupId>
+          <artifactId>playerglobal</artifactId>
+          <version>20.0</version>
+          <type>swc</type>
+          <scope>provided</scope>
+        </dependency> -->
+      </dependencies>
+    </profile>
+  </profiles>
+
+</project>
diff --git a/archetypes/royale-jewel-library-archetype/src/main/resources/archetype-resources/src/main/resources/__artifactIdLowerCase__-as-manifest.xml b/archetypes/royale-jewel-library-archetype/src/main/resources/archetype-resources/src/main/resources/__artifactIdLowerCase__-as-manifest.xml
new file mode 100644
index 0000000..43b5314
--- /dev/null
+++ b/archetypes/royale-jewel-library-archetype/src/main/resources/archetype-resources/src/main/resources/__artifactIdLowerCase__-as-manifest.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<!--
+
+  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.
+
+-->
+
+
+<componentPackage>
+
+  <!-- <component id="ClassName" class="package.ClassName"/> -->
+
+</componentPackage>
\ No newline at end of file
diff --git a/archetypes/royale-jewel-library-archetype/src/main/resources/archetype-resources/src/main/resources/__artifactIdLowerCase__-manifest.xml b/archetypes/royale-jewel-library-archetype/src/main/resources/archetype-resources/src/main/resources/__artifactIdLowerCase__-manifest.xml
new file mode 100644
index 0000000..f6f7324
--- /dev/null
+++ b/archetypes/royale-jewel-library-archetype/src/main/resources/archetype-resources/src/main/resources/__artifactIdLowerCase__-manifest.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<!--
+
+  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.
+
+-->
+
+
+<componentPackage>
+
+  <component id="SampleClass" class="${package}.SampleClass"/>
+
+</componentPackage>
\ No newline at end of file
diff --git a/archetypes/royale-jewel-library-archetype/src/main/resources/archetype-resources/src/main/royale/SampleClass.as b/archetypes/royale-jewel-library-archetype/src/main/resources/archetype-resources/src/main/royale/SampleClass.as
new file mode 100644
index 0000000..433016e
--- /dev/null
+++ b/archetypes/royale-jewel-library-archetype/src/main/resources/archetype-resources/src/main/royale/SampleClass.as
@@ -0,0 +1,31 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 ${package}
+{
+    /**
+     *  A Sample Class to fill this library
+     */
+    public class SampleClass
+    {
+        public function doSomething():void
+        {
+            trace("doing something");
+        }
+    }
+}
\ No newline at end of file
diff --git a/archetypes/royale-jewel-library-archetype/src/main/resources/archetype-resources/src/main/royale/__artifactId__Classes.as b/archetypes/royale-jewel-library-archetype/src/main/resources/archetype-resources/src/main/royale/__artifactId__Classes.as
new file mode 100644
index 0000000..e48bebe
--- /dev/null
+++ b/archetypes/royale-jewel-library-archetype/src/main/resources/archetype-resources/src/main/royale/__artifactId__Classes.as
@@ -0,0 +1,46 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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
+{
+    /**
+     *  @private
+     *  This class is used to link additional classes into jewel.swc
+     *  beyond those that are found by dependecy analysis starting
+     *  from the classes specified in manifest.xml.
+     * 
+     *  If the class need to be used in MXML please add only to manifest.xml
+     */
+    internal class ${artifactId}Classes
+    {
+        // Add here classes for all platforms
+        // import package.ClassName; ClassName;
+
+        // Add here classes for the JS platform
+        // COMPILE::JS
+	    // {
+        // import package.ClassName; ClassName;
+        // }
+        
+        // Add here classes for the SWF platform
+        // COMPILE::SWF
+	    // {
+        // import package.ClassName; ClassName;
+        // }
+    }
+}
\ No newline at end of file
diff --git a/archetypes/royale-jewel-library-archetype/src/main/resources/archetype-resources/src/main/sass/_global.sass b/archetypes/royale-jewel-library-archetype/src/main/resources/archetype-resources/src/main/sass/_global.sass
new file mode 100644
index 0000000..4245094
--- /dev/null
+++ b/archetypes/royale-jewel-library-archetype/src/main/resources/archetype-resources/src/main/sass/_global.sass
@@ -0,0 +1,25 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+@namespace "http://www.w3.org/1999/xhtml"
+@namespace j "library://ns.apache.org/royale/jewel"
+
+// .jewel
+//     .label
+//         color: #ff0000
\ No newline at end of file
diff --git a/archetypes/royale-jewel-library-archetype/src/main/resources/archetype-resources/src/main/sass/default.sass b/archetypes/royale-jewel-library-archetype/src/main/resources/archetype-resources/src/main/sass/default.sass
new file mode 100644
index 0000000..bbad92a
--- /dev/null
+++ b/archetypes/royale-jewel-library-archetype/src/main/resources/archetype-resources/src/main/sass/default.sass
@@ -0,0 +1,21 @@
+/**
+ *  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.
+ */
+
+// Variables
+
+// Global
+@import "global"
\ No newline at end of file