You are viewing a plain text version of this content. The canonical link for it is here.
Posted to easyant-commits@incubator.apache.org by jl...@apache.org on 2012/08/18 08:37:57 UTC

svn commit: r1374523 - in /incubator/easyant/buildtypes/trunk/build-std-scala: ./ src/main/resources/ src/test/ src/test/antunit/ src/test/antunit/src/ src/test/antunit/src/main/ src/test/antunit/src/main/resources/ src/test/antunit/src/main/scala/ src...

Author: jlboudart
Date: Sat Aug 18 08:37:56 2012
New Revision: 1374523

URL: http://svn.apache.org/viewvc?rev=1374523&view=rev
Log:
Update build-std-scala to use high level targets, and add according tests

Added:
    incubator/easyant/buildtypes/trunk/build-std-scala/src/test/
    incubator/easyant/buildtypes/trunk/build-std-scala/src/test/antunit/
    incubator/easyant/buildtypes/trunk/build-std-scala/src/test/antunit/build-std-scala-test.xml
    incubator/easyant/buildtypes/trunk/build-std-scala/src/test/antunit/module.ivy
    incubator/easyant/buildtypes/trunk/build-std-scala/src/test/antunit/src/
    incubator/easyant/buildtypes/trunk/build-std-scala/src/test/antunit/src/main/
    incubator/easyant/buildtypes/trunk/build-std-scala/src/test/antunit/src/main/resources/
    incubator/easyant/buildtypes/trunk/build-std-scala/src/test/antunit/src/main/resources/main.properties
    incubator/easyant/buildtypes/trunk/build-std-scala/src/test/antunit/src/main/scala/
    incubator/easyant/buildtypes/trunk/build-std-scala/src/test/antunit/src/main/scala/org/
    incubator/easyant/buildtypes/trunk/build-std-scala/src/test/antunit/src/main/scala/org/apache/
    incubator/easyant/buildtypes/trunk/build-std-scala/src/test/antunit/src/main/scala/org/apache/easyant/
    incubator/easyant/buildtypes/trunk/build-std-scala/src/test/antunit/src/main/scala/org/apache/easyant/example/
    incubator/easyant/buildtypes/trunk/build-std-scala/src/test/antunit/src/main/scala/org/apache/easyant/example/Example.scala
    incubator/easyant/buildtypes/trunk/build-std-scala/src/test/antunit/src/test/
    incubator/easyant/buildtypes/trunk/build-std-scala/src/test/antunit/src/test/resources/
    incubator/easyant/buildtypes/trunk/build-std-scala/src/test/antunit/src/test/resources/test.properties
    incubator/easyant/buildtypes/trunk/build-std-scala/src/test/antunit/src/test/scala/
    incubator/easyant/buildtypes/trunk/build-std-scala/src/test/antunit/src/test/scala/org/
    incubator/easyant/buildtypes/trunk/build-std-scala/src/test/antunit/src/test/scala/org/apache/
    incubator/easyant/buildtypes/trunk/build-std-scala/src/test/antunit/src/test/scala/org/apache/easyant/
    incubator/easyant/buildtypes/trunk/build-std-scala/src/test/antunit/src/test/scala/org/apache/easyant/example/
    incubator/easyant/buildtypes/trunk/build-std-scala/src/test/antunit/src/test/scala/org/apache/easyant/example/ExampleTest.scala
Modified:
    incubator/easyant/buildtypes/trunk/build-std-scala/module.ivy
    incubator/easyant/buildtypes/trunk/build-std-scala/src/main/resources/build-std-scala.ant

Modified: incubator/easyant/buildtypes/trunk/build-std-scala/module.ivy
URL: http://svn.apache.org/viewvc/incubator/easyant/buildtypes/trunk/build-std-scala/module.ivy?rev=1374523&r1=1374522&r2=1374523&view=diff
==============================================================================
--- incubator/easyant/buildtypes/trunk/build-std-scala/module.ivy (original)
+++ incubator/easyant/buildtypes/trunk/build-std-scala/module.ivy Sat Aug 18 08:37:56 2012
@@ -15,7 +15,7 @@
    limitations under the License.
 -->
 <ivy-module version="2.0" xmlns:ea="http://www.easyant.org"> 
-    <info organisation="org.apache.easyant.buildtypes" module="build-std-scala" revision="0.2">
+    <info organisation="org.apache.easyant.buildtypes" module="build-std-scala" revision="0.9">
            <ea:build organisation="org.apache.easyant.buildtypes" module="build-std-ant-plugin" revision="0.1"/>
         </info>
         <configurations>

Modified: incubator/easyant/buildtypes/trunk/build-std-scala/src/main/resources/build-std-scala.ant
URL: http://svn.apache.org/viewvc/incubator/easyant/buildtypes/trunk/build-std-scala/src/main/resources/build-std-scala.ant?rev=1374523&r1=1374522&r2=1374523&view=diff
==============================================================================
--- incubator/easyant/buildtypes/trunk/build-std-scala/src/main/resources/build-std-scala.ant (original)
+++ incubator/easyant/buildtypes/trunk/build-std-scala/src/main/resources/build-std-scala.ant Sat Aug 18 08:37:56 2012
@@ -23,28 +23,36 @@
 
     <property file="${org.apache.easyant.buildtypes#build-std-scala.properties.file}" />
 
-    <ea:import mrid="org.apache.easyant.plugins#clean-std;0.2" />
-    <ea:import mrid="org.apache.easyant.plugins#ivy-provisioning;0.2" />
-    <ea:import mrid="org.apache.easyant.plugins#default-version-strategy;0.2" />
-    <ea:import mrid="org.apache.easyant.plugins#ivy-publication;0.2" />
-    <ea:import mrid="org.apache.easyant.plugins#ivy-utils;0.2" />
-    <ea:import mrid="org.apache.easyant.plugins#resources-std;0.2" />
-    <ea:import mrid="org.apache.easyant.plugins#compile-scala;0.2" />
-    <ea:import mrid="org.apache.easyant.plugins#compile-test-scala;0.2" />
-    <ea:import mrid="org.apache.easyant.plugins#test-junit;0.3" />
-    <ea:import mrid="org.apache.easyant.plugins#manifest;0.2" />
-    <ea:import mrid="org.apache.easyant.plugins#package-jar;0.2" />
+    <ea:import mrid="org.apache.easyant.plugins#phases-std;0.9" />
+    <ea:import mrid="org.apache.easyant.plugins#clean-std;0.9" />
+    <ea:import mrid="org.apache.easyant.plugins#ivy-provisioning;0.9" />
+    <ea:import mrid="org.apache.easyant.plugins#default-version-strategy;0.9" />
+    <ea:import mrid="org.apache.easyant.plugins#ivy-publication;0.9" />
+    <ea:import mrid="org.apache.easyant.plugins#ivy-utils;0.9" />
+    <ea:import mrid="org.apache.easyant.plugins#resources-std;0.9" />
+    <ea:import mrid="org.apache.easyant.plugins#compile-scala;0.9" />
+    <ea:import mrid="org.apache.easyant.plugins#compile-test-scala;0.9" />
+    <ea:import mrid="org.apache.easyant.plugins#test-junit;0.9" />
+    <ea:import mrid="org.apache.easyant.plugins#manifest;0.9" />
+    <ea:import mrid="org.apache.easyant.plugins#package-jar;0.9" />
 
     <!-- plugin binding -->
-    <bindtargets targets="compile-scala:compile,manifest:manifest,manifest:manifest-runnable,resources-std:copy-resources" extensionPoint="package-jar:jar-ready" />
-    <bindtargets targets="compile-test-scala:compile,resources-std:copy-test-resources" extensionPoint="abstract-test:test-ready" />
-    <bindtargets targets="package-jar:jar,source-jar:main" extensionPoint="ivy-publication:publish-ready" />
-
-    <!-- friendly target names -->
-    <target name="clean" depends="clean-std:clean" description="Clean the project" />
-    <target name="compile" depends="compile-scala:compile" description="Compile the project" />
-    <target name="test" depends="test-junit:run" description="Launch the unit tests" />
+    <bindtargets targets="manifest:manifest-runnable,resources-std:copy-resources" extensionPoint="abstract-package:package-ready" />
+    <bindtargets targets="abstract-compile:compile-finished,resources-std:copy-resources,resources-std:copy-test-resources" extensionPoint="abstract-test:test-ready" />
+    <bindtargets targets="package-jar:jar" extensionPoint="ivy-publication:publish-ready" />
+
+    <!-- bind high level targets -->
+    <bindtargets targets="clean-std:clean" extensionPoint="clean"/>
+    <bindtargets targets="abstract-compile:compile-finished" extensionPoint="compile"/>
+    <bindtargets targets="abstract-test:test-run" extensionPoint="test"/>
+    <bindtargets targets="abstract-test:integration-test-run" extensionPoint="integration-test"/>
+    <bindtargets targets="abstract-package:package-finished" extensionPoint="package"/>
+    <bindtargets targets="ivy-publication:publish-local" extensionPoint="publish-local"/>
+    <bindtargets targets="ivy-publication:publish-shared" extensionPoint="publish-shared"/>
+    <bindtargets targets="ivy-publication:release" extensionPoint="release"/>
+
+    <!-- additionnal friendtly target names -->
     <target name="dist" depends="ivy-publication:publish-ready" description="Produce every artifact to be distributed" />
-    <target name="install" depends="ivy-publication:publish-local" description="Install the artifacts into the repository" />
+    <target name="install" depends="ivy-publication:publish-local" description="Install the artifacts into local repository" />
 
 </project>

Added: incubator/easyant/buildtypes/trunk/build-std-scala/src/test/antunit/build-std-scala-test.xml
URL: http://svn.apache.org/viewvc/incubator/easyant/buildtypes/trunk/build-std-scala/src/test/antunit/build-std-scala-test.xml?rev=1374523&view=auto
==============================================================================
--- incubator/easyant/buildtypes/trunk/build-std-scala/src/test/antunit/build-std-scala-test.xml (added)
+++ incubator/easyant/buildtypes/trunk/build-std-scala/src/test/antunit/build-std-scala-test.xml Sat Aug 18 08:37:56 2012
@@ -0,0 +1,62 @@
+<!--
+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="org.apache.easyant.plugins;build-std-scala-test" 
+xmlns:au="antlib:org.apache.ant.antunit" 
+xmlns:ivy="antlib:org.apache.ivy.ant"
+xmlns:ea="antlib:org.apache.easyant">
+
+<!-- Import your plugin --> 
+<property name="target" value="target/test-antunit"/>
+<!-- configure easyant in current project -->
+<ea:configure-easyant-ivy-instance />
+<!-- import our local plugin -->
+<property name="easyant.file" value="${basedir}/module.ivy"/>
+<ea:import-test-module moduleIvy="../../../module.ivy" sourceDirectory="../../main/resources"/>
+
+<!-- Defines a setUp / tearDown (before each test) that cleans the environnement --> 
+<target name="clean-test" description="remove stale build artifacts before / after each test">
+<delete dir="${basedir}" includeemptydirs="true">
+    <include name="**/target/**"/>
+    <include name="**/lib/**"/>
+</delete>
+</target>
+
+<target name="setUp" depends="clean-test">
+<ivy:settings id="project.ivy.instance"/>
+</target>
+<target name="tearDown" depends="clean-test"/>
+
+<target name="test-build-std-scala:clean" depends="clean">
+ <au:assertLogContains text="Cleaning ${target}..."/>
+ <au:assertLogContains text="Build sequence for target(s) `setUp', `test-build-std-scala:clean' is [clean-test, setUp, clean-std:clean, clean, test-build-std-scala:clean]" level="debug"/>
+</target>
+
+<target name="test-build-std-scala:compile" depends="compile">
+ <au:assertLogContains text="Build sequence for target(s) `setUp', `test-build-std-scala:compile' is [clean-test, setUp, -ivy-provisioning:init, abstract-provisioning:provisioning-ready, -ivy-provisioning:resolve, -ivy-provisioning:resolve-main-confs, -ivy-provisioning:resolve-test-confs, -ivy-provisioning:resolve-provided-confs, ivy-provisioning:resolve, abstract-provisioning:provisioning-finished, abstract-compile:compile-ready, compile-scala:init, compile-scala:configure, compile-scala:compile, compile-test-scala:configure, compile-test-scala:compile, compile-test-scala:compile-integration, abstract-compile:compile-finished, compile, test-build-std-scala:compile]" level="debug"/>
+</target>
+
+<target name="test-build-std-scala:test" depends="test">
+ <au:assertLogContains text="Running org.apache.easyant.example.ExampleTest"/>
+ <au:assertLogContains text="Tests run: 2, Failures: 0, Errors: 0"/>
+ <au:assertLogContains text="Build sequence for target(s) `setUp', `test-build-std-scala:test' is [clean-test, setUp, -ivy-provisioning:init, abstract-provisioning:provisioning-ready, -ivy-provisioning:resolve, -ivy-provisioning:resolve-main-confs, -ivy-provisioning:resolve-test-confs, -ivy-provisioning:resolve-provided-confs, ivy-provisioning:resolve, abstract-provisioning:provisioning-finished, abstract-compile:compile-ready, compile-scala:init, compile-scala:configure, compile-scala:compile, compile-test-scala:configure, compile-test-scala:compile, compile-test-scala:compile-integration, abstract-compile:compile-finished, compile, resources-std:init, -resources-std:check-resources, resources-std:copy-resources, resources-std:copy-test-resources, abstract-test:test-ready, abstract-test:init, test-junit:init, abstract-test:compute-test-sets, -test-junit:test, test-junit:run, abstract-test:test-run, test, test-build-std-scala:test]" level="debug"/>
+</target>
+
+<target name="test-build-std-scala:package" depends="package">
+<au:assertLogContains text="Build sequence for target(s) `setUp', `test-build-std-scala:package' is [clean-test, setUp, -ivy-provisioning:init, abstract-provisioning:provisioning-ready, -ivy-provisioning:resolve, -ivy-provisioning:resolve-main-confs, -ivy-provisioning:resolve-test-confs, -ivy-provisioning:resolve-provided-confs, ivy-provisioning:resolve, abstract-provisioning:provisioning-finished, abstract-compile:compile-ready, compile-scala:init, compile-scala:configure, compile-scala:compile, compile-test-scala:configure, compile-test-scala:compile, compile-test-scala:compile-integration, abstract-compile:compile-finished, compile, manifest:init, -manifest:generate-version-number, manifest:manifest, manifest:manifest-runnable, resources-std:init, -resources-std:check-resources, resources-std:copy-resources, abstract-package:package-ready, abstract-package:init, abstract-package:compute-metainf, package-jar:init, package-jar:jar, abstract-package:register-main-artifact, a
 bstract-package:package-finished, package, test-build-std-scala:package]" level="debug"/>
+   </target>
+
+</project>

Added: incubator/easyant/buildtypes/trunk/build-std-scala/src/test/antunit/module.ivy
URL: http://svn.apache.org/viewvc/incubator/easyant/buildtypes/trunk/build-std-scala/src/test/antunit/module.ivy?rev=1374523&view=auto
==============================================================================
--- incubator/easyant/buildtypes/trunk/build-std-scala/src/test/antunit/module.ivy (added)
+++ incubator/easyant/buildtypes/trunk/build-std-scala/src/test/antunit/module.ivy Sat Aug 18 08:37:56 2012
@@ -0,0 +1,29 @@
+<!--
+   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.
+-->
+<ivy-module version="2.0" xmlns:ea="http://www.easyant.org"> 
+    <info organisation="org.apache.easyant" module="standard-java-app" revision="0.1" status="integration" >
+    </info>
+    <configurations>
+        <conf name="default" visibility="public" description="runtime dependencies and master artifact can be used with this conf"/>
+        <conf name="test" visibility="private" description="this scope indicates that the dependency is not required for normal use of the application, and is only available for the test compilation and execution phases."/>
+    </configurations>
+    <dependencies>
+        <dependency org="hsqldb" name="hsqldb" rev="1.8.0.7" conf="default->default"/>
+        <dependency org="junit" name="junit" rev="4.4" conf="test->default" />
+
+    </dependencies>
+</ivy-module>

Added: incubator/easyant/buildtypes/trunk/build-std-scala/src/test/antunit/src/main/resources/main.properties
URL: http://svn.apache.org/viewvc/incubator/easyant/buildtypes/trunk/build-std-scala/src/test/antunit/src/main/resources/main.properties?rev=1374523&view=auto
==============================================================================
--- incubator/easyant/buildtypes/trunk/build-std-scala/src/test/antunit/src/main/resources/main.properties (added)
+++ incubator/easyant/buildtypes/trunk/build-std-scala/src/test/antunit/src/main/resources/main.properties Sat Aug 18 08:37:56 2012
@@ -0,0 +1,15 @@
+# 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.
+example=Hello

Added: incubator/easyant/buildtypes/trunk/build-std-scala/src/test/antunit/src/main/scala/org/apache/easyant/example/Example.scala
URL: http://svn.apache.org/viewvc/incubator/easyant/buildtypes/trunk/build-std-scala/src/test/antunit/src/main/scala/org/apache/easyant/example/Example.scala?rev=1374523&view=auto
==============================================================================
--- incubator/easyant/buildtypes/trunk/build-std-scala/src/test/antunit/src/main/scala/org/apache/easyant/example/Example.scala (added)
+++ incubator/easyant/buildtypes/trunk/build-std-scala/src/test/antunit/src/main/scala/org/apache/easyant/example/Example.scala Sat Aug 18 08:37:56 2012
@@ -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.
+ *
+ */
+package org.apache.easyant.example;
+
+object Example {
+    def main(args: Array[String]) {
+        println("Hello, world!");
+    }
+
+}

Added: incubator/easyant/buildtypes/trunk/build-std-scala/src/test/antunit/src/test/resources/test.properties
URL: http://svn.apache.org/viewvc/incubator/easyant/buildtypes/trunk/build-std-scala/src/test/antunit/src/test/resources/test.properties?rev=1374523&view=auto
==============================================================================
--- incubator/easyant/buildtypes/trunk/build-std-scala/src/test/antunit/src/test/resources/test.properties (added)
+++ incubator/easyant/buildtypes/trunk/build-std-scala/src/test/antunit/src/test/resources/test.properties Sat Aug 18 08:37:56 2012
@@ -0,0 +1,15 @@
+# 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.
+test.example=Hello Test

Added: incubator/easyant/buildtypes/trunk/build-std-scala/src/test/antunit/src/test/scala/org/apache/easyant/example/ExampleTest.scala
URL: http://svn.apache.org/viewvc/incubator/easyant/buildtypes/trunk/build-std-scala/src/test/antunit/src/test/scala/org/apache/easyant/example/ExampleTest.scala?rev=1374523&view=auto
==============================================================================
--- incubator/easyant/buildtypes/trunk/build-std-scala/src/test/antunit/src/test/scala/org/apache/easyant/example/ExampleTest.scala (added)
+++ incubator/easyant/buildtypes/trunk/build-std-scala/src/test/antunit/src/test/scala/org/apache/easyant/example/ExampleTest.scala Sat Aug 18 08:37:56 2012
@@ -0,0 +1,28 @@
+/*
+ *  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 org.apache.easyant.example;
+
+import junit.framework._
+import org.junit.Assert._
+
+class ExampleTest extends TestCase {
+    def testOne() = {
+       assertEquals(1,1) 
+    }
+
+}