Author: bodewig Date: Fri Apr 15 07:32:50 2005 New Revision: 161469 URL: http://svn.apache.org/viewcvs?view=rev&rev=161469 Log: Import sandbox antlibs
Added: ant/sandbox/antlibs/antunit/ ant/sandbox/antlibs/antunit/branches/ ant/sandbox/antlibs/antunit/tags/ ant/sandbox/antlibs/antunit/trunk/ ant/sandbox/antlibs/antunit/trunk/build.xml (with props) ant/sandbox/antlibs/antunit/trunk/src/ ant/sandbox/antlibs/antunit/trunk/src/etc/ ant/sandbox/antlibs/antunit/trunk/src/etc/testcases/ ant/sandbox/antlibs/antunit/trunk/src/etc/testcases/assert.xml (with props) ant/sandbox/antlibs/antunit/trunk/src/main/ ant/sandbox/antlibs/antunit/trunk/src/main/org/ ant/sandbox/antlibs/antunit/trunk/src/main/org/apache/ ant/sandbox/antlibs/antunit/trunk/src/main/org/apache/ant/ ant/sandbox/antlibs/antunit/trunk/src/main/org/apache/ant/antlib/ ant/sandbox/antlibs/antunit/trunk/src/main/org/apache/ant/antlib/antunit/ ant/sandbox/antlibs/antunit/trunk/src/main/org/apache/ant/antlib/antunit/AssertTask.java (with props) ant/sandbox/antlibs/antunit/trunk/src/main/org/apache/ant/antlib/antunit/AssertionFailedException.java (with props) ant/sandbox/antlibs/antunit/trunk/src/main/org/apache/ant/antlib/antunit/antlib.xml (with props) ant/sandbox/antlibs/antunit/trunk/src/testcases/ ant/sandbox/antlibs/antunit/trunk/src/testcases/org/ ant/sandbox/antlibs/antunit/trunk/src/testcases/org/apache/ ant/sandbox/antlibs/antunit/trunk/src/testcases/org/apache/ant/ ant/sandbox/antlibs/antunit/trunk/src/testcases/org/apache/ant/antlib/ ant/sandbox/antlibs/antunit/trunk/src/testcases/org/apache/ant/antlib/antunit/ ant/sandbox/antlibs/antunit/trunk/src/testcases/org/apache/ant/antlib/antunit/AssertTest.java (with props) ant/sandbox/antlibs/dotnet/ ant/sandbox/antlibs/dotnet/branches/ ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/ ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/README (with props) ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/build.xml (with props) ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/docs/ ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/docs/dotnetexec.html (with props) ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/docs/index.html (with props) ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/docs/msbuild.html (with props) ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/docs/nant.html (with props) ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/docs/nunit.html (with props) ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/docs/wix.html (with props) ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/ ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/etc/ ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/etc/testcases/ ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/etc/testcases/dotnetexec.xml (with props) ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/etc/testcases/msbuild.xml (with props) ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/etc/testcases/nant.xml (with props) ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/etc/testcases/nunit.xml (with props) ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/etc/testcases/src/ ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/etc/testcases/src/example.cs (with props) ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/etc/testcases/src/example2.cs (with props) ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/etc/testcases/src/fail.cs (with props) ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/etc/testcases/src/msbuild.proj ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/etc/testcases/src/nant.build ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/etc/testcases/src/pass.cs (with props) ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/main/ ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/main/org/ ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/main/org/apache/ ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/main/org/apache/tools/ ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/main/org/apache/tools/ant/ ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/main/org/apache/tools/ant/taskdefs/ ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/main/org/apache/tools/ant/taskdefs/optional/ ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/ ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/AbstractBuildTask.java (with props) ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotNetExecTask.java (with props) ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/MSBuildTask.java (with props) ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/NAntTask.java (with props) ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/NUnitTask.java (with props) ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/WixTask.java (with props) ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/antlib.xml (with props) ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/main/org/apache/tools/ant/util/ ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/main/org/apache/tools/ant/util/XMLFragment.java (with props) ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/testcases/ ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/testcases/org/ ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/testcases/org/apache/ ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/testcases/org/apache/tools/ ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/testcases/org/apache/tools/ant/ ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/testcases/org/apache/tools/ant/taskdefs/ ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/testcases/org/apache/tools/ant/taskdefs/optional/ ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/testcases/org/apache/tools/ant/taskdefs/optional/dotnet/ ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/testcases/org/apache/tools/ant/taskdefs/optional/dotnet/DotNetExecTaskTest.java (with props) ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/testcases/org/apache/tools/ant/taskdefs/optional/dotnet/MSBuildTaskTest.java (with props) ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/testcases/org/apache/tools/ant/taskdefs/optional/dotnet/NAntTaskTest.java (with props) ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/testcases/org/apache/tools/ant/taskdefs/optional/dotnet/NUnitTaskTest.java (with props) ant/sandbox/antlibs/dotnet/tags/ ant/sandbox/antlibs/dotnet/trunk/ ant/sandbox/antlibs/dotnet/trunk/README (with props) ant/sandbox/antlibs/dotnet/trunk/build.xml (with props) ant/sandbox/antlibs/dotnet/trunk/docs/ ant/sandbox/antlibs/dotnet/trunk/docs/dotnetexec.html (with props) ant/sandbox/antlibs/dotnet/trunk/docs/index.html (with props) ant/sandbox/antlibs/dotnet/trunk/docs/msbuild.html (with props) ant/sandbox/antlibs/dotnet/trunk/docs/nant.html (with props) ant/sandbox/antlibs/dotnet/trunk/docs/nunit.html (with props) ant/sandbox/antlibs/dotnet/trunk/docs/wix.html (with props) ant/sandbox/antlibs/dotnet/trunk/src/ ant/sandbox/antlibs/dotnet/trunk/src/etc/ ant/sandbox/antlibs/dotnet/trunk/src/etc/testcases/ ant/sandbox/antlibs/dotnet/trunk/src/etc/testcases/dotnetexec.xml (with props) ant/sandbox/antlibs/dotnet/trunk/src/etc/testcases/msbuild.xml (with props) ant/sandbox/antlibs/dotnet/trunk/src/etc/testcases/nant.xml (with props) ant/sandbox/antlibs/dotnet/trunk/src/etc/testcases/nunit.xml (with props) ant/sandbox/antlibs/dotnet/trunk/src/etc/testcases/src/ ant/sandbox/antlibs/dotnet/trunk/src/etc/testcases/src/example.cs (with props) ant/sandbox/antlibs/dotnet/trunk/src/etc/testcases/src/example2.cs (with props) ant/sandbox/antlibs/dotnet/trunk/src/etc/testcases/src/fail.cs (with props) ant/sandbox/antlibs/dotnet/trunk/src/etc/testcases/src/msbuild.proj ant/sandbox/antlibs/dotnet/trunk/src/etc/testcases/src/nant.build ant/sandbox/antlibs/dotnet/trunk/src/etc/testcases/src/pass.cs (with props) ant/sandbox/antlibs/dotnet/trunk/src/main/ ant/sandbox/antlibs/dotnet/trunk/src/main/org/ ant/sandbox/antlibs/dotnet/trunk/src/main/org/apache/ ant/sandbox/antlibs/dotnet/trunk/src/main/org/apache/tools/ ant/sandbox/antlibs/dotnet/trunk/src/main/org/apache/tools/ant/ ant/sandbox/antlibs/dotnet/trunk/src/main/org/apache/tools/ant/taskdefs/ ant/sandbox/antlibs/dotnet/trunk/src/main/org/apache/tools/ant/taskdefs/optional/ ant/sandbox/antlibs/dotnet/trunk/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/ ant/sandbox/antlibs/dotnet/trunk/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/AbstractBuildTask.java (with props) ant/sandbox/antlibs/dotnet/trunk/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotNetExecTask.java (with props) ant/sandbox/antlibs/dotnet/trunk/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/MSBuildTask.java (with props) ant/sandbox/antlibs/dotnet/trunk/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/NAntTask.java (with props) ant/sandbox/antlibs/dotnet/trunk/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/NUnitTask.java (with props) ant/sandbox/antlibs/dotnet/trunk/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/WixTask.java (with props) ant/sandbox/antlibs/dotnet/trunk/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/antlib.xml (with props) ant/sandbox/antlibs/dotnet/trunk/src/testcases/ ant/sandbox/antlibs/dotnet/trunk/src/testcases/org/ ant/sandbox/antlibs/dotnet/trunk/src/testcases/org/apache/ ant/sandbox/antlibs/dotnet/trunk/src/testcases/org/apache/tools/ ant/sandbox/antlibs/dotnet/trunk/src/testcases/org/apache/tools/ant/ ant/sandbox/antlibs/dotnet/trunk/src/testcases/org/apache/tools/ant/taskdefs/ ant/sandbox/antlibs/dotnet/trunk/src/testcases/org/apache/tools/ant/taskdefs/optional/ ant/sandbox/antlibs/dotnet/trunk/src/testcases/org/apache/tools/ant/taskdefs/optional/dotnet/ ant/sandbox/antlibs/dotnet/trunk/src/testcases/org/apache/tools/ant/taskdefs/optional/dotnet/DotNetExecTaskTest.java (with props) ant/sandbox/antlibs/dotnet/trunk/src/testcases/org/apache/tools/ant/taskdefs/optional/dotnet/MSBuildTaskTest.java (with props) ant/sandbox/antlibs/dotnet/trunk/src/testcases/org/apache/tools/ant/taskdefs/optional/dotnet/NAntTaskTest.java (with props) ant/sandbox/antlibs/dotnet/trunk/src/testcases/org/apache/tools/ant/taskdefs/optional/dotnet/NUnitTaskTest.java (with props) ant/sandbox/antlibs/svn/ ant/sandbox/antlibs/svn/branches/ ant/sandbox/antlibs/svn/tags/ ant/sandbox/antlibs/svn/trunk/ ant/sandbox/antlibs/svn/trunk/README (with props) ant/sandbox/antlibs/svn/trunk/build.xml (with props) ant/sandbox/antlibs/svn/trunk/docs/ ant/sandbox/antlibs/svn/trunk/docs/changelog.html (with props) ant/sandbox/antlibs/svn/trunk/docs/revisiondiff.html (with props) ant/sandbox/antlibs/svn/trunk/docs/svn.html (with props) ant/sandbox/antlibs/svn/trunk/docs/tagdiff.html (with props) ant/sandbox/antlibs/svn/trunk/src/ ant/sandbox/antlibs/svn/trunk/src/etc/ ant/sandbox/antlibs/svn/trunk/src/etc/changelog.xsl (with props) ant/sandbox/antlibs/svn/trunk/src/etc/diff.xsl (with props) ant/sandbox/antlibs/svn/trunk/src/etc/testcases/ ant/sandbox/antlibs/svn/trunk/src/etc/testcases/abstractsvntask.xml (with props) ant/sandbox/antlibs/svn/trunk/src/etc/testcases/changelog.xml (with props) ant/sandbox/antlibs/svn/trunk/src/etc/testcases/revisiondiff.xml (with props) ant/sandbox/antlibs/svn/trunk/src/etc/testcases/tagdiff.xml (with props) ant/sandbox/antlibs/svn/trunk/src/main/ ant/sandbox/antlibs/svn/trunk/src/main/org/ ant/sandbox/antlibs/svn/trunk/src/main/org/apache/ ant/sandbox/antlibs/svn/trunk/src/main/org/apache/tools/ ant/sandbox/antlibs/svn/trunk/src/main/org/apache/tools/ant/ ant/sandbox/antlibs/svn/trunk/src/main/org/apache/tools/ant/taskdefs/ ant/sandbox/antlibs/svn/trunk/src/main/org/apache/tools/ant/taskdefs/svn/ ant/sandbox/antlibs/svn/trunk/src/main/org/apache/tools/ant/taskdefs/svn/AbstractSvnTask.java (with props) ant/sandbox/antlibs/svn/trunk/src/main/org/apache/tools/ant/taskdefs/svn/LineOrientedOutputStream.java (with props) ant/sandbox/antlibs/svn/trunk/src/main/org/apache/tools/ant/taskdefs/svn/Svn.java (with props) ant/sandbox/antlibs/svn/trunk/src/main/org/apache/tools/ant/taskdefs/svn/SvnChangeLogParser.java (with props) ant/sandbox/antlibs/svn/trunk/src/main/org/apache/tools/ant/taskdefs/svn/SvnChangeLogTask.java (with props) ant/sandbox/antlibs/svn/trunk/src/main/org/apache/tools/ant/taskdefs/svn/SvnChangeLogWriter.java (with props) ant/sandbox/antlibs/svn/trunk/src/main/org/apache/tools/ant/taskdefs/svn/SvnDiffHandler.java (with props) ant/sandbox/antlibs/svn/trunk/src/main/org/apache/tools/ant/taskdefs/svn/SvnEntry.java (with props) ant/sandbox/antlibs/svn/trunk/src/main/org/apache/tools/ant/taskdefs/svn/SvnRevisionDiff.java (with props) ant/sandbox/antlibs/svn/trunk/src/main/org/apache/tools/ant/taskdefs/svn/SvnTagDiff.java (with props) ant/sandbox/antlibs/svn/trunk/src/main/org/apache/tools/ant/taskdefs/svn/antlib.xml (with props) ant/sandbox/antlibs/svn/trunk/src/testcases/ ant/sandbox/antlibs/svn/trunk/src/testcases/org/ ant/sandbox/antlibs/svn/trunk/src/testcases/org/apache/ ant/sandbox/antlibs/svn/trunk/src/testcases/org/apache/tools/ ant/sandbox/antlibs/svn/trunk/src/testcases/org/apache/tools/ant/ ant/sandbox/antlibs/svn/trunk/src/testcases/org/apache/tools/ant/taskdefs/ ant/sandbox/antlibs/svn/trunk/src/testcases/org/apache/tools/ant/taskdefs/svn/ ant/sandbox/antlibs/svn/trunk/src/testcases/org/apache/tools/ant/taskdefs/svn/AbstractSvnTaskTest.java (with props) ant/sandbox/antlibs/svn/trunk/src/testcases/org/apache/tools/ant/taskdefs/svn/SvnChangeLogTaskTest.java (with props) ant/sandbox/antlibs/svn/trunk/src/testcases/org/apache/tools/ant/taskdefs/svn/SvnRevisionDiffTest.java (with props) ant/sandbox/antlibs/svn/trunk/src/testcases/org/apache/tools/ant/taskdefs/svn/SvnTagDiffTest.java (with props) Added: ant/sandbox/antlibs/antunit/trunk/build.xml URL: http://svn.apache.org/viewcvs/ant/sandbox/antlibs/antunit/trunk/build.xml?view=auto&rev=161469 ============================================================================== --- ant/sandbox/antlibs/antunit/trunk/build.xml (added) +++ ant/sandbox/antlibs/antunit/trunk/build.xml Fri Apr 15 07:32:50 2005 @@ -0,0 +1,93 @@ +<?xml version="1.0"?> +<!-- + Copyright 2005 The Apache Software Foundation + + Licensed 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 default="compile"> + + <target name="setup"> + <property name="build" value="build"/> + <property name="build.classes" value="${build}/classes"/> + <property name="build.testclasses" value="${build}/test-classes"/> + <property name="build.lib" value="${build}/lib"/> + <property name="jarname" value="${build.lib}/ant-antunit.jar"/> + <mkdir dir="${build.classes}"/> + <mkdir dir="${build.testclasses}"/> + <mkdir dir="${build.lib}"/> + </target> + + <target name="compile" depends="setup"> + <javac + srcdir="src/main" + destdir="${build.classes}" + debug="true" + /> + </target> + + <target name="antlib" depends="compile"> + <copy todir="${build.classes}"> + <fileset dir="src/main" includes="**/antlib.xml"/> + </copy> + <jar + destfile="${jarname}" + basedir="${build.classes}" + /> + </target> + + <target name="setup-for-tests" depends="setup"> + <ant + antfile="../../../build.xml" + target="test-jar" + inheritall="false" + /> + </target> + + <target name="compile-tests" depends="setup-for-tests, antlib"> + <javac + srcdir="src/testcases" + destdir="${build.testclasses}" + debug="true" + > + <classpath> + <pathelement location="${jarname}"/> + <pathelement location="../../../build/lib/ant-testutil.jar"/> + </classpath> + </javac> + </target> + + <target name="test" depends="compile-tests"> + <junit + printsummary="false" + haltonfailure="false" + failureproperty="tests.failed" + filtertrace="false" + fork="true" + forkmode="once" + > + <classpath> + <pathelement location="${jarname}"/> + <pathelement location="../../../build/lib/ant-testutil.jar"/> + <pathelement location="${build.testclasses}"/> + </classpath> + + <batchtest> + <fileset dir="src/testcases"/> + </batchtest> + + <formatter type="plain" usefile="false"/> + </junit> + + <fail if="tests.failed">At least one test has failed.</fail> + </target> +</project> \ No newline at end of file Propchange: ant/sandbox/antlibs/antunit/trunk/build.xml ------------------------------------------------------------------------------ svn:eol-style = native Added: ant/sandbox/antlibs/antunit/trunk/src/etc/testcases/assert.xml URL: http://svn.apache.org/viewcvs/ant/sandbox/antlibs/antunit/trunk/src/etc/testcases/assert.xml?view=auto&rev=161469 ============================================================================== --- ant/sandbox/antlibs/antunit/trunk/src/etc/testcases/assert.xml (added) +++ ant/sandbox/antlibs/antunit/trunk/src/etc/testcases/assert.xml Fri Apr 15 07:32:50 2005 @@ -0,0 +1,143 @@ +<?xml version="1.0"?> + +<!-- + Copyright 2005 The Apache Software Foundation + + Licensed 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="assert-test" + default="all" xmlns:au="antlib:org.apache.ant.antlib.antunit"> + + <target name="all"> + <fail>Only run via JUnit</fail> + </target> + + <target name="assertTruePass"> + <au:assertTrue> + <istrue value="true"/> + </au:assertTrue> + </target> + + <target name="assertTrueFail"> + <au:assertTrue> + <istrue value="false"/> + </au:assertTrue> + </target> + + <target name="assertFalsePass"> + <au:assertFalse> + <isfalse value="true"/> + </au:assertFalse> + </target> + + <target name="assertFalseFail"> + <au:assertFalse> + <isfalse value="false"/> + </au:assertFalse> + </target> + + <target name="assertEqualsPass"> + <au:assertEquals expected="bar" actual="bar"/> + </target> + + <target name="assertEqualsCasePass"> + <au:assertEquals expected="bar" actual="BAR" casesensitive="false"/> + </target> + + <target name="assertEqualsFail1"> + <au:assertEquals expected="bar" actual="baz"/> + </target> + + <target name="assertEqualsFail2"> + <au:assertEquals expected="bar" actual="BAR"/> + </target> + + <target name="assertPropertySetPass"> + <property name="foo" value="bar"/> + <au:assertPropertySet name="foo"/> + </target> + + <target name="assertPropertySetFail"> + <au:assertPropertySet name="foo"/> + </target> + + <target name="assertPropertyEqualsPass"> + <property name="foo" value="bar"/> + <au:assertPropertyEquals name="foo" value="bar"/> + </target> + + <target name="assertPropertyEqualsCasePass"> + <property name="foo" value="bar"/> + <au:assertPropertyEquals name="foo" value="BAR" casesensitive="false"/> + </target> + + <target name="assertPropertyEqualsFail1"> + <au:assertPropertyEquals name="foo" value="bar"/> + </target> + + <target name="assertPropertyEqualsFail2"> + <property name="foo" value="bar"/> + <au:assertPropertyEquals name="foo" value="baz"/> + </target> + + <target name="assertPropertyEqualsFail3"> + <property name="foo" value="bar"/> + <au:assertPropertyEquals name="foo" value="BAR"/> + </target> + + <target name="assertFileExistsPass"> + <au:assertFileExists file="assert.xml"/> + </target> + + <target name="assertFileExistsFail"> + <au:assertFileExists file="assert.txt"/> + </target> + + <target name="assertFileDoesntExistPass"> + <au:assertFileDoesntExist file="assert.txt"/> + </target> + + <target name="assertFileDoesntExistFail"> + <au:assertFileDoesntExist file="assert.xml"/> + </target> + + <target name="assertDestIsUptodatePass"> + <au:assertDestIsUptodate + src="../../main/org/apache/ant/antlib/antunit/AssertTask.java" + + dest="../../../build/classes/org/apache/ant/antlib/antunit/AssertTask.class"/> + </target> + + <target name="assertDestIsUptodateFail"> + <au:assertDestIsUptodate + dest="../../main/org/apache/ant/antlib/antunit/AssertTask.java" + + src="../../../build/classes/org/apache/ant/antlib/antunit/AssertTask.class"/> + </target> + + <target name="assertDestIsOutofdatePass"> + <au:assertDestIsOutofdate + dest="../../main/org/apache/ant/antlib/antunit/AssertTask.java" + + src="../../../build/classes/org/apache/ant/antlib/antunit/AssertTask.class"/> + </target> + + <target name="assertDestIsOutofdateFail"> + <au:assertDestIsOutofdate + src="../../main/org/apache/ant/antlib/antunit/AssertTask.java" + + dest="../../../build/classes/org/apache/ant/antlib/antunit/AssertTask.class"/> + </target> + +</project> \ No newline at end of file Propchange: ant/sandbox/antlibs/antunit/trunk/src/etc/testcases/assert.xml ------------------------------------------------------------------------------ svn:eol-style = native Added: ant/sandbox/antlibs/antunit/trunk/src/main/org/apache/ant/antlib/antunit/AssertTask.java URL: http://svn.apache.org/viewcvs/ant/sandbox/antlibs/antunit/trunk/src/main/org/apache/ant/antlib/antunit/AssertTask.java?view=auto&rev=161469 ============================================================================== --- ant/sandbox/antlibs/antunit/trunk/src/main/org/apache/ant/antlib/antunit/AssertTask.java (added) +++ ant/sandbox/antlibs/antunit/trunk/src/main/org/apache/ant/antlib/antunit/AssertTask.java Fri Apr 15 07:32:50 2005 @@ -0,0 +1,70 @@ +/* + * Copyright 2005 The Apache Software Foundation + * + * Licensed 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.ant.antlib.antunit; + +import org.apache.tools.ant.BuildException; +import org.apache.tools.ant.taskdefs.condition.Condition; +import org.apache.tools.ant.taskdefs.condition.ConditionBase; + +/** + * Exits the active build, giving an additional message if the single + * nested condition fails. + * + * <p>This one could as well be implemented as + * + * <pre> + * <macrodef name="assertTrue"> + * <attribute name="message" default="Assertion failed"/> + * <element name="assertion" implicit="true"/> + * <sequential> + * <fail message="@{message}"> + * <condition> + * <assertion/> + * </condition> + * </fail> + * </sequential> + * </macrodef> + * </pre> + * + * but wouldn't be able to throw a specialized exception that way - + * and the macrodef would nest the exception in yet another + * BuildException.</p> + */ +public class AssertTask extends ConditionBase { + + private String message = AssertionFailedException.DEFAULT_MESSAGE; + + public void setMessage(String value) { + this.message = value; + } + + public void execute() throws BuildException { + int count = countConditions(); + if (count > 1) { + throw new BuildException("You must not specify more tha one " + + "conditions"); + } + if (count < 1) { + throw new BuildException("You must specify a condition"); + } + if (!((Condition) getConditions().nextElement()).eval()) { + throw new AssertionFailedException(message); + } + } + +} \ No newline at end of file Propchange: ant/sandbox/antlibs/antunit/trunk/src/main/org/apache/ant/antlib/antunit/AssertTask.java ------------------------------------------------------------------------------ svn:eol-style = native Added: ant/sandbox/antlibs/antunit/trunk/src/main/org/apache/ant/antlib/antunit/AssertionFailedException.java URL: http://svn.apache.org/viewcvs/ant/sandbox/antlibs/antunit/trunk/src/main/org/apache/ant/antlib/antunit/AssertionFailedException.java?view=auto&rev=161469 ============================================================================== --- ant/sandbox/antlibs/antunit/trunk/src/main/org/apache/ant/antlib/antunit/AssertionFailedException.java (added) +++ ant/sandbox/antlibs/antunit/trunk/src/main/org/apache/ant/antlib/antunit/AssertionFailedException.java Fri Apr 15 07:32:50 2005 @@ -0,0 +1,32 @@ +/* + * Copyright 2005 The Apache Software Foundation + * + * Licensed 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.ant.antlib.antunit; + +import org.apache.tools.ant.BuildException; + +/** + * Specialized BuildException thrown by the AssertTask task. + */ +public class AssertionFailedException extends BuildException { + + public static final String DEFAULT_MESSAGE = "Assertion failed"; + + public AssertionFailedException(String message) { + super(message); + } +} \ No newline at end of file Propchange: ant/sandbox/antlibs/antunit/trunk/src/main/org/apache/ant/antlib/antunit/AssertionFailedException.java ------------------------------------------------------------------------------ svn:eol-style = native Added: ant/sandbox/antlibs/antunit/trunk/src/main/org/apache/ant/antlib/antunit/antlib.xml URL: http://svn.apache.org/viewcvs/ant/sandbox/antlibs/antunit/trunk/src/main/org/apache/ant/antlib/antunit/antlib.xml?view=auto&rev=161469 ============================================================================== --- ant/sandbox/antlibs/antunit/trunk/src/main/org/apache/ant/antlib/antunit/antlib.xml (added) +++ ant/sandbox/antlibs/antunit/trunk/src/main/org/apache/ant/antlib/antunit/antlib.xml Fri Apr 15 07:32:50 2005 @@ -0,0 +1,117 @@ +<?xml version="1.0"?> +<!-- + Copyright 2005 The Apache Software Foundation + + Licensed 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. +--> +<antlib xmlns:au="antlib:org.apache.ant.antlib.antunit"> + <taskdef name="assertTrue" + classname="org.apache.ant.antlib.antunit.AssertTask"/> + + <macrodef name="assertFalse"> + <attribute name="message" default="Assertion failed"/> + <element name="assertion" implicit="true"/> + <sequential> + <au:assertTrue message="@{message}"> + <not> + <assertion/> + </not> + </au:assertTrue> + </sequential> + </macrodef> + + <macrodef name="assertEquals"> + <attribute name="expected"/> + <attribute name="actual"/> + <attribute name="casesensitive" default="true"/> + <attribute name="message" + default="Expected '@{expected}' but was '@{actual}'"/> + <sequential> + <au:assertTrue message="@{message}"> + <equals arg1="@{expected}" arg2="@{actual}" + casesensitive="@{casesensitive}"/> + </au:assertTrue> + </sequential> + </macrodef> + + <macrodef name="assertPropertySet"> + <attribute name="name"/> + <attribute name="message" + default="Expected property '@{name}'"/> + <sequential> + <au:assertTrue message="@{message}"> + <isset property="@{name}"/> + </au:assertTrue> + </sequential> + </macrodef> + + <macrodef name="assertPropertyEquals"> + <attribute name="name"/> + <attribute name="value"/> + <attribute name="casesensitive" default="true"/> + <attribute name="message" + default="Expected property '@{name}' to have value '@{value}' but was '[EMAIL PROTECTED]'"/> + <sequential> + <au:assertPropertySet message="@{message}" name="@{name}"/> + <au:assertEquals message="@{message}" expected="@{value}" + actual="[EMAIL PROTECTED]" casesensitive="@{casesensitive}"/> + </sequential> + </macrodef> + + <macrodef name="assertFileExists"> + <attribute name="file"/> + <attribute name="message" + default="Expected file '@{file}' to exist"/> + <sequential> + <au:assertTrue message="@{message}"> + <available file="@{file}"/> + </au:assertTrue> + </sequential> + </macrodef> + + <macrodef name="assertFileDoesntExist"> + <attribute name="file"/> + <attribute name="message" + default="Didn't expect file '@{file}' to exist"/> + <sequential> + <au:assertFalse message="@{message}"> + <available file="@{file}"/> + </au:assertFalse> + </sequential> + </macrodef> + + <macrodef name="assertDestIsUptodate"> + <attribute name="src"/> + <attribute name="dest"/> + <attribute name="message" + default="Expected '@{dest}' to be more recent than '@{src}'"/> + <sequential> + <au:assertTrue message="@{message}"> + <uptodate srcfile="@{src}" targetfile="@{dest}"/> + </au:assertTrue> + </sequential> + </macrodef> + + <macrodef name="assertDestIsOutofdate"> + <attribute name="src"/> + <attribute name="dest"/> + <attribute name="message" + default="Expected '@{src}' to be more recent than '@{dest}'"/> + <sequential> + <au:assertFalse message="@{message}"> + <uptodate srcfile="@{src}" targetfile="@{dest}"/> + </au:assertFalse> + </sequential> + </macrodef> + +</antlib> \ No newline at end of file Propchange: ant/sandbox/antlibs/antunit/trunk/src/main/org/apache/ant/antlib/antunit/antlib.xml ------------------------------------------------------------------------------ svn:eol-style = native Added: ant/sandbox/antlibs/antunit/trunk/src/testcases/org/apache/ant/antlib/antunit/AssertTest.java URL: http://svn.apache.org/viewcvs/ant/sandbox/antlibs/antunit/trunk/src/testcases/org/apache/ant/antlib/antunit/AssertTest.java?view=auto&rev=161469 ============================================================================== --- ant/sandbox/antlibs/antunit/trunk/src/testcases/org/apache/ant/antlib/antunit/AssertTest.java (added) +++ ant/sandbox/antlibs/antunit/trunk/src/testcases/org/apache/ant/antlib/antunit/AssertTest.java Fri Apr 15 07:32:50 2005 @@ -0,0 +1,138 @@ +/* + * Copyright 2005 The Apache Software Foundation + * + * Licensed 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.ant.antlib.antunit; + +import org.apache.tools.ant.BuildException; +import org.apache.tools.ant.BuildFileTest; + +public class AssertTest extends BuildFileTest { + + public AssertTest(String name) { + super(name); + } + + public void setUp() { + configureProject("src/etc/testcases/assert.xml"); + } + + public void testTruePass() { + testPass("assertTruePass"); + } + public void testFalsePass() { + testPass("assertFalsePass"); + } + public void testEqualsPass() { + testPass("assertEqualsPass"); + } + public void testEqualsCasePass() { + testPass("assertEqualsCasePass"); + } + public void testPropertySetPass() { + testPass("assertPropertySetPass"); + } + public void testPropertyEqualsPass() { + testPass("assertPropertyEqualsPass"); + } + public void testPropertyEqualsCasePass() { + testPass("assertPropertyEqualsCasePass"); + } + public void testFileExistsPass() { + testPass("assertFileExistsPass"); + } + public void testFileDoesntExistPass() { + testPass("assertFileDoesntExistPass"); + } + public void testDestIsUptodatePass() { + testPass("assertDestIsUptodatePass"); + } + public void testDestIsOutofdatePass() { + testPass("assertDestIsOutofdatePass"); + } + + public void testTrueFail() { + testFail("assertTrueFail"); + } + public void testFalseFail() { + testFail("assertFalseFail"); + } + public void testEqualsFail1() { + testFail("assertEqualsFail1", "Expected 'bar' but was 'baz'"); + } + public void testEqualsFail2() { + testFail("assertEqualsFail2", "Expected 'bar' but was 'BAR'"); + } + public void testPropertySetFail() { + testFail("assertPropertySetFail", "Expected property 'foo'"); + } + public void testPropertyEqualsFail1() { + testFail("assertPropertyEqualsFail1", "Expected property 'foo' to have value 'bar' but was '${foo}'"); + } + public void testPropertyEqualsFail2() { + testFail("assertPropertyEqualsFail2", "Expected property 'foo' to have value 'baz' but was 'bar'"); + } + public void testPropertyEqualsFail3() { + testFail("assertPropertyEqualsFail3", "Expected property 'foo' to have value 'BAR' but was 'bar'"); + } + public void testFileExistsFail() { + testFail("assertFileExistsFail", + "Expected file 'assert.txt' to exist"); + } + public void testFileDoesntExistFail() { + testFail("assertFileDoesntExistFail", + "Didn't expect file 'assert.xml' to exist"); + } + public void testDestIsUptodateFail() { + testFail("assertDestIsUptodateFail", + "Expected '../../main/org/apache/ant/antlib/antunit/AssertTask.java' to be more recent than '../../../build/classes/org/apache/ant/antlib/antunit/AssertTask.class'"); + } + public void testDestIsOutofdateFail() { + testFail("assertDestIsOutofdateFail", + "Expected '../../main/org/apache/ant/antlib/antunit/AssertTask.java' to be more recent than '../../../build/classes/org/apache/ant/antlib/antunit/AssertTask.class'"); + } + + + private void testPass(String target) { + executeTarget(target); + } + + private void testFail(String target) { + testFail(target, "Assertion failed"); + } + + private void testFail(String target, String message) { + try { + executeTarget(target); + fail("Expected failed assetion"); + } catch (AssertionFailedException e) { + assertEquals(message, e.getMessage()); + } catch (BuildException e) { + // depending on the number of macrodef indirections, this + // can become arbitrarily deep + while (true) { + Throwable t = e.getCause(); + assertNotNull(t); + assertTrue("nested is a BuildException", + t instanceof BuildException); + if (t instanceof AssertionFailedException) { + assertEquals(message, e.getMessage()); + break; + } + e = (BuildException) t; + } + } // end of try-catch + } +} \ No newline at end of file Propchange: ant/sandbox/antlibs/antunit/trunk/src/testcases/org/apache/ant/antlib/antunit/AssertTest.java ------------------------------------------------------------------------------ svn:eol-style = native Added: ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/README URL: http://svn.apache.org/viewcvs/ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/README?view=auto&rev=161469 ============================================================================== --- ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/README (added) +++ ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/README Fri Apr 15 07:32:50 2005 @@ -0,0 +1,38 @@ +dotnet sandbox README +===================== + +Author: +------- + +Stefan Bodewig, but feel free to go ahead and modify to your liking. + +Goal: +----- + +Provide a simple infrastructure to execute .NET applications from +within Ant for different VMs so that the user doesn't have to change +the build file when she wants to run Mono on Linux and Microsoft's VM +on Windows. + +This sounds far more ambitioned than it actually is. + +Short term goals are: + +* A <dotnetexec> task that can be used as + + <dotnetexec executable="ExampleCsc.exe"/> + + without testing for the environment (see the dotnet.xml build file + for Ant's tests as an example for what may become simpler with + this). + +* A <nant> task. + +* A <msbuild> task - if only for the fun of having it. + +* A <wix> task. + +* A <nunit> task. + +Those tasks should end up in an antlib of their own in order to be +distributable independent of Ant. Propchange: ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/README ------------------------------------------------------------------------------ svn:eol-style = native Added: ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/build.xml URL: http://svn.apache.org/viewcvs/ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/build.xml?view=auto&rev=161469 ============================================================================== --- ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/build.xml (added) +++ ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/build.xml Fri Apr 15 07:32:50 2005 @@ -0,0 +1,91 @@ +<?xml version="1.0"?> +<!-- + Copyright 2003-2004 The Apache Software Foundation + + Licensed 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 default="compile"> + + <target name="setup"> + <property name="build" value="build"/> + <property name="build.classes" value="${build}/classes"/> + <property name="build.testclasses" value="${build}/test-classes"/> + <property name="build.lib" value="${build}/lib"/> + <property name="jarname" value="${build.lib}/dotnet.jar"/> + <mkdir dir="${build.classes}"/> + <mkdir dir="${build.testclasses}"/> + <mkdir dir="${build.lib}"/> + </target> + + <target name="compile" depends="setup"> + <javac + srcdir="src/main" + destdir="${build.classes}" + debug="true" + /> + </target> + + <target name="antlib" depends="compile"> + <copy todir="${build.classes}"> + <fileset dir="src/main" includes="**/antlib.xml"/> + </copy> + <jar + destfile="${jarname}" + basedir="${build.classes}" + /> + </target> + + <target name="setup-for-tests" depends="setup"> + <ant + antfile="../../../build.xml" + target="test-jar" + inheritall="false" + /> + </target> + + <target name="compile-tests" depends="setup-for-tests, antlib"> + <javac + srcdir="src/testcases" + destdir="${build.testclasses}" + debug="true" + > + <classpath> + <pathelement location="${jarname}"/> + <pathelement location="../../../build/lib/ant-testutil.jar"/> + </classpath> + </javac> + </target> + + <target name="test" depends="compile-tests"> + <junit + printsummary="false" + haltonfailure="false" + failureproperty="tests.failed" + filtertrace="false" + > + <classpath> + <pathelement location="${jarname}"/> + <pathelement location="../../../build/lib/ant-testutil.jar"/> + <pathelement location="${build.testclasses}"/> + </classpath> + + <batchtest> + <fileset dir="src/testcases"/> + </batchtest> + + <formatter type="plain" usefile="false"/> + </junit> + + <fail if="tests.failed">At least one test has failed.</fail> + </target> +</project> \ No newline at end of file Propchange: ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/build.xml ------------------------------------------------------------------------------ svn:eol-style = native Added: ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/docs/dotnetexec.html URL: http://svn.apache.org/viewcvs/ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/docs/dotnetexec.html?view=auto&rev=161469 ============================================================================== --- ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/docs/dotnetexec.html (added) +++ ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/docs/dotnetexec.html Fri Apr 15 07:32:50 2005 @@ -0,0 +1,32 @@ +<html> + <head> + <meta http-equiv="Content-Language" content="en-us"></meta> + <title>DotNetExec Task</title> + </head> + + <body> + <h2><a name="dotnetexec">DotNetExec</a></h2> + + <h3>Description</h3> + + <p>Executes a .NET assembly that's on your PATH or pointed to + directly by the executable attribute.</p> + + <p>This task is an extension of Ant's <a + href="http://ant.apache.org/manual/CoreTasks/exec.html">exec</a> + task and supports all attributes and nested child elements of that + task. Use the executable attribute to specify the name of the + assembly (including the extension).</p> + + <p>This task allows you to choose the .NET framework via the + <code>vm</code> attribute. The default value is "microsoft" on + Windows and "mono" on all other platforms. "microsoft" is a magic + name that means "run the assembly as executable directly" - this + may also work for Mono on Linux systems with the binfmt feature + described in the <a + href="http://www.go-mono.org/faq.html#q86">Mono FAQ</a>.</p> + + <hr/> + <p align="center">Copyright © 2003-2004 The Apache Software Foundation. All rights Reserved.</p> + </body> +</html> \ No newline at end of file Propchange: ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/docs/dotnetexec.html ------------------------------------------------------------------------------ svn:eol-style = native Added: ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/docs/index.html URL: http://svn.apache.org/viewcvs/ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/docs/index.html?view=auto&rev=161469 ============================================================================== --- ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/docs/index.html (added) +++ ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/docs/index.html Fri Apr 15 07:32:50 2005 @@ -0,0 +1,142 @@ +<html> + <head> + <meta http-equiv="Content-Language" content="en-us"></meta> + <title>Dotnet Ant Library</title> + </head> + + <body> + <h2>Introduction</h2> + + <p>This is a library of Ant tasks that support using .NET + executables accross different platforms and in particular support + using common .NET development tools like <a + href="http://nant.sourceforge.net/">NAnt</a> or <a + href="http://www.nunit.org/">NUnit</a> from within Ant.</p> + + <h2>Requirements</h2> + + <p>The current version requires Ant 1.6.2 or later and may even + work better for a CVS build of Ant created from CVS HEAD.</p> + + <h2>Where is it?</h2> + + <p>The source code for the library currently lives in the + developer sandbox in Ant's CVS - <a + href="http://cvs.apache.org/viewcvs.cgi/ant/proposal/sandbox/dotnet/">http://cvs.apache.org/viewcvs.cgi/ant/proposal/sandbox/dotnet/</a>. + A binary can be found at <a + href="http://cvs.apache.org/~bodewig/dotnet/dotnet.jar">http://cvs.apache.org/~bodewig/dotnet/dotnet.jar</a>. + A zip file containing the docs is also <a + href="http://cvs.apache.org/~bodewig/dotnet/docs.zip">available</a>.</p> + + <p>Note that these are temporary locations and may change later.</p> + + <h2>Feedback</h2> + + <p>Right now direct any feedback either directly to <a + href="mailto:[EMAIL PROTECTED]">me</a> or the <a + href="http://ant.apache.org/mail.html#Developer List">Ant + developer list</a>. + + <h2>Installation</h2> + + <p>If you are building this from sources, run the antlib target + and you'll get a file <code>dotnet.jar</code>. If you've + downloaded <code>dotnet.jar</code>, you are already ready.</p> + + <p>There are several ways to use the tasks:</p> + + <ul> + <li>The traditional way: + <pre> + <taskdef + resource="org/apache/tools/ant/taskdefs/optional/dotnet/antlib.xml"> + <classpath> + <pathelement location="YOUR-PATH-TO/dotnet.jar"/> + </classpath> + </taskdef> + </pre> + + With this you can use the tasks like plain Ant tasks, they'll + live in the default namespace. I.e. if you can run + <exec> without any namespace prefix, you can do so for + <dotnetexec> as well. + </li> + + <li>Similar, but assigning a namespace URI + <pre> + <taskdef + uri="antlib:org.apache.tools.ant.taskdefs.optional.dotnet" + resource="org/apache/tools/ant/taskdefs/optional/dotnet/antlib.xml"> + <classpath> + <pathelement location="YOUR-PATH-TO/dotnet.jar"/> + </classpath> + </taskdef> + </pre> + + This puts you task into a separate namespace than Ant's + namespace. You would use the tasks like + + <pre> + <project + xmlns:dn="antlib:org.apache.tools.ant.taskdefs.optional.dotnet" + xmlns="antlib:org.apache.tools.ant"> + ... + <dn:nant> + <dn:target name="my-target"/> + </dn:nant> + </pre> + + or + + <pre> + <nant xmlns="antlib:org.apache.tools.ant.taskdefs.optional.dotnet"> + <target name="my-target"/> + </nant> + </pre> + + or a variation thereof. + </li> + + <li>Using Ant's autodiscovery. Place <code>dotnet.jar</code> + into a directory and use <code>ant -lib + DIR-CONTAINING-THE-JAR</code> or copy it into + <code>ANT_HOME/lib</code> - and then in your build file, simply + declare the namespace on the <code>project</code> tag: + + <pre> + <project + xmlns:dn="antlib:org.apache.tools.ant.taskdefs.optional.dotnet" + xmlns="antlib:org.apache.tools.ant"> + </pre> + + And all tasks of this library will automatically be available + in the <code>dn</code> namespace without any + <code>taskdef</code>. + </li> + </ul> + + <h2>Tasks</h2> + + <ul> + <li><a href="dotnetexec.html">dotnetexec</a> - run a .NET + assembly that's in your PATH. You can chose the framework that + is going to be used - defaults to Mono on non-Windows platforms + and Microsoft's on Windows.</li> + + <li><a href="nant.html">nant</a> - execute the NAnt build + tool.</li> + + <li><a href="msbuild.html">msbuild</a> - execute the MSBuild build + tool, untested.</li> + + <li><a href="wix.html">wix</a> - execute the WiX toolset, untested.</li> + + <li><a href="nunit.html">nunit</a> - execute the + nunit-console.exe <a href="http://www.nunit.org/">NUnit</a> + test runner.</li> + </ul> + + <hr/> + <p align="center">Copyright © 2003-2004 The Apache Software Foundation. All rights Reserved.</p> + </body> +</html> Propchange: ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/docs/index.html ------------------------------------------------------------------------------ svn:eol-style = native Added: ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/docs/msbuild.html URL: http://svn.apache.org/viewcvs/ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/docs/msbuild.html?view=auto&rev=161469 ============================================================================== --- ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/docs/msbuild.html (added) +++ ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/docs/msbuild.html Fri Apr 15 07:32:50 2005 @@ -0,0 +1,109 @@ +<html> + <head> + <meta http-equiv="Content-Language" content="en-us"></meta> + <title>MSBuild Task</title> + </head> + + <body> + <h2><a name="dotnetexec">MSBuild</a></h2> + + <h3>Description</h3> + + <p>Runs the MSBuild build tool presented at the 2003 PDC. This + task is completely untested as the developers have no access to + the tool, it has been implemented by looking at the docs only.</p> + + <p>You can either use an existing build file or nest a build file + (snippet) as a child into the task. If you don't specify either, + MSBuild's default build file search algorithm will apply.</p> + + <h3>Parameters</h3> + <table border="1" cellpadding="2" cellspacing="0"> + <tr> + <td valign="top"><b>Attribute</b></td> + <td valign="top"><b>Description</b></td> + <td align="center" valign="top"><b>Required</b></td> + </tr> + <tr> + <td valign="top">buildfile</td> + <td valign="top">External build file to invoke MSBuild on.</td> + <td align="center">No.</td> + </tr> + <tr> + <td valign="top">vm</td> + <td valign="top">Same as <a + href="dotnetexec.html">dotnetexec</a>'s vm attribute. + Specify the framework to use.</td> + <td align="center">No.</td> + </tr> + </table> + + <h3>Parameters specified as nested elements</h3> + <h4>target</h4> + + <p><code>target</code> has a single required attribute name - + specifies a target to be run.</p> + + <h4>property</h4> + + <p><code>property</code> has two required attributes. name and + value that specify name and value of a property that is to be + defined in the MSBuild invocation.</p> + + <h4>build</h4> + + <p>This element allows no attributes. You can nest a MSBuild build + file into it and MSBuild will be executed on that. You can also nest + a build file snippet instead and Ant will wrap the necessary MSBuild + <code><Project> around it.</code></p> + + <h3>Examples</h3> + + <p>Let MSBuild search for a *.proj file in the (Ant) project's base + directory and execute the default target in it:</p> + + <pre><msbuild/></pre> + + <p>Let MSBuild execute the targets named foo and bar in the build + file msbuild.proj in Ant's basedir and pass the property + <code>/property:test=testvalue</code> to it:</p> + + <pre> + <msbuild buildfile="msbuild.proj"> + <target name="foo"/> + <target name="bar"/> + <property name="test" value="testvalue"/> + </msbuild> + </pre> + + <p>Define a build file embeded into the task, let MSBuild execute the + echo target of that build file.</p> + + <pre> + <msbuild> + <target name="echo"> + <build> + <Project DefaultTargets="empty"> + <Target Name="empty"/> + <Target Name="echo"> + <Task Name="Echo" Message="This is MSBuild"/> + </Target> + </Project> + </build> + </msbuild> + </pre> + + <p>Run MSBuild's Echo task (if there actually is one):</p> + + <pre> + <msbuild> + <build> + <Task Name="Echo" Message="This is MSBuild"/> + </build> + </msbuild> + </pre> + + <hr/> + <p align="center">Copyright © 2003-2004 The Apache Software Foundation. All rights Reserved.</p> + </body> +</html> \ No newline at end of file Propchange: ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/docs/msbuild.html ------------------------------------------------------------------------------ svn:eol-style = native Added: ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/docs/nant.html URL: http://svn.apache.org/viewcvs/ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/docs/nant.html?view=auto&rev=161469 ============================================================================== --- ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/docs/nant.html (added) +++ ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/docs/nant.html Fri Apr 15 07:32:50 2005 @@ -0,0 +1,108 @@ +<html> + <head> + <meta http-equiv="Content-Language" content="en-us"></meta> + <title>NAnt Task</title> + </head> + + <body> + <h2><a name="dotnetexec">NAnt</a></h2> + + <h3>Description</h3> + + <p>Runs the <a href="http://nant.sourceforge.net/">NAnt</a> build + tool.</p> + + <p>You can either use an existing build file or nest a build file + (snippet) as a child into the task. If you don't specify either, + NAnt's default build file search algorithm will apply.</p> + + <h3>Parameters</h3> + <table border="1" cellpadding="2" cellspacing="0"> + <tr> + <td valign="top"><b>Attribute</b></td> + <td valign="top"><b>Description</b></td> + <td align="center" valign="top"><b>Required</b></td> + </tr> + <tr> + <td valign="top">buildfile</td> + <td valign="top">External build file to invoke NAnt on.</td> + <td align="center">No.</td> + </tr> + <tr> + <td valign="top">vm</td> + <td valign="top">Same as <a + href="dotnetexec.html">dotnetexec</a>'s vm attribute. + Specify the framework to use.</td> + <td align="center">No.</td> + </tr> + </table> + + <h3>Parameters specified as nested elements</h3> + <h4>target</h4> + + <p><code>target</code> has a single required attribute name - + specifies a target to be run.</p> + + <h4>property</h4> + + <p><code>property</code> has two required attributes. name and + value that specify name and value of a property that is to be + defined in the NAnt invocation.</p> + + <h4>build</h4> + + <p>This element allows no attributes. You can nest a NAnt build + file into it and NAnt will be executed on that. You can also nest + a build file snippet instead and Ant will wrap the necessary NAnt + <code><project> around it.</code></p> + + <h3>Examples</h3> + + <p>Let NAnt search for a *.build file in the (Ant) project's base + directory and execute the default target in it:</p> + + <pre><nant/></pre> + + <p>Let NAnt execute the targets named foo and bar in the build + file nant.build in Ant's basedir and pass the property + <code>-D:test=testvalue</code> to it:</p> + + <pre> + <nant buildfile="nant.build"> + <target name="foo"/> + <target name="bar"/> + <property name="test" value="testvalue"/> + </nant> + </pre> + + <p>Define a build file embeded into the task, let NAnt execute the + echo target of that build file.</p> + + <pre> + <nant> + <target name="echo"> + <build> + <project basedir="." default="empty"> + <target name="empty"/> + <target name="echo"> + <echo message="this is NAnt"/> + </target> + </project> + </build> + </nant> + </pre> + + <p>Run NAnt's echo task:</p> + + <pre> + <nant> + <build> + <echo message="this is NAnt"/> + </build> + </nant> + </pre> + + <hr/> + <p align="center">Copyright © 2003-2004 The Apache Software Foundation. All rights Reserved.</p> + </body> +</html> \ No newline at end of file Propchange: ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/docs/nant.html ------------------------------------------------------------------------------ svn:eol-style = native Added: ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/docs/nunit.html URL: http://svn.apache.org/viewcvs/ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/docs/nunit.html?view=auto&rev=161469 ============================================================================== --- ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/docs/nunit.html (added) +++ ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/docs/nunit.html Fri Apr 15 07:32:50 2005 @@ -0,0 +1,177 @@ +<html> + <head> + <meta http-equiv="Content-Language" content="en-us"></meta> + <title>NUnit Task</title> + </head> + + <body> + <h2><a name="dotnetexec">NUnit</a></h2> + + <h3>Description</h3> + + <p>Runs the <a href="http://www.nunit.org/">NUnit</a> console + test runner.</p> + + <h3>Parameters</h3> + <table border="1" cellpadding="2" cellspacing="0"> + <tr> + <td valign="top"><b>Attribute</b></td> + <td valign="top"><b>Description</b></td> + <td align="center" valign="top"><b>Required</b></td> + </tr> + <tr> + <td valign="top">vm</td> + <td valign="top">Same as <a + href="dotnetexec.html">dotnetexec</a>'s vm attribute. + Specify the framework to use.</td> + <td align="center">No.</td> + </tr> + <tr> + <td valign="top">config</td> + <td valign="top">Config file to use</td> + <td align="center">No.</td> + </tr> + <tr> + <td valign="top">output</td> + <td valign="top">Where test output should go.</td> + <td align="center">No.</td> + </tr> + <tr> + <td valign="top">error</td> + <td valign="top">Where test error output should go.</td> + <td align="center">No.</td> + </tr> + <tr> + <td valign="top">xmlout</td> + <td valign="top">Where NUnit's XML output should go.</td> + <td align="center">No.</td> + </tr> + <tr> + <td valign="top">transform</td> + <td valign="top">The transformation to apply.</td> + <td align="center">No.</td> + </tr> + <tr> + <td valign="top">thread</td> + <td valign="top">Causes a separate thread to be created for + running the tests - see the NUnit documentation for + details.</td> + <td align="center">No - defaults to false.</td> + </tr> + <tr> + <td valign="top">noshadow</td> + <td valign="top">Disables shadow copying of the assembly in + order to provide improved performance..</td> + <td align="center">No - defaults to false.</td> + </tr> + <tr> + <td valign="top">fixture</td> + <td valign="top">Test fixture to run.</td> + <td align="center">No.</td> + </tr> + <tr> + <td valign="top">labels</td> + <td valign="top">Causes an identifying label to be displayed + at the start of each test case.</td> + <td align="center">No - defaults to false.</td> + </tr> + <tr> + <td valign="top">failOnError</td> + <td valign="top">Stops the build if NUnit returns with a code + indicating an error or failure.</td> + <td align="center">No - defaults to false.</td> + </tr> + </table> + + <h3>Parameters specified as nested elements</h3> + <h4>testassembly</h4> + + <p><code>testassembly</code> has a single required attribute name - + specifies an assembly or a project file holding tests.</p> + + <h4>include/exclude</h4> + + <p><code>in/exclude</code> have a single required attribute name - + specifies a category to include or exclude from the tests.</p> + + <p><b>Note</b> that in current versions of NUnit (up to 2.2) you + may choose to either include or exclude categories in a run, but + not both. This task does <b>not</b> enforce this restriction + since future versions of NUnit may change behavior.</p> + + <h4>redirector</h4> + + <p>A nested <a + href="http://ant.apache.org/manual/CoreTypes/redirector.html">I/O + Redirector</a> can be specified. Any file mapping is done using a + <code>null</code> sourcefile; therefore not all <a + href="http://ant.apache.org/manual/CoreTypes/mapper.html">Mapper</a> + types will return results.</p> + + <h4>env</h4> <p>It is possible to specify environment variables to + pass to the system command via nested <code><env></code> + elements. They support the same attributes as the nested <a + href="http://ant.apache.org/manual/CoreTasks/exec.html#env"><code>env</code> + element of the <code><exec></code> task</a>.</p> + + <h3>Examples</h3> + + <h4>Specify an assembly or project:</h4> + + <pre> + <nunit> + <testassembly name="nunit.tests.dll"/> + </nunit> + </pre> + + <p>or</p> + + <pre> + <nunit> + <testassembly name="nunit.tests.csproj"/> + </nunit> + </pre> + + <h4>Specifying an Assembly and a Fixture</h4> + + <pre> + <nunit fixture="NUnit.Tests.AssertionTests"> + <testassembly name="nunit.tests.dll"/> + </nunit> + </pre> + + <h4>Specifying Test Categories to Include</h4> + + <pre> + <nunit> + <testassembly name="nunit.tests.dll"/> + <include name="Baseline"/> + </nunit> + </pre> + + <h4>Specifying the XML file name</h4> + + <pre> + <nunit xmlout="console-test.xml"> + <testassembly name="nunit.tests.dll"/> + </nunit> + </pre> + + <p>changes the name of the output file to "console-test.xml" - + note that this task will resolve file names relative to the + project's base directory, not the current working directory.</p> + + <h4>Specifying Multiple Assemblies</h4> + + <pre> + <nunit> + <testassembly name="assembly1.dll"/> + <testassembly name="assembly2.dll"/> + <testassembly name="assembly3.dll"/> + </nunit> + </pre> + + <hr/> + <p align="center">Copyright © 2004 The Apache Software Foundation. All rights Reserved.</p> + </body> +</html> \ No newline at end of file Propchange: ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/docs/nunit.html ------------------------------------------------------------------------------ svn:eol-style = native Added: ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/docs/wix.html URL: http://svn.apache.org/viewcvs/ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/docs/wix.html?view=auto&rev=161469 ============================================================================== --- ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/docs/wix.html (added) +++ ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/docs/wix.html Fri Apr 15 07:32:50 2005 @@ -0,0 +1,177 @@ +<html> + <head> + <meta http-equiv="Content-Language" content="en-us"></meta> + <title>Wix Task</title> + </head> + + <body> + <h2>Wix</h2> + + <h3>Description</h3> + + <p>Runs the candle, light or both from the <a + href="http://sourceforge.net/projects/wix">Wix</a> toolset.</p> + + <h3>Parameters</h3> + <table border="1" cellpadding="2" cellspacing="0"> + <tr> + <td valign="top"><b>Attribute</b></td> + <td valign="top"><b>Description</b></td> + <td align="center" valign="top"><b>Required</b></td> + </tr> + <tr> + <td valign="top">source</td> + <td valign="top">The single source file to process.</td> + <td align="center">Either this or at least one nested + <sources> set.</td> + </tr> + <tr> + <td valign="top">target</td> + <td valign="top">The expected target file.</td> + <td align="center">Yes, unless you run candle without light.</td> + </tr> + <tr> + <td valign="top">mode</td> + <td valign="top">Which part of the toolset to run, one of + "candle", "light" or + "both".</td> + <td align="center">No, default is "both".</td> + </tr> + <tr> + <td valign="top">vm</td> + <td valign="top">Same as <a + href="dotnetexec.html">dotnetexec</a>'s vm attribute. + Specify the framework to use.</td> + <td align="center">No.</td> + </tr> + </table> + + <h3>Parameters specified as nested elements</h3> + + <h4>sources</h4> + + <p>Specify source files that shall be passed on the command line. + This is a <a + href="http://ant.apache.org/manual/CoreTypes/fileset.html">fileset</a>.</p> + + <h4>moresources</h4> + + <p>Specify source files that shall not be passed on the command + line. This is a <a + href="http://ant.apache.org/manual/CoreTypes/fileset.html">fileset</a>.</p> + + <p>Typically this would list include files when running candle or + the files that vecome part of the MSI file when running light. + The files in this set are only used for timestamp comparisons. If + neither these files nor the given "normal" sources are + newer than the expected target, the task won't do anything.</p> + + + <h3>Examples</h3> + + <p>Create <code>product.wixobj</code> from <code>product.wxs</code>:</p> + + <pre> + <wix mode="candle" source="product.wxs"/> + </pre> + + <p>The same but using a nested sources element:</p> + + <pre> + <wix mode="candle"> + <sources dir="."> + <include name="product.wxs"/> + </sources> + </wix> + </pre> + + <p>Create <code>product.msi</code> from <code>product.wixobj</code>:</p> + + <pre> + <wix mode="light" source="product.wixobj" target="product.msi"/> + </pre> + + <p>Combine the examples into a single step:</p> + + <pre> + <wix source="product.wxs" target="product.msi"/> + </pre> + + <p>Note that the task wouldn't do anything if + <code>product.wxs</code> was older than + <code>product.wixobj</code> and <code>product.wixobj</code> was + older than <code>product.msi</code>.</p> + + <p>Compile multiple <code>.wxs</code> files at once:</p> + + <pre> + <wix mode="candle"> + <sources dir="."> + <include name="*.wxs"/> + </sources> + </wix> + </pre> + + <p>Compile multiple <code>.wxs</code> files at once, specify some + include files in addition to that:</p> + + <pre> + <wix mode="candle"> + <sources dir="."> + <include name="*.wxs"/> + </sources> + <moresources dir="."> + <include name="*.wxi"/> + </moresources> + </wix> + </pre> + + <p>Link multiple <code>.wixobj</code> files at once:</p> + + <pre> + <wix mode="light" target="product.msi"> + <sources dir="."> + <include name="*.wixobj"/> + </sources> + </wix> + </pre> + + <p>Link multiple <code>.wixobj</code> files at once and specify + that the files in directory "source" will become part of + the package:</p> + + <pre> + <wix mode="light" target="product.msi"> + <sources dir="."> + <include name="*.wixobj"/> + </sources> + <moresources dir="source"/> + </wix> + </pre> + + <pre>Combine multiple <code>.wxs</code> files and include files + into a single package and specify that the package will contain + files from the source directory:</pre> + + <pre> + <wix target="product.msi"> + <sources dir="."> + <include name="*.wxs"/> + </sources> + <moresources dir="."> + <include name="*.wxi"/> + </moresources> + <moresources dir="source"/> + </wix> + </pre> + + <p>Again, if the intermediate <code>.wixobj</code> files are newer + that the corresponding <code>.wxs</code> files (and all include + files) the candle step will be skipped. If + <code>product.msi</code> is newer than all files, the task won't + do anything.</p> + + <hr/> + <p align="center">Copyright © 2004 The Apache Software Foundation. All rights Reserved.</p> + </body> +</html> \ No newline at end of file Propchange: ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/docs/wix.html ------------------------------------------------------------------------------ svn:eol-style = native Added: ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/etc/testcases/dotnetexec.xml URL: http://svn.apache.org/viewcvs/ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/etc/testcases/dotnetexec.xml?view=auto&rev=161469 ============================================================================== --- ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/etc/testcases/dotnetexec.xml (added) +++ ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/etc/testcases/dotnetexec.xml Fri Apr 15 07:32:50 2005 @@ -0,0 +1,89 @@ +<?xml version="1.0"?> +<!-- + Copyright 2003-2004 The Apache Software Foundation + + Licensed 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="dotnet" basedir="." default="testCSC" + xmlns:dn="antlib:org.apache.tools.ant.taskdefs.optional.dotnet"> + + <property environment="env"/> + <property name="build.dir" location="build"/> + <property name="src.dir" location="src"/> + + <property name="out.csc" location="${src.dir}/out.cs"/> + <property name="out.app" location="${build.dir}/out.exe"/> + <property name="out.type" value="exe"/> + + <taskdef + uri="antlib:org.apache.tools.ant.taskdefs.optional.dotnet" + resource="org/apache/tools/ant/taskdefs/optional/dotnet/antlib.xml"> + <classpath> + <pathelement location="../../../build/lib/dotnet.jar"/> + </classpath> + </taskdef> + + <target name="probe_for_apps" > + <condition property="csc.found"> + <or> + <available file="csc" filepath="${env.PATH}" /> + <available file="csc.exe" filepath="${env.PATH}" /> + <available file="csc.exe" filepath="${env.Path}" /> + </or> + </condition> + <echo> csc.found=${csc.found}</echo> + + <!-- Mono C# compiler --> + <condition property="mcs.found"> + <available file="mcs" filepath="${env.PATH}" /> + </condition> + <echo> mcs.found=${mcs.found}</echo> + + <!-- any C# compiler --> + <condition property="c#.found"> + <or> + <isset property="csc.found"/> + <isset property="mcs.found"/> + </or> + </condition> + </target> + + <target name="init" depends="probe_for_apps"> + <mkdir dir="${build.dir}"/> + <property name="testCSC.exe" + location="${build.dir}/ExampleCsc.exe" /> + </target> + + <target name="teardown"> + <delete dir="${build.dir}"/> + </target> + + <target name="validate_csc" depends="init"> + <fail unless="c#.found">Needed C# compiler is missing</fail> + </target> + + <target name="testCSC" depends="validate_csc"> + <csc + destFile="${testCSC.exe}" + targetType="exe"> + <src dir="${src.dir}" includes="ex*.cs"/> + </csc> + <available property="app.created" file="${testCSC.exe}"/> + <fail unless="app.created">No app ${testCSC.exe} created</fail> + <dn:dotnetexec executable="${testCSC.exe}" failonerror="true" /> + <delete file="${testCSC.exe}"/> + </target> + +</project> + Propchange: ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/etc/testcases/dotnetexec.xml ------------------------------------------------------------------------------ svn:eol-style = native Added: ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/etc/testcases/msbuild.xml URL: http://svn.apache.org/viewcvs/ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/etc/testcases/msbuild.xml?view=auto&rev=161469 ============================================================================== --- ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/etc/testcases/msbuild.xml (added) +++ ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/etc/testcases/msbuild.xml Fri Apr 15 07:32:50 2005 @@ -0,0 +1,73 @@ +<?xml version="1.0"?> +<!-- + Copyright 2003-2004 The Apache Software Foundation + + Licensed 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="msbuild" basedir="." default="echo" + xmlns:dn="antlib:org.apache.tools.ant.taskdefs.optional.dotnet"> + + <taskdef + uri="antlib:org.apache.tools.ant.taskdefs.optional.dotnet" + resource="org/apache/tools/ant/taskdefs/optional/dotnet/antlib.xml"> + <classpath> + <pathelement location="../../../build/lib/dotnet.jar"/> + </classpath> + </taskdef> + + <property environment="env"/> + <condition property="msbuild.found"> + <or> + <available file="MSBuild.exe" filepath="${env.PATH}"/> + <available file="MSBuild.exe" filepath="${env.Path}"/> + <available file="MSBuild.exe"/> + </or> + </condition> + + <target name="echo"> + <msbuild + buildfile="src/msbuild.proj" + xmlns="antlib:org.apache.tools.ant.taskdefs.optional.dotnet" + > + <target name="echo"/> + <property name="foo" value="bar"/> + </msbuild> + </target> + + <target name="nested-file"> + <property name="foo" value="bar"/> + <msbuild + xmlns="antlib:org.apache.tools.ant.taskdefs.optional.dotnet" + > + <build> + <Project DefaultTargets="echo"> + <Target Name="echo"> + <Task Name="Echo" Message="foo is ${foo}"/> + </Target> + </Project> + </build> + </msbuild> + </target> + + <target name="nested-task"> + <property name="foo" value="bar"/> + <msbuild + xmlns="antlib:org.apache.tools.ant.taskdefs.optional.dotnet" + > + <build> + <Task Name="Echo" Message="foo is ${foo}"/> + </build> + </msbuild> + </target> + +</project> \ No newline at end of file Propchange: ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/etc/testcases/msbuild.xml ------------------------------------------------------------------------------ svn:eol-style = native Added: ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/etc/testcases/nant.xml URL: http://svn.apache.org/viewcvs/ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/etc/testcases/nant.xml?view=auto&rev=161469 ============================================================================== --- ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/etc/testcases/nant.xml (added) +++ ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/etc/testcases/nant.xml Fri Apr 15 07:32:50 2005 @@ -0,0 +1,72 @@ +<?xml version="1.0"?> +<!-- + Copyright 2003-2004 The Apache Software Foundation + + Licensed 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="nant" basedir="." default="echo" + xmlns:dn="antlib:org.apache.tools.ant.taskdefs.optional.dotnet"> + + <taskdef + uri="antlib:org.apache.tools.ant.taskdefs.optional.dotnet" + resource="org/apache/tools/ant/taskdefs/optional/dotnet/antlib.xml"> + <classpath> + <pathelement location="../../../build/lib/dotnet.jar"/> + </classpath> + </taskdef> + + <property environment="env"/> + <condition property="nant.found"> + <or> + <available file="NAnt.exe" filepath="${env.PATH}"/> + <available file="NAnt.exe" filepath="${env.Path}"/> + <available file="NAnt.exe"/> + </or> + </condition> + + <target name="echo"> + <nant + buildfile="src/nant.build" + xmlns="antlib:org.apache.tools.ant.taskdefs.optional.dotnet" + > + <target name="echo"/> + <property name="foo" value="bar"/> + </nant> + </target> + + <target name="nested-file"> + <property name="foo" value="bar"/> + <nant + xmlns="antlib:org.apache.tools.ant.taskdefs.optional.dotnet" + > + <build> + <project basedir="." default="echo"> + <target name="echo"> + <echo message="foo is ${foo}"/> + </target> + </project> + </build> + </nant> + </target> + + <target name="nested-task"> + <property name="foo" value="bar"/> + <nant + xmlns="antlib:org.apache.tools.ant.taskdefs.optional.dotnet" + > + <build> + <echo message="foo is ${foo}"/> + </build> + </nant> + </target> +</project> \ No newline at end of file Propchange: ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/etc/testcases/nant.xml ------------------------------------------------------------------------------ svn:eol-style = native Added: ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/etc/testcases/nunit.xml URL: http://svn.apache.org/viewcvs/ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/etc/testcases/nunit.xml?view=auto&rev=161469 ============================================================================== --- ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/etc/testcases/nunit.xml (added) +++ ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/etc/testcases/nunit.xml Fri Apr 15 07:32:50 2005 @@ -0,0 +1,81 @@ +<?xml version="1.0"?> +<!-- + Copyright 2004 The Apache Software Foundation + + Licensed 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="nunit" basedir="." default="echo" + xmlns:dn="antlib:org.apache.tools.ant.taskdefs.optional.dotnet"> + + <property name="build.dir" value="build"/> + <property name="src.dir" location="src"/> + + <taskdef + uri="antlib:org.apache.tools.ant.taskdefs.optional.dotnet" + resource="org/apache/tools/ant/taskdefs/optional/dotnet/antlib.xml"> + <classpath> + <pathelement location="../../../build/lib/dotnet.jar"/> + </classpath> + </taskdef> + + <property environment="env"/> + <condition property="nunit.found"> + <or> + <available file="nunit-console.exe" filepath="${env.PATH}"/> + <available file="nunit-console.exe" filepath="${env.Path}"/> + <available file="nunit-console.exe"/> + </or> + </condition> + + <target name="no-assembly"> + <dn:nunit/> + </target> + + <target name="compile-pass"> + <mkdir dir="${build.dir}"/> + <csc destFile="${build.dir}/Pass.dll" + targetType="library" references="nunit.framework.dll"> + <src dir="${src.dir}" includes="pass.cs"/> + </csc> + </target> + + <target name="compile-fail"> + <mkdir dir="${build.dir}"/> + <csc destFile="${build.dir}/Fail.dll" + targetType="library" references="nunit.framework.dll"> + <src dir="${src.dir}" includes="fail.cs"/> + </csc> + </target> + + <target name="passing-test" depends="compile-pass"> + <dn:nunit> + <testassembly name="${build.dir}/Pass.dll"/> + </dn:nunit> + </target> + + <target name="failing-test" depends="compile-fail"> + <dn:nunit> + <testassembly name="${build.dir}/Fail.dll"/> + </dn:nunit> + </target> + + <target name="failing-test-with-fail" depends="compile-fail"> + <dn:nunit failonerror="true"> + <testassembly name="${build.dir}/Fail.dll"/> + </dn:nunit> + </target> + + <target name="teardown"> + <delete dir="${build.dir}"/> + </target> +</project> \ No newline at end of file Propchange: ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/etc/testcases/nunit.xml ------------------------------------------------------------------------------ svn:eol-style = native Added: ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/etc/testcases/src/example.cs URL: http://svn.apache.org/viewcvs/ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/etc/testcases/src/example.cs?view=auto&rev=161469 ============================================================================== --- ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/etc/testcases/src/example.cs (added) +++ ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/etc/testcases/src/example.cs Fri Apr 15 07:32:50 2005 @@ -0,0 +1,25 @@ +/* + * Copyright 2001-2004 The Apache Software Foundation + * + * Licensed 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. + * + */ + +using System; + +public class Example { + + public static void Main(String[] args) { + Example2.echo(); + } +} Propchange: ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/etc/testcases/src/example.cs ------------------------------------------------------------------------------ svn:eol-style = native Added: ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/etc/testcases/src/example2.cs URL: http://svn.apache.org/viewcvs/ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/etc/testcases/src/example2.cs?view=auto&rev=161469 ============================================================================== --- ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/etc/testcases/src/example2.cs (added) +++ ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/etc/testcases/src/example2.cs Fri Apr 15 07:32:50 2005 @@ -0,0 +1,31 @@ +/* + * Copyright 2001-2004 The Apache Software Foundation + * + * Licensed 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. + * + */ + +using System; + +/** + * this is just here to create confusion + */ +public class Example2 { + + public int some_variable=3; + + public static void echo() { + Console.WriteLine("hello, I look like Java, but I'm really .NET"); + } + +} Propchange: ant/sandbox/antlibs/dotnet/branches/Ant_1.6.2_compatible/src/etc/testcases/src/example2.cs ------------------------------------------------------------------------------ svn:eol-style = native --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]