From: <bo...@us...> - 2009-05-04 15:10:51
|
Revision: 309 http://xmlunit.svn.sourceforge.net/xmlunit/?rev=309&view=rev Author: bodewig Date: 2009-05-04 15:10:48 +0000 (Mon, 04 May 2009) Log Message: ----------- Placeholder class file for XMLUnit-Java 2, first build system refactorings. Much more to come. Modified Paths: -------------- trunk/xmlunit/build.xml Added Paths: ----------- trunk/xmlunit/src/main/java-core/ trunk/xmlunit/src/main/java-core/net/ trunk/xmlunit/src/main/java-core/net/sf/ trunk/xmlunit/src/main/java-core/net/sf/xmlunit/ trunk/xmlunit/src/main/java-core/net/sf/xmlunit/builder/ trunk/xmlunit/src/main/java-core/net/sf/xmlunit/builder/Input.java Modified: trunk/xmlunit/build.xml =================================================================== --- trunk/xmlunit/build.xml 2009-05-04 14:19:57 UTC (rev 308) +++ trunk/xmlunit/build.xml 2009-05-04 15:10:48 UTC (rev 309) @@ -1,35 +1,19 @@ <?xml version="1.0"?> <!-- -Copyright (c) 2001-2008, Jeff Martin, Tim Bacon -All rights reserved. + Licensed to the XMLUnit developers under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + This file is licensed 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 -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: + http://www.apache.org/licenses/LICENSE-2.0 - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of the xmlunit.sourceforge.net nor the names - of its contributors may be used to endorse or promote products - derived from this software without specific prior written - permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. + 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="xmlunit" default="test" basedir="."> @@ -37,14 +21,15 @@ <property file="build.properties"/> <!-- Version --> - <property name="xmlunit.version" value="1.3alpha"/> + <property name="xmlunit.version" value="2.0alpha"/> <!-- some locations --> <property name="src.dir" value="src/main"/> <property name="test.dir" value="src/tests"/> - <property name="build.dir" location="build"/> + <property name="build.dir" location="build/java"/> <property name="lib.dir" value="${build.dir}/lib"/> - <property name="out.dir" value="${build.dir}/classes"/> + <property name="core.out.dir" value="${build.dir}/core-classes"/> + <property name="legacy.out.dir" value="${build.dir}/legacy-classes"/> <property name="test.out.dir" value="${build.dir}/test-classes"/> <property name="userguide.out.dir" value="${build.dir}/ug-classes"/> <property name="test.report.dir" value="${build.dir}/test-report"/> @@ -53,33 +38,24 @@ <property name="userguide.docs.dir" value="${docs.dir}/userguide"/> <!-- javac properties --> - <property name="javac.source" value="1.3"/> - <property name="javac.target" value="1.3"/> + <property name="javac.source" value="5"/> + <property name="javac.target" value="5"/> <property name="javac.debug" value="true"/> <!-- junit task properties --> <property name="junit.fork" value="yes"/> - <!-- some library paths --> - <!-- where is JAXP? property name="${xmlxsl.lib}" location="."/ --> - <!-- Docbook related properties, macros and targets --> <import file="docbook.xml"/> <target name="-props"> - <available property="jaxp13+" classname="javax.xml.xpath.XPath"/> - <condition property="jaxp13+.impl"> - <and> - <isset property="jaxp13+"/> - <available classname="java.net.Proxy"/> - </and> - </condition> <available property="regexp.present" classname="java.util.regex.Matcher"/> </target> <target name="-init" depends="-props"> <mkdir dir="${lib.dir}"/> - <mkdir dir="${out.dir}"/> + <mkdir dir="${core.out.dir}"/> + <mkdir dir="${legacy.out.dir}"/> <mkdir dir="${test.out.dir}"/> <mkdir dir="${test.report.dir}"/> <mkdir dir="${dist.dir}"/> @@ -91,7 +67,8 @@ description="removes created directories"> <delete includeEmptyDirs="true" quiet="true"> <fileset dir="${lib.dir}"/> - <fileset dir="${out.dir}"/> + <fileset dir="${core.out.dir}"/> + <fileset dir="${legacy.out.dir}"/> <fileset dir="${test.out.dir}"/> <fileset dir="${test.report.dir}"/> <fileset dir="${dist.dir}"/> @@ -101,27 +78,33 @@ </delete> </target> - <target name="compile" depends="-init" - description="compiles sources and tests"> - <javac srcdir="${src.dir}/legacy-java" destdir="${out.dir}" + <target name="compile-core" depends="-init" + description="compiles legacy sources and tests"> + <javac srcdir="${src.dir}/java-core" destdir="${core.out.dir}" + debug="${javac.debug}" target="${javac.target}" + source="${javac.source}"> + </javac> + </target> + + <target name="compile" depends="compile-core" + description="compiles legacy sources and tests"> + <javac srcdir="${src.dir}/legacy-java" destdir="${legacy.out.dir}" debug="${javac.debug}" target="${javac.target}" source="${javac.source}"> <classpath> - <pathelement location="${xmlxsl.lib}"/> + <pathelement location="${core.out.dir}"/> <pathelement path="${java.class.path}"/> <fileset dir="lib" includes="*.jar"/> </classpath> - <exclude name="**/jaxp13/**" unless="jaxp13+"/> <exclude name="**/*XPathRegexAssert.java" unless="regexp.present"/> </javac> <javac srcdir="${test.dir}/legacy-java" destdir="${test.out.dir}" debug="${javac.debug}" target="${javac.target}" source="${javac.source}"> <classpath> - <pathelement location="${out.dir}"/> - <pathelement location="${xmlxsl.lib}"/> + <pathelement location="${core.out.dir}"/> + <pathelement location="${legacy.out.dir}"/> <pathelement path="${java.class.path}"/> <fileset dir="lib" includes="*.jar"/> </classpath> - <exclude name="**/jaxp13/**" unless="jaxp13+"/> <exclude name="**/*XPathRegexAssert.java" unless="regexp.present"/> </javac> </target> @@ -141,9 +124,9 @@ value="org.apache.xalan.processor.TransformerFactoryImpl"/> --> <classpath> - <pathelement location="${out.dir}"/> + <pathelement location="${core.out.dir}"/> + <pathelement location="${legacy.out.dir}"/> <pathelement location="${test.out.dir}"/> - <pathelement location="${xmlxsl.lib}"/> <pathelement path="${java.class.path}"/> <fileset dir="lib" includes="*.jar"/> </classpath> @@ -151,7 +134,6 @@ <batchtest todir="${test.report.dir}"> <fileset dir="${test.dir}/legacy-java"> <include name="**/test_*.java"/> - <exclude name="**/jaxp13/**" unless="jaxp13+.impl"/> </fileset> </batchtest> </junit> @@ -202,9 +184,16 @@ <target name="jar" depends="compile" description="creates jar, Maven2 POM and Ivy file"> - <jar jarfile="${lib.dir}/xmlunit-${xmlunit.version}.jar" - basedir="${out.dir}" + <jar jarfile="${lib.dir}/xmlunit-core-${xmlunit.version}.jar" + basedir="${core.out.dir}" /> + <jar jarfile="${lib.dir}/xmlunit-legacy-${xmlunit.version}.jar" + basedir="${legacy.out.dir}" + /> + <jar jarfile="${lib.dir}/xmlunit-sumo-${xmlunit.version}.jar"> + <fileset dir="${core.out.dir}"/> + <fileset dir="${legacy.out.dir}"/> + </jar> <tstamp> <format property="ivy.publication.datetime" pattern="yyyyMMddHHmmss"/> @@ -282,7 +271,7 @@ <javac srcdir="src/user-guide" includes="org/" destdir="${userguide.out.dir}" source="1.3" target="1.2"> <classpath> - <pathelement location="${out.dir}"/> + <pathelement location="${legacy.out.dir}"/> </classpath> </javac> <delete dir="${userguide.out.dir}"/> Added: trunk/xmlunit/src/main/java-core/net/sf/xmlunit/builder/Input.java =================================================================== --- trunk/xmlunit/src/main/java-core/net/sf/xmlunit/builder/Input.java (rev 0) +++ trunk/xmlunit/src/main/java-core/net/sf/xmlunit/builder/Input.java 2009-05-04 15:10:48 UTC (rev 309) @@ -0,0 +1,44 @@ +/* + Licensed to the XMLUnit developers under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + This file is licensed 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 net.sf.xmlunit.builder; + +import javax.xml.transform.Source; +import javax.xml.transform.dom.DOMSource; +import org.w3c.dom.Document; + +public class Input { + + public static interface Builder { + Source build(); + } + + private static class DOMBuilder implements Builder { + private final Source source; + private DOMBuilder(Document d) { + source = new DOMSource(d); + } + public Source build() { + assert source != null; + return source; + } + } + + public static Builder fromDocument(Document d) { + return new DOMBuilder(d); + } +} + \ No newline at end of file Property changes on: trunk/xmlunit/src/main/java-core/net/sf/xmlunit/builder/Input.java ___________________________________________________________________ Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |