flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cd...@apache.org
Subject [38/51] [partial] Refactored the PMD Maven build - Adjusted the directory structure - Fixed a lot of compile problems - Fixed the maven setup - Made PMD build with Flexmojos 7.1.0 and Apache Flex 4.13.0 - Fixed a few UnitTests
Date Tue, 26 Aug 2014 22:44:09 GMT
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/build.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/build.xml b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/build.xml
new file mode 100644
index 0000000..24c6d01
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/build.xml
@@ -0,0 +1,75 @@
+<?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.
+
+-->
+<project name="FlexPMD client build utility" default="default" xmlns:artifact="urn:maven-artifact-ant">
+
+	<property environment="env" />
+	<property file="${basedir}/build.properties" />
+
+	<!-- uncomment if you need to see what properties ant is picking up 
+	<echoproperties />
+    -->
+	
+	<path id="maven-ant-tasks.classpath" path="${basedir}/ant.lib/maven-ant-tasks-2.0.9.jar"
/>
+	<typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="urn:maven-artifact-ant"
classpathref="maven-ant-tasks.classpath" />
+
+
+	<target name="default">
+		<echo> This build contains at set of usefull targets </echo>
+		<echo> The compilation, unit test, flexpmd quality report and done with maven </echo>
+		<echo />
+		<echo> From here, you may  the following target: </echo>
+		<echo />
+		<echo> -------- update the third party libraries swc  ----------------- </echo>
+		<echo> libs.update          -- will clean and recopy the 3rd party swc in libs</echo>
+		<echo />
+		<echo> -------- flexcover --------------------------------------------- </echo>
+		<echo> flexcover.run          -- will run the flexcover air client and flexunit test
runner</echo>
+		<echo> flexcover.report       -- will run flexcover and create a emma.xml report</echo>
+	</target>
+
+	<target name="libs.update">
+		<delete includeemptydirs="true">
+			<fileset dir="${basedir}/libs" includes="*.swc" excludes="radon_flex_remoted_objects*.swc"
/>
+		</delete>
+		<artifact:dependencies filesetId="dependency.fileset" useScope="test">
+			<pom file="${basedir}/pom.xml" />
+		</artifact:dependencies>
+		<copy todir="${basedir}/libs">
+			<fileset refid="dependency.fileset" />
+			<!-- This mapper strips off all leading directory information -->
+			<mapper type="flatten" />
+		</copy>
+		<delete includeemptydirs="true">
+			<fileset dir="${basedir}/libs" includes="*${flex.sdk.version}*" defaultexcludes="false"
excludes="datavisualization-3.2.0.3958-en_US.rb.swc,datavisualization-3.2.0.3958.swc"/>
+			<fileset dir="${basedir}/libs" includes="*.pom" defaultexcludes="false" />
+			<fileset dir="${basedir}/libs" includes="*.zip" defaultexcludes="false" />
+            <fileset dir="${basedir}/libs" includes="*.jar" defaultexcludes="false" />
+		</delete>
+	</target>
+
+	<target name="flexcover.run" depends="libs.update">
+		<ant antfile="${basedir}/flexcover.xml" target="run" />
+	</target>
+
+	<target name="flexcover.report" depends="libs.update">
+		<ant antfile="${basedir}/flexcover.xml" target="report" />
+	</target>
+
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/flexcover.properties
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/flexcover.properties b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/flexcover.properties
new file mode 100644
index 0000000..929c918
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/flexcover.properties
@@ -0,0 +1,89 @@
+################################################################################
+##
+##  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.
+##
+################################################################################
+
+#
+# Common to all platforms
+
+# Mac/unix location of adl
+#adl=${FLEX_HOME}/bin/adl
+
+# Windows location of adl
+adl=${flexcover.sdk}\\bin\\adl.exe
+
+dirSep=\\
+
+# flex related variables
+FLEX_HOME=${flexcover.sdk}
+flexConfig=${flexcover.sdk}/frameworks/air-config.xml
+FLEX_TASKS=${flexcover.sdk}/ant/lib/flexTasks.jar
+
+LOCALE=en_US
+
+versionNumber=1.0
+
+# frameworks and locations
+ant.lib=${basedir}/ant.lib
+logs=${basedir}/target/logs
+temp=${logs}/temp
+flashOutput.location=${logs}/TEST-testOutput.xml
+src=${basedir}/src/main/flex
+src_resources=${basedir}/src/main/resources
+src_test=${basedir}/src/test/flex
+src_test_resources=${basedir}/src/test/resources
+src_locale=${basedir}/src/main/locales/en_US
+testClassPath=${basedir}/libs
+resourceBundles=${basedir}/src/main/locales
+flexUnitSrc=${basedir}/src/test
+filesToPublish=${basedir}/filesToPublish
+
+# constants
+testTerminationToken=-----------------TESTRUNNEROUTPUTENDS----------------
+initialContentToken=[This value will be overwritten by Flex Builder in the output app.xml]
+majorVersion=1
+minorVersion=0
+releaseVersion=0
+
+# project variables
+build=${temp}
+
+# test Harness
+testAppXML=${testName}-app.xml
+testAppMXML=${testName}.mxml
+testSWF=${testName}.swf
+testCVM=${testName}.cvm
+testOutputDir=${temp}
+
+# main app
+mainName=Main
+mainAppXMLtemplate=${mainName}-app-template.xml
+mainAppXML=${mainName}-app.xml
+mainAppMXML=${mainName}.mxml
+mainSWF=${mainName}.swf
+
+# instumentation
+coverageMetadata=${temp}/${mainName}.cvm
+coverageReport=${basedir}/target/site/emma/coverage.xml
+coverageCVR=${logs}/${mainName}_coverage.cvr
+coverageXML=${ant.lib}/CoverageViewer-app.xml
+
+# build variables
+verbose=true
+dist=${basedir}/target/dist-test
+adtJar=${flexcover.sdk}/lib/adt.jar
+

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/flexcover.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/flexcover.xml b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/flexcover.xml
new file mode 100644
index 0000000..0573834
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/flexcover.xml
@@ -0,0 +1,191 @@
+<?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 name="FlexPMD Flex Cover Report ANT build report utility" basedir="" default="report">
+
+	<!-- set up the build environment -->
+	<property file="build.properties" />
+	<property file="flexcover.properties" />
+	<property environment="env" />
+
+	<property name="flexpmd.version" value="1.0-RC1" />
+
+	<!-- get the hostname of the machine we're running on -->
+	<property name="env.HOSTNAME" value="${env.COMPUTERNAME}" />
+
+	<!-- include the flex target definitions -->
+	<taskdef resource="flexTasks.tasks" classpath="${FLEX_TASKS}" />
+
+	<!-- Define the FlexUnit task. -->
+	<taskdef resource="com/adobe/ac/ant/tasks/tasks.properties" classpath="${ant.lib}/FlexUnitAntTasks.jar"
/>
+
+	<!-- uncomment if you need to see what properties ant is picking up -->
+	<echoproperties/>
+
+	<!-- the main build target the build machine uses, build, test, report, nag -->
+	<target name="run.prepare" 
+		depends="clean,getInstrumentationMetadata,compileAndRunTests,cleanUp" 
+		description="cleans, compiles and tests the app, builds a non-release package." />
+
+	
+	<target name="report">
+		<antcall target="run.prepare">
+            <param name="testName" value="TestRunner" />
+        </antcall>
+	</target>
+	
+	<target name="run">
+		<antcall target="run.prepare">
+            <param name="testName" value="TestViewRunner" />
+        </antcall>
+	</target>
+
+	<!-- usethis target to test locally -->
+	<target name="compileAndRunTests" depends="clean,compileTest,runTest" 
+		description="compile and run the test suite and code coverage tool" />
+
+	<target name="getInstrumentationMetadata" 
+		description="compiles the app to get metadata about classes needed for code coverage" depends="clean">
+ 		<compile />
+	</target>
+
+	<target name="cleanUp" description="removes test harness and temp folder from build directory">
+		<delete file="${build}/${testAppXML}">
+		</delete>
+		<delete file="${build}/${testSWF}">
+		</delete>
+	</target>
+
+	<property name="coverageMetadata-path" location="${coverageMetadata}" />
+	<property name="coverageReport-path" location="${coverageReport}" />
+	<property name="coverageCVR-path" location="${coverageCVR}" />
+	<property name="coverageXML-path" location="${coverageXML}" />
+
+	<target name="launchCodeCoverageApp" description="launches to code coverage listener
app">
+		<echo>'${coverageMetadata-path}' -output '${coverageCVR-path}' -emma-report '${coverageReport-path}'</echo>
+		<launchApp appXML="${coverageXML-path}" additionalArgs="${coverageMetadata-path} -output
${coverageCVR-path} -emma-report ${coverageReport-path}" />
+	</target>
+
+	<macrodef name="launchApp">
+		<attribute name="appXML" />
+		<attribute name="additionalArgs" />
+		<attribute name="spawn" default="true" />
+		<sequential>
+			<pathconvert property="xmlPath" dirsep="${dirSep}">
+				<path location="@{appXML}" />
+			</pathconvert>
+			<echo>launching adl with ${xmlPath}</echo>
+			<exec executable="${adl}" spawn="@{spawn}">
+				<arg line="'${xmlPath}'" />
+				<arg line="--" />
+				<arg line="@{additionalArgs}" />
+			</exec>
+		</sequential>
+	</macrodef>
+
+	<macrodef name="compile">
+		<attribute name="srcFile" default="${src}/${mainAppMXML}" />
+		<attribute name="outputFile" default="${temp}/${mainSWF}" />
+		<sequential>
+			<mxmlc file="@{srcFile}" output="@{outputFile}" debug="${debugMode}" 
+				allow-source-path-overlap="true" show-actionscript-warnings="false" 
+				keep-generated-actionscript="false" maxmemory="1024m">
+
+				<define name="CONFIG::debugging" value="false" />
+
+				<load-config filename="${flexConfig}" />
+
+				<!-- path to our source -->
+				<source-path path-element="${src}" />
+				<source-path path-element="${src_test}" />
+				<source-path path-element="${src_locale}" />
+				<source-path path-element="${testClassPath}" />
+				<source-path path-element="${resourceBundles}" />
+				<source-path path-element="${flexUnitSrc}" />
+
+				<!-- core flex libraries -->
+				<compiler.library-path dir="${flexcover.sdk}/frameworks" append="true">
+					<include name="libs" />
+				</compiler.library-path>
+				<compiler.library-path dir="${flexcover.sdk}/frameworks/locale" append="true">
+					<include name="${LOCALE}" />
+				</compiler.library-path>
+
+				<!-- air libraries (why need to declare separate)? -->
+				<compiler.library-path dir="${flexcover.sdk}/frameworks" append="true">
+					<include name="libs/air" />
+				</compiler.library-path>
+
+				<!-- local libraries -->
+				<compiler.library-path dir="." append="true">
+					<include name="libs" />
+					<include name="${ant.lib}" />
+				</compiler.library-path>
+			</mxmlc>
+		</sequential>
+	</macrodef>
+
+
+	<!-- compile the unit tests -->
+	<target name="compileTest" description="compile the the test suite">
+		<compile srcFile="${src}/${testAppMXML}" outputFile="${build}/${testSWF}" />
+		<generateAppXML srcFile="${src}/${testAppXML}" destFile="${build}/${testAppXML}" initialContent="${testSWF}"
/>
+	</target>
+
+	<!-- create the application XML file -->
+	<macrodef name="generateAppXML">
+		<attribute name="srcFile" />
+		<attribute name="destFile" />
+		<attribute name="initialContent" />
+		<sequential>
+			<copy file="@{srcFile}" tofile="@{destFile}" />
+			<replace file="@{destFile}" token="${initialContentToken}" value="@{initialContent}"
/>
+			<echo>setting build number to: ${versionNumber}</echo>
+			<replace file="@{destFile}" token="%VERSION%" value="${versionNumber}" />
+		</sequential>
+	</macrodef>
+
+	<!-- Clears out the build directory -->
+	<target name="clean">
+		<echo message="Removing build directory contents" description="removes build related
directory contents" />
+	</target>
+	
+	<target name="runTest" description="runs the test harness and coverage tool" depends="clean,compileTest">
+		<parallel timeout="120000">
+			<sequential>
+				<antcall target="launchCodeCoverageApp">
+				</antcall>
+				<sleep seconds="15" />
+				<launchApp appXML="${build}/${testAppXML}" additionalArgs="'${testOutputDir}'" spawn="no"
/>
+				<airflexunit reportDir="${testOutputDir}" haltonfailure="true" />
+				<echo>finished running tests </echo>
+				<waitfor>
+					<available file="${coverageCVR-path}" />
+				</waitfor>
+				<echo>found coverage CVR </echo>
+				<waitfor>
+					<available file="${coverageReport-path}" />
+				</waitfor>
+				<echo>found coverage report</echo>
+			</sequential>
+		</parallel>
+	</target>
+
+
+</project>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/html-template/index.template.html
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/html-template/index.template.html
b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/html-template/index.template.html
new file mode 100644
index 0000000..2146ca8
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/html-template/index.template.html
@@ -0,0 +1,121 @@
+<!--
+  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.
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!-- saved from url=(0014)about:internet -->
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">	
+    <!-- 
+    Smart developers always View Source. 
+    
+    This application was built using Adobe Flex, an open source framework
+    for building rich Internet applications that get delivered via the
+    Flash Player or to desktops via Adobe AIR. 
+    
+    Learn more about Flex at http://flex.org 
+    // -->
+    <head>
+        <title>${title}</title>         
+        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+		<!-- Include CSS to eliminate any default margins/padding and set the height of the
html element and 
+		     the body element to 100%, because Firefox, or any Gecko based browser, interprets
percentage as 
+			 the percentage of the height of its parent container, which has to be set explicitly.
 Initially, 
+			 don't display flashContent div so it won't show if JavaScript disabled.
+		-->
+        <style type="text/css" media="screen"> 
+			html, body	{ height:100%; }
+			body { margin:0; padding:0; overflow:auto; text-align:center; 
+			       background-color: ${bgcolor}; }   
+			#flashContent { display:none; }
+        </style>
+		
+		<!-- Enable Browser History by replacing useBrowserHistory tokens with two hyphens -->
+        <!-- BEGIN Browser History required section ${useBrowserHistory}>
+        <link rel="stylesheet" type="text/css" href="history/history.css" />
+        <script type="text/javascript" src="history/history.js"></script>
+        <!${useBrowserHistory} END Browser History required section -->  
+		    
+        <script type="text/javascript" src="swfobject.js"></script>
+        <script type="text/javascript">
+            <!-- For version detection, set to min. required Flash Player version, or
0 (or 0.0.0), for no version detection. --> 
+            var swfVersionStr = "${version_major}.${version_minor}.${version_revision}";
+            <!-- To use express install, set to playerProductInstall.swf, otherwise the
empty string. -->
+            var xiSwfUrlStr = "${expressInstallSwf}";
+            var flashvars = {};
+            var params = {};
+            params.quality = "high";
+            params.bgcolor = "${bgcolor}";
+            params.allowscriptaccess = "sameDomain";
+            params.allowfullscreen = "true";
+            var attributes = {};
+            attributes.id = "${application}";
+            attributes.name = "${application}";
+            attributes.align = "middle";
+            swfobject.embedSWF(
+                "${swf}.swf", "flashContent", 
+                "${width}", "${height}", 
+                swfVersionStr, xiSwfUrlStr, 
+                flashvars, params, attributes);
+			<!-- JavaScript enabled so display the flashContent div in case it is not replaced
with a swf object. -->
+			swfobject.createCSS("#flashContent", "display:block;text-align:left;");
+        </script>
+    </head>
+    <body>
+        <!-- SWFObject's dynamic embed method replaces this alternative HTML content with
Flash content when enough 
+			 JavaScript and Flash plug-in support is available. The div is initially hidden so that
it doesn't show
+			 when JavaScript is disabled.
+		-->
+        <div id="flashContent">
+        	<p>
+	        	To view this page ensure that Adobe Flash Player version 
+				${version_major}.${version_minor}.${version_revision} or greater is installed. 
+			</p>
+			<script type="text/javascript"> 
+				var pageHost = ((document.location.protocol == "https:") ? "https://" :	"http://"); 
+				document.write("<a href='http://www.adobe.com/go/getflashplayer'><img src='"

+								+ pageHost + "www.adobe.com/images/shared/download_buttons/get_flash_player.gif'
alt='Get Adobe Flash player' /></a>" ); 
+			</script> 
+        </div>
+	   	
+       	<noscript>
+            <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="${width}"
height="${height}" id="${application}">
+                <param name="movie" value="${swf}.swf" />
+                <param name="quality" value="high" />
+                <param name="bgcolor" value="${bgcolor}" />
+                <param name="allowScriptAccess" value="sameDomain" />
+                <param name="allowFullScreen" value="true" />
+                <!--[if !IE]>-->
+                <object type="application/x-shockwave-flash" data="${swf}.swf" width="${width}"
height="${height}">
+                    <param name="quality" value="high" />
+                    <param name="bgcolor" value="${bgcolor}" />
+                    <param name="allowScriptAccess" value="sameDomain" />
+                    <param name="allowFullScreen" value="true" />
+                <!--<![endif]-->
+                <!--[if gte IE 6]>-->
+                	<p> 
+                		Either scripts and active content are not permitted to run or Adobe Flash
Player version
+                		${version_major}.${version_minor}.${version_revision} or greater is not
installed.
+                	</p>
+                <!--<![endif]-->
+                    <a href="http://www.adobe.com/go/getflashplayer">
+                        <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif"
alt="Get Adobe Flash Player" />
+                    </a>
+                <!--[if !IE]>-->
+                </object>
+                <!--<![endif]-->
+            </object>
+	    </noscript>		
+   </body>
+</html>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/pom.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/pom.xml b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/pom.xml
new file mode 100644
index 0000000..fab0bd0
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/pom.xml
@@ -0,0 +1,221 @@
+<!--
+
+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/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <artifactId>flex-pmd-flex</artifactId>
+        <groupId>org.apache.flex.pmd</groupId>
+        <version>1.3-SNAPSHOT</version>
+    </parent>
+
+	<artifactId>flex-pmd-ruleset-creator</artifactId>
+	<packaging>swf</packaging>
+
+	<name>Adobe Flex PMD Ruleset creator</name>
+	<description>Adobe Flex PMD Ruleset creator</description>
+
+	<dependencies>
+
+		<dependency>
+			<groupId>${project.groupId}</groupId>
+			<artifactId>flex-pmd-ruleset</artifactId>
+			<version>${project.parent.version}</version>
+		</dependency>
+
+		<dependency>
+			<groupId>${project.groupId}</groupId>
+			<artifactId>flex-pmd-flex-lib</artifactId>
+			<version>${project.parent.version}</version>
+			<type>swc</type>
+		</dependency>
+
+		<dependency>
+			<groupId>com.adobe.cairngorm</groupId>
+			<artifactId>cairngorm</artifactId>
+			<version>${cairngorm.version}</version>
+			<type>swc</type>
+		</dependency>
+
+		<!-- flex sdk dependencies -->
+
+		<dependency>
+			<groupId>org.apache.flex</groupId>
+			<artifactId>framework</artifactId>
+			<version>${flex.version}</version>
+			<type>pom</type>
+		</dependency>
+
+		<dependency>
+			<groupId>com.adobe.flash.framework</groupId>
+			<artifactId>playerglobal</artifactId>
+			<version>${flash-player.version}</version>
+			<type>swc</type>
+		</dependency>
+
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>flexunit-theme</artifactId>
+            <version>${project.parent.version}</version>
+            <type>swc</type>
+            <scope>theme</scope>
+        </dependency>
+
+        <dependency>
+			<groupId>com.adobe.cairngorm</groupId>
+			<artifactId>event-source</artifactId>
+			<version>${event-source.version}</version>
+			<type>swc</type>
+			<scope>test</scope>
+		</dependency>
+
+        <dependency>
+            <groupId>org.apache.flex.flexunit</groupId>
+            <artifactId>flexunit-flex</artifactId>
+            <version>${flexunit.version}</version>
+            <type>swc</type>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>com.adobe.flexunit</groupId>
+            <artifactId>flexunit</artifactId>
+            <version>1.0.0</version>
+            <type>swc</type>
+            <scope>test</scope>
+        </dependency>
+
+	</dependencies>
+
+	<build>
+		<sourceDirectory>src/main/flex</sourceDirectory>
+		<testSourceDirectory>src/test/flex</testSourceDirectory>
+		<resources>
+			<resource>
+				<directory>src/main/resources</directory>
+			</resource>
+		</resources>
+		<testResources>
+			<testResource>
+				<directory>src/test/resources</directory>
+			</testResource>
+		</testResources>
+
+		<plugins>
+
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-dependency-plugin</artifactId>
+				<version>${maven-dependency-plugin.version}</version>
+				<executions>
+					<execution>
+						<id>unpack-binary-resources</id>
+						<phase>process-sources</phase>
+						<goals>
+							<goal>unpack-dependencies</goal>
+						</goals>
+						<configuration>
+							<includeGroupIds>${project.groupId}</includeGroupIds>
+							<includes>**/*.xml</includes>
+							<outputDirectory>target/rulesets</outputDirectory>
+							<excludeTransitive>true</excludeTransitive>
+						</configuration>
+					</execution>
+				</executions>
+			</plugin>
+
+			<plugin>
+				<groupId>net.flexmojos.oss</groupId>
+				<artifactId>flexmojos-maven-plugin</artifactId>
+				<version>${flex-mojos-plugin.version}</version>
+				<extensions>true</extensions>
+				<configuration>
+					<targetPlayer>${flash-player.version}.0.0</targetPlayer>
+					<defaultSizeWidth>1000</defaultSizeWidth>
+					<defaultSizeHeight>750</defaultSizeHeight>
+				</configuration>
+                <dependencies>
+                    <!-- This handles a bug in maven which causes problems with flex resources
-->
+                    <dependency>
+                        <groupId>net.flexmojos.oss</groupId>
+                        <artifactId>flexmojos-threadlocaltoolkit-wrapper</artifactId>
+                        <version>${flex-mojos-plugin.version}</version>
+                    </dependency>
+                    <!-- Without this FM will use the compiler configured in its
+                    master pom, which will result in version conflicts -->
+                    <dependency>
+                        <groupId>org.apache.flex</groupId>
+                        <artifactId>compiler</artifactId>
+                        <version>${flex.version}</version>
+                        <type>pom</type>
+                    </dependency>
+                </dependencies>
+			</plugin>
+
+			<plugin>
+				<groupId>net.flexmojos.oss</groupId>
+				<artifactId>flexmojos-maven-plugin</artifactId>
+				<version>${flex-mojos-plugin.version}</version>
+				<extensions>true</extensions>
+				<executions>
+					<execution>
+						<goals>
+							<goal>wrapper</goal>
+						</goals>
+					</execution>
+				</executions>
+				<configuration>
+					<templateURI>folder:html-template</templateURI>
+					<htmlName>${project.artifactId}</htmlName>
+				</configuration>
+                <dependencies>
+                    <!-- This handles a bug in maven which causes problems with flex resources
-->
+                    <dependency>
+                        <groupId>net.flexmojos.oss</groupId>
+                        <artifactId>flexmojos-threadlocaltoolkit-wrapper</artifactId>
+                        <version>${flex-mojos-plugin.version}</version>
+                    </dependency>
+                    <!-- Without this FM will use the compiler configured in its
+                    master pom, which will result in version conflicts -->
+                    <dependency>
+                        <groupId>org.apache.flex</groupId>
+                        <artifactId>compiler</artifactId>
+                        <version>${flex.version}</version>
+                        <type>pom</type>
+                    </dependency>
+                </dependencies>
+			</plugin>
+			
+		</plugins>
+	</build>
+
+	<repositories>
+		<repository>
+			<id>flexmojos-repository</id>
+			<url>http://repository.sonatype.org/content/groups/public/</url>
+		</repository>
+	</repositories>
+	<pluginRepositories>
+		<pluginRepository>
+			<id>flexmojos-repository</id>
+			<url>http://repository.sonatype.org/content/groups/public/</url>
+		</pluginRepository>
+	</pluginRepositories>
+
+</project>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/Main.mxml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/Main.mxml b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/Main.mxml
new file mode 100644
index 0000000..d965b0c
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/Main.mxml
@@ -0,0 +1,132 @@
+<?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.
+
+-->
+<mx:Application xmlns:control="com.adobe.ac.pmd.control.*"
+   xmlns:local="*"
+   xmlns:mx="http://www.adobe.com/2006/mxml"
+   xmlns:services="com.adobe.ac.pmd.services.*"
+   xmlns:view="com.adobe.ac.pmd.view.*"
+   styleName="flexUnitApplication"
+   horizontalScrollPolicy="off"
+   layout="vertical"
+   minHeight="600"
+   minWidth="850"
+   height="100%"
+   horizontalAlign="center"
+   verticalAlign="top"
+   paddingBottom="10">
+
+   <control:Controller/>
+
+   <services:MyServiceLocator/>
+
+   <mx:Panel width="100%" 
+      styleName="mainPanel"
+       height="100%">
+
+      <mx:HBox width="100%"
+         horizontalGap="0"
+         paddingRight="10"
+         verticalAlign="bottom"
+         >
+
+         <view:Title styleName="panelTitleStyle"
+            text="FlexPMD Ruleset Creator"
+            />
+
+         <view:Title styleName="panelTitleSubStyle"
+            text="powered by Adobe Technical Services"
+            buttonMode="true"
+            click="navigateToURL( new URLRequest( 'http://www.adobe.com/consulting/' ) )"
+            mouseChildren="false"
+            useHandCursor="true"
+            />
+
+         <mx:Spacer width="100%"
+            />
+
+         <view:Title styleName="panelTitleSubStyle"
+            text="v{ Version.BUILD_NUMBER } built on { Version.BUILD_DATE } at { Version.BUILD_TIME}"
+            />
+
+      </mx:HBox>
+
+      <mx:HRule width="100%"
+         styleName="flexUnitHRule"
+         />
+
+      <mx:HBox width="100%"
+         paddingBottom="5"
+         paddingLeft="10"
+          height="100%">
+
+         <view:RuleSetNavigator id="navigator"
+            width="100%"
+            selectedRuleChange="editor.model.selectedRule = event.selectedRule"
+             height="100%"/>
+
+         <mx:VRule
+            styleName="flexUnitHRule"
+             height="100%"/>
+
+		 <mx:VBox
+			 height="100%">
+			 
+	         <view:RuleEditor id="editor"/>
+			 
+			 <mx:Label
+				 text="{ navigator.model.rootRuleset.rulesNb } rule(s) in your current ruleset"
+				 />
+
+		 </mx:VBox>
+
+      </mx:HBox>
+
+      <mx:HRule width="100%"
+         styleName="flexUnitHRule"
+         />
+
+      <mx:HBox width="100%"
+         horizontalAlign="center"
+		 verticalAlign="middle"
+         >
+
+		  <mx:Button label="Import"
+					 icon="@Embed(source='/assets/up.png')"
+					 click="navigator.model.getCustomRuleset()"
+					 height="100%"
+					 />
+		  
+		  <mx:Button label="Export"
+					 icon="@Embed(source='/assets/down.png')"
+					 click="navigator.model.exportRootRuleset()"
+					 height="100%"
+					 />
+
+		  <mx:Button label="Add a regexp based rule"
+					 icon="@Embed(source='/assets/add-48.png')"
+					 click="navigator.openRuleset( navigator.model.addNewRegExpBasedRule() )"
+					 height="100%"
+					  paddingLeft="10"/>
+		  
+      </mx:HBox>
+
+   </mx:Panel>
+
+</mx:Application>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/TestRunner-app.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/TestRunner-app.xml
b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/TestRunner-app.xml
new file mode 100644
index 0000000..32aa44b
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/TestRunner-app.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.
+
+-->
+<application xmlns="http://ns.adobe.com/air/application/1.5">
+    <id>com.adobe.ac.flex-pmd-ruleset-creator</id>
+    <version>1.0</version>
+    <filename>TestRunner</filename>
+    <name>Flex Unit</name>
+    <description>
+    </description>
+    <copyright>Adobe Systems Co.</copyright>
+    <initialWindow>
+        <title>Flex Unit</title>
+        <content>
+            TestRunner.swf
+        </content>
+        <systemChrome>none</systemChrome>
+        <transparent>true</transparent>
+        <visible>true</visible>
+        <minimizable>true</minimizable>
+        <maximizable>false</maximizable>
+        <resizable>false</resizable>
+        <width>640</width>
+        <height>480</height>
+        <minSize>320 240</minSize>
+        <maxSize>1280 960</maxSize>
+    </initialWindow> 
+    
+</application>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/TestViewRunner-app.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/TestViewRunner-app.xml
b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/TestViewRunner-app.xml
new file mode 100644
index 0000000..78fa8de
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/TestViewRunner-app.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.
+
+-->
+<application xmlns="http://ns.adobe.com/air/application/1.5">
+    <id>com.adobe.ac.flex-pmd-ruleset-creator</id>
+    <version>1.0</version>
+    <filename>TestViewRunner</filename>
+    <name>Flex Unit</name>
+    <description>
+    </description>
+    <copyright>Adobe Systems Co.</copyright>
+    <initialWindow>
+        <title>Flex Unit</title>
+        <content>
+            TestViewRunner.swf
+        </content>
+        <systemChrome>none</systemChrome>
+        <transparent>true</transparent>
+        <visible>true</visible>
+        <minimizable>true</minimizable>
+        <maximizable>false</maximizable>
+        <resizable>false</resizable>
+        <width>1</width>
+        <height>1</height>
+        <minSize>320 240</minSize>
+        <maxSize>1280 960</maxSize>
+    </initialWindow> 
+    
+</application>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/assets/add-10.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/assets/add-10.png
b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/assets/add-10.png
new file mode 100644
index 0000000..9c79824
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/assets/add-10.png
differ

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/assets/add-48.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/assets/add-48.png
b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/assets/add-48.png
new file mode 100644
index 0000000..045139d
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flex-pmd-ruleset-creator/src/main/flex/assets/add-48.png
differ


Mime
View raw message