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/09/08 04:10:10 UTC
svn commit: r993580 - in /commons/sandbox/gsoc/2010/scxml-js/trunk:
build-common.xml build.xml mvn-ant-build.xml pom.xml
Author: jbeard
Date: Wed Sep 8 02:10:09 2010
New Revision: 993580
URL: http://svn.apache.org/viewvc?rev=993580&view=rev
Log:
run-unit-tests-with-rhino ant task now works, in addition to the maven build.
Modified:
commons/sandbox/gsoc/2010/scxml-js/trunk/build-common.xml
commons/sandbox/gsoc/2010/scxml-js/trunk/build.xml
commons/sandbox/gsoc/2010/scxml-js/trunk/mvn-ant-build.xml
commons/sandbox/gsoc/2010/scxml-js/trunk/pom.xml
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=993580&r1=993579&r2=993580&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/build-common.xml (original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/build-common.xml Wed Sep 8 02:10:09 2010
@@ -20,14 +20,11 @@
<!-- compile_classpath and plugin_classpath properties get provided by maven or ant,
depending on whether maven is used as the entry point, or ant is -->
<!-- TODO: refactor path id maven.compile.classpath to maven.runtime.classpath -->
+ <!-- TODO: get rid of this -->
+ <!--
<path location="${compile_classpath}" id="maven.compile.classpath"/>
<path location="${plugin_classpath}" id="maven.plugin.classpath"/>
-
- <taskdef resource="net/sf/antcontrib/antcontrib.properties">
- <classpath>
- <path refid="maven.plugin.classpath" />
- </classpath>
- </taskdef>
+ -->
<!-- location properties -->
<property name="src" value="src"/>
@@ -37,6 +34,7 @@
<property name="lib-js" location="${lib}/js"/>
<property name="lib-test-java" location="${lib}/test-java"/>
<property name="lib-test-js" location="${lib}/test-js"/>
+ <property name="lib-build-java" location="${lib}/build-java"/>
<property name="build" value="target"/>
<property name="build-js" location="${build}/build-js"/>
@@ -121,8 +119,7 @@
<available property="rhino-available" filepath="rhino-classpath"/>
-->
-
- <target name="download-dependencies">
+ <target name="download-dependencies" depends="setup-antcontrib">
<mkdir dir="${tmp-dir}"/>
<if>
@@ -559,7 +556,11 @@
</xslt>
</target>
- <target name="setup-properties">
+ <target name="setup-antcontrib">
+ <taskdef resource="net/sf/antcontrib/antlib.xml" classpathref="maven.plugin.classpath"/>
+ </target>
+
+ <target name="setup-properties" depends="setup-antcontrib">
<for param="test-path">
<path refid="scxml_tests_xml"/>
Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/build.xml
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/build.xml?rev=993580&r1=993579&r2=993580&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/build.xml (original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/build.xml Wed Sep 8 02:10:09 2010
@@ -45,11 +45,6 @@
<artifact:dependency groupId="xalan" artifactId="xalan" version="2.7.0"/>
</artifact:dependencies>
- <!-- this is how we get data in. kind of weird -->
- <property name="compile_classpath" refid="maven.compile.classpath"/>
- <property name="plugin_classpath" refid="maven.plugin.classpath"/>
-
- <import file="mvn-ant-build.xml"/>
<!--
<target name="test">
@@ -256,6 +251,7 @@
]]></rhinoscript>
</target>
+ <!-- TODO: add OS check so we don't do selenium tests on non-Windows OS -->
<target name="run-all-unit-tests"
depends="run-unit-tests-with-selenium,run-in-browser-unit-tests-with-selenium,run-unit-tests-with-rhino" />
@@ -278,5 +274,37 @@
</jar>
</target>
+ <!-- these targets are here to do a simple test of the compiled jar and class-->
+ <!-- TODO: change these to use runtime classpaths -->
+ <target name="run-single-class" depends="compile-single-class">
+ <java classname="${build-class-main-name}" output="${build}/out.js">
+ <classpath>
+ <path refid="rhino-classpath"/>
+ <path refid="maven.compile.classpath"/>
+ <pathelement location="${build-class}"/>
+ </classpath>
+ <arg value="--backend"/>
+ <arg value="state"/>
+ <arg value="--beautify"/>
+ <arg value="test/parallel/TestParallel.xml"/>
+ </java>
+ </target>
+
+ <target name="run-single-jar" depends="jar-single-class">
+ <java classname="${build-class-main-name}" output="${build}/out.js">
+ <classpath>
+ <path refid="rhino-classpath"/>
+ <path refid="maven.compile.classpath"/>
+ <pathelement location="${build-jar-main}"/>
+ </classpath>
+ <arg value="--backend"/>
+ <arg value="state"/>
+ <arg value="--beautify"/>
+ <arg value="test/parallel/TestParallel.xml"/>
+ </java>
+ </target>
+
+ <import file="mvn-ant-build.xml"/>
+
</project>
Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/mvn-ant-build.xml
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/mvn-ant-build.xml?rev=993580&r1=993579&r2=993580&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/mvn-ant-build.xml (original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/mvn-ant-build.xml Wed Sep 8 02:10:09 2010
@@ -17,8 +17,6 @@
-->
<project name="scxml-js-mvn" basedir=".">
- <import file="build-common.xml"/>
-
<!-- build standalone executable -->
<property name="build-js-main" location="${build-js}/main-built.js"/>
@@ -72,5 +70,7 @@
</target>
+ <import file="build-common.xml"/>
+
</project>
Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/pom.xml
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/pom.xml?rev=993580&r1=993579&r2=993580&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/pom.xml (original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/pom.xml Wed Sep 8 02:10:09 2010
@@ -176,11 +176,6 @@
<phase>initialize</phase>
<configuration>
<tasks>
- <property name="compile_classpath" refid="maven.compile.classpath"/>
- <property name="runtime_classpath" refid="maven.runtime.classpath"/>
- <property name="test_classpath" refid="maven.test.classpath"/>
- <property name="plugin_classpath" refid="maven.plugin.classpath"/>
-
<ant target="download-dependencies" inheritRefs="true" antfile="mvn-ant-build.xml"/>
</tasks>
</configuration>
@@ -193,11 +188,6 @@
<phase>process-sources</phase>
<configuration>
<tasks>
- <property name="compile_classpath" refid="maven.compile.classpath"/>
- <property name="runtime_classpath" refid="maven.runtime.classpath"/>
- <property name="test_classpath" refid="maven.test.classpath"/>
- <property name="plugin_classpath" refid="maven.plugin.classpath"/>
-
<ant target="compile-single-js-mvn" inheritRefs="true" antfile="mvn-ant-build.xml"/>
</tasks>
</configuration>
@@ -210,11 +200,6 @@
<phase>compile</phase>
<configuration>
<tasks>
- <property name="compile_classpath" refid="maven.compile.classpath"/>
- <property name="runtime_classpath" refid="maven.runtime.classpath"/>
- <property name="test_classpath" refid="maven.test.classpath"/>
- <property name="plugin_classpath" refid="maven.plugin.classpath"/>
-
<ant target="compile-single-class-mvn" inheritRefs="true" antfile="mvn-ant-build.xml"/>
</tasks>
</configuration>