You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by jb...@apache.org on 2010/11/21 16:44:26 UTC

svn commit: r1037482 - in /commons/sandbox/gsoc/2010/scxml-js/trunk: ./ lib/java/ src/xslt/util/ src/xslt/util/language-frontend-module-generators/

Author: jbeard
Date: Sun Nov 21 15:44:25 2010
New Revision: 1037482

URL: http://svn.apache.org/viewvc?rev=1037482&view=rev
Log:
Intermediate commit. Primarily added new tasks to build.

Added:
    commons/sandbox/gsoc/2010/scxml-js/trunk/lib/java/maven-ant-tasks-2.1.1.jar
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/language-frontend-module-generators/
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/language-frontend-module-generators/bash-xsltproc-from-topo-sort-list-generator.xsl   (contents, props changed)
      - copied, changed from r1037481, commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/generate-bash-xsltproc-from-topo-sort-list.xsl
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/language-frontend-module-generators/js-from-topo-sort-list-generator.xsl   (contents, props changed)
      - copied, changed from r1037481, commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/generate-require-js-from-topo-sort-list.xsl
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/language-frontend-module-generators/python-from-topo-sort-list-generator.xsl   (contents, props changed)
      - copied, changed from r1037481, commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/generate-python-from-topo-sort-list.xsl
Removed:
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/generate-bash-xsltproc-from-topo-sort-list.xsl
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/generate-python-from-topo-sort-list.xsl
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/generate-require-js-from-topo-sort-list.xsl
Modified:
    commons/sandbox/gsoc/2010/scxml-js/trunk/build-common.xml
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/topo-sort.xsl

Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/build-common.xml
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/build-common.xml?rev=1037482&r1=1037481&r2=1037482&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/build-common.xml (original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/build-common.xml Sun Nov 21 15:44:25 2010
@@ -32,13 +32,19 @@
 	<property name="build-js" location="${build}/build-js"/>
 	<property name="build-class" location="${build}/classes"/>
 	<property name="build-jar" location="${build}/jar"/>
+	<property name="build-xsl-dep-list" location="${build}/xsl-dep-list"/>
+	<property name="build-language-frontend-modules" location="${build}/language-frontend-modules"/>
 
 
+	<property name="xslt-language-frontend-generator-basename" value="-from-topo-sort-list-generator.xsl"/>
+
 	<property name="ie_browser_name" value="ie"/>
 
 	<property name="is_for_ie" value="is-for-ie"/>
 	<property name="is_not_for_ie" value="is-not-for-ie"/>
 
+	<property name="language-frontends" value="js,python,bash-xsltproc"/>
+
 	<property name="backends" value="switch,table,state"/>
 	<!--
 	<property name="backends" value="switch"/>
@@ -49,6 +55,8 @@
 	-->
 	<property name="for-ie" value="${is_for_ie},${is_not_for_ie}"/>
 
+	<property name="xslt-dep-sources" value="StatePatternStatechartGenerator.xsl,StateTableStatechartGenerator.xsl,SwitchyardStatechartGenerator.xsl"/>
+
 	<!-- selenium configuration options -->
 	<property name="selenium_host" value="localhost"/>
 	<property name="selenium_port" value="4444"/>
@@ -553,13 +561,83 @@
 			<fileset dir="src/xslt/" includes="**/*.xsl"/>
 
 			<mapper>
-				<chainedmapper>
-					<globmapper from="*.xsl" to="*_combined.xsl"/>
-				</chainedmapper>
+				<globmapper from="*.xsl" to="*.xsl"/>
 			</mapper>
 		</xslt>
 	</target>
 
+	<target name="build-dependency-lists" depends="setup-antcontrib">
+
+		<for list="${xslt-dep-sources}" param="xslt-dep-source">
+			<sequential>
+				<xslt 
+					classpathref="maven.plugin.classpath" 
+					style="${src}/xslt/util/topo-sort.xsl" 			
+					destdir="${build-xsl-dep-list}"
+					scanincludeddirectories="false"
+					useImplicitFileset="false"
+					force="true">
+
+					<fileset file="${src}/xslt/backends/js/@{xslt-dep-source}"/>
+
+					<param name="source-path" expression="backends/js/@{xslt-dep-source}"/>	
+
+					<mapper>
+						<chainedmapper>
+							<flattenmapper/>
+							<globmapper from="*.xsl" to="*.xml"/>
+						</chainedmapper>
+					</mapper>
+				</xslt>
+			</sequential>
+		</for>
+	</target>
+
+	<target name="build-language-frontend-modules"  depends="build-dependency-lists">
+
+		<path id="build-xsl-dep-list-path">
+			<fileset dir="${build-xsl-dep-list}" includes="*.xml"/>
+		</path>
+
+		<for param="built-dep-list">
+
+			<path refid="build-xsl-dep-list-path"/>
+
+			<sequential>
+
+				<for list="${language-frontends}" param="language-frontend">
+					<sequential>
+
+						<path id="@{built-dep-list}-path" location="@{built-dep-list}"/>
+
+						<pathconvert property="@{built-dep-list}-@{language-frontend}-path" refid="@{built-dep-list}-path">
+							<mapper>
+								<chainedmapper>
+									<flattenmapper/>
+									<!-- fixme: make the extensions the same as the directory... -->
+									<globmapper from="*.xml" to="*.@{language-frontend}"/>
+								</chainedmapper>
+							</mapper>
+						</pathconvert>
+
+						<xslt 
+							in="@{built-dep-list}"
+							out="${build-language-frontend-modules}/@{language-frontend}/${@{built-dep-list}-@{language-frontend}-path}"
+							classpathref="maven.plugin.classpath" 
+							style="${src}/xslt/util/language-frontend-module-generators/@{language-frontend}${xslt-language-frontend-generator-basename}"
+							destdir="${build-language-frontend-modules}/@{language-frontend}"
+							scanincludeddirectories="false"
+							useImplicitFileset="false"
+							force="true">
+
+							<param name="module-path" expression="target/language-frontend-modules/@{language-frontend}/${@{built-dep-list}-@{language-frontend}-path}"/>
+						</xslt>
+					</sequential>
+				</for>
+			</sequential>
+		</for>
+	</target>
+
 	<target name="setup-antcontrib">
 		<taskdef resource="net/sf/antcontrib/antlib.xml" classpathref="maven.plugin.classpath"/>
 	</target>

Added: commons/sandbox/gsoc/2010/scxml-js/trunk/lib/java/maven-ant-tasks-2.1.1.jar
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/lib/java/maven-ant-tasks-2.1.1.jar?rev=1037482&view=auto
==============================================================================
Files commons/sandbox/gsoc/2010/scxml-js/trunk/lib/java/maven-ant-tasks-2.1.1.jar (added) and commons/sandbox/gsoc/2010/scxml-js/trunk/lib/java/maven-ant-tasks-2.1.1.jar Sun Nov 21 15:44:25 2010 differ

Copied: commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/language-frontend-module-generators/bash-xsltproc-from-topo-sort-list-generator.xsl (from r1037481, commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/generate-bash-xsltproc-from-topo-sort-list.xsl)
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/language-frontend-module-generators/bash-xsltproc-from-topo-sort-list-generator.xsl?p2=commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/language-frontend-module-generators/bash-xsltproc-from-topo-sort-list-generator.xsl&p1=commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/generate-bash-xsltproc-from-topo-sort-list.xsl&r1=1037481&r2=1037482&rev=1037482&view=diff
==============================================================================
    (empty)

Propchange: commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/language-frontend-module-generators/bash-xsltproc-from-topo-sort-list-generator.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/language-frontend-module-generators/js-from-topo-sort-list-generator.xsl (from r1037481, commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/generate-require-js-from-topo-sort-list.xsl)
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/language-frontend-module-generators/js-from-topo-sort-list-generator.xsl?p2=commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/language-frontend-module-generators/js-from-topo-sort-list-generator.xsl&p1=commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/generate-require-js-from-topo-sort-list.xsl&r1=1037481&r2=1037482&rev=1037482&view=diff
==============================================================================
    (empty)

Propchange: commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/language-frontend-module-generators/js-from-topo-sort-list-generator.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/language-frontend-module-generators/python-from-topo-sort-list-generator.xsl (from r1037481, commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/generate-python-from-topo-sort-list.xsl)
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/language-frontend-module-generators/python-from-topo-sort-list-generator.xsl?p2=commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/language-frontend-module-generators/python-from-topo-sort-list-generator.xsl&p1=commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/generate-python-from-topo-sort-list.xsl&r1=1037481&r2=1037482&rev=1037482&view=diff
==============================================================================
    (empty)

Propchange: commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/language-frontend-module-generators/python-from-topo-sort-list-generator.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/topo-sort.xsl
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/topo-sort.xsl?rev=1037482&r1=1037481&r2=1037482&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/topo-sort.xsl (original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/topo-sort.xsl Sun Nov 21 15:44:25 2010
@@ -26,7 +26,7 @@ in topologically-sorted order. 
 	xmlns:c="http://commons.apache.org/scxml-js"
 	xmlns:exsl="http://exslt.org/common"
 	version="1.0">
-	<xsl:output method="xml"/>
+	<xsl:output method="xml" indent="yes"/>
 
 	<!-- this should be overridden by the user -->
 	<xsl:param name="source-path" select="'root'"/>