Rewriting the infrastructure to use shared common.xml
authorJaroslav Tulach <jtulach@netbeans.org>
Sat, 14 Jun 2008 09:52:52 +0200
changeset 58be49ca0fff33
parent 57 ab48f8fc0858
child 59 02e05defc6a0
Rewriting the infrastructure to use shared common.xml
samples/apifest1/day3-intermezzo/common.properties
samples/apifest1/day3-intermezzo/common.xml
samples/apifest1/day3-intermezzo/jtulach/against-pinbasedsolution/build.xml
samples/apifest1/day3-intermezzo/jtulach/against-pinbasedsolution/nbproject/project.xml
samples/apifest1/day3-intermezzo/jtulach/against-pinbasedsolution/project.properties
samples/apifest1/day3-intermezzo/jtulach/against-stackbasedsolution/build.xml
samples/apifest1/day3-intermezzo/jtulach/against-stackbasedsolution/nbproject/project.xml
samples/apifest1/day3-intermezzo/jtulach/against-stackbasedsolution/project.properties
samples/apifest1/day3-intermezzo/jtulach/against-subclassingsolution/build.xml
samples/apifest1/day3-intermezzo/jtulach/against-subclassingsolution/nbproject/project.xml
samples/apifest1/day3-intermezzo/jtulach/against-subclassingsolution/project.properties
samples/apifest1/day3-intermezzo/jtulach/against-welltestedsolution/build.xml
samples/apifest1/day3-intermezzo/jtulach/against-welltestedsolution/nbproject/project.xml
samples/apifest1/day3-intermezzo/jtulach/against-welltestedsolution/project.properties
samples/apifest1/day3-intermezzo/pnejedly/against-alwayscreatenewcircuit/build.xml
samples/apifest1/day3-intermezzo/pnejedly/against-alwayscreatenewcircuit/nbproject/project.xml
samples/apifest1/day3-intermezzo/pnejedly/against-alwayscreatenewcircuit/project.properties
samples/apifest1/day3-intermezzo/pnejedly/against-alwayscreatenewcircuit/test/apifest/CircuitTest.java
samples/apifest1/day3-intermezzo/pnejedly/against-elementbasedsolution/build.xml
samples/apifest1/day3-intermezzo/pnejedly/against-elementbasedsolution/nbproject/project.xml
samples/apifest1/day3-intermezzo/pnejedly/against-elementbasedsolution/project.properties
samples/apifest1/day3-intermezzo/pnejedly/against-inputandoperation/build.xml
samples/apifest1/day3-intermezzo/pnejedly/against-inputandoperation/nbproject/project.xml
samples/apifest1/day3-intermezzo/pnejedly/against-inputandoperation/project.properties
samples/apifest1/day3-intermezzo/pnejedly/against-inputandoperation/test/apifest/CircuitTest.java
samples/apifest1/day3-intermezzo/pnejedly/against-stackbasedsolution/build.xml
samples/apifest1/day3-intermezzo/pnejedly/against-stackbasedsolution/nbproject/project.xml
samples/apifest1/day3-intermezzo/pnejedly/against-stackbasedsolution/project.properties
samples/apifest1/day3-intermezzo/pnejedly/against-stackbasedsolution/test/apifest/CircuitTest.java
samples/apifest1/day3-intermezzo/pnejedly/against-subclassingsolution/build.xml
samples/apifest1/day3-intermezzo/pnejedly/against-subclassingsolution/nbproject/project.xml
samples/apifest1/day3-intermezzo/pnejedly/against-subclassingsolution/project.properties
samples/apifest1/day3-intermezzo/pnejedly/against-welltestedsolution/build.xml
samples/apifest1/day3-intermezzo/pnejedly/against-welltestedsolution/nbproject/project.xml
samples/apifest1/day3-intermezzo/pnejedly/against-welltestedsolution/project.properties
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/samples/apifest1/day3-intermezzo/common.properties	Sat Jun 14 09:52:52 2008 +0200
     1.3 @@ -0,0 +1,5 @@
     1.4 +
     1.5 +# location to root of the repository with apifest projects
     1.6 +apifest=${ant.file.common}/../../
     1.7 +# and where is junit?
     1.8 +junit.jar=${apifest}/../libs/dist/junit-4.4.jar
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/samples/apifest1/day3-intermezzo/common.xml	Sat Jun 14 09:52:52 2008 +0200
     2.3 @@ -0,0 +1,105 @@
     2.4 +<?xml version="1.0" encoding="UTF-8"?>
     2.5 +<!-- this is a template file to test  -->
     2.6 +<project name="common" default="run" basedir=".">
     2.7 +    <description>Builds the test against first version and runs them against two</description>
     2.8 +    
     2.9 +    <loadproperties srcfile="${ant.file.common}/../common.properties"/>
    2.10 +    <loadproperties srcfile="project.properties"/>
    2.11 +    
    2.12 +    <target name="make-sure-projects-are-compiled">
    2.13 +        <ant dir="${dayA}/${apitotest}" target="compile"/>
    2.14 +        <ant dir="${dayB}/${apitotest}" target="compile"/>
    2.15 +    </target>
    2.16 +    
    2.17 +    <target name="compile" depends="make-sure-projects-are-compiled">
    2.18 +        <mkdir dir="build/tests"/>
    2.19 +        <echo level="info" message="Compiling the tests against old version of the API"/>
    2.20 +        <javac destdir="build/tests" srcdir="test">
    2.21 +            <classpath>
    2.22 +                <pathelement location="${apiA}"/>
    2.23 +                <pathelement location="${junit.jar}"/>
    2.24 +            </classpath>
    2.25 +        </javac>
    2.26 +    </target>
    2.27 +    
    2.28 +    <target name="run" depends="-run-binary-check,-run-source-check">
    2.29 +        <fail message="The test shall either compile against A and not B or run on A and fail on B, nothing like that happened">
    2.30 +            <condition>
    2.31 +                <not><or>
    2.32 +                    <isset property="execution.failed"/>
    2.33 +                    <isset property="compilation.failed"/>
    2.34 +                </or></not>
    2.35 +            </condition>
    2.36 +        </fail>
    2.37 +    </target>
    2.38 +        
    2.39 +    <target name="-run-binary-check" depends="compile">
    2.40 +        <mkdir dir="build/testresultA"/>
    2.41 +
    2.42 +        <echo level="info" message="Running the tests against old version of the API"/>
    2.43 +        <junit dir="build/tests" failureproperty="run.on.A.shall.succeed" fork="true">
    2.44 +            <batchtest todir="build/testresultA">
    2.45 +                <fileset dir="test" includes="**/*.java"/>
    2.46 +            </batchtest>
    2.47 +            <formatter type="brief" usefile="false"/>
    2.48 +            <formatter type="xml"/>
    2.49 +            <classpath>
    2.50 +                <pathelement location="${apiA}"/>
    2.51 +                <pathelement location="${junit.jar}"/>
    2.52 +                <pathelement location="build/tests"/>
    2.53 +            </classpath>
    2.54 +        </junit>
    2.55 +        
    2.56 +        <mkdir dir="build/testresultB"/>
    2.57 +        <echo level="info" message="Running the same tests against new version of the API, this should fail, if there is binary or functional incompatibility"/>
    2.58 +        <junit dir="build/tests" failureproperty="run.on.B.shall.fail" fork="true">
    2.59 +            <batchtest todir="build/testresultB">
    2.60 +                <fileset dir="test" includes="**/*.java"/>
    2.61 +            </batchtest>
    2.62 +            <formatter type="brief" usefile="false"/>
    2.63 +            <formatter type="xml"/>
    2.64 +            <classpath>
    2.65 +                <pathelement location="${apiB}"/>
    2.66 +                <pathelement location="${junit.jar}"/>
    2.67 +                <pathelement location="build/tests"/>
    2.68 +            </classpath>
    2.69 +        </junit>
    2.70 +        
    2.71 +        <condition property="execution.failed">
    2.72 +            <and>
    2.73 +                <isset property="run.on.B.shall.fail"/>
    2.74 +                <not><isset property="run.on.A.shall.succeed"/></not>
    2.75 +            </and>
    2.76 +        </condition>
    2.77 +    </target>
    2.78 +    
    2.79 +    <target name="-run-source-check" depends="compile" unless="execution.failed">
    2.80 +        
    2.81 +        <property name="build.b" location="build/verifyitbuildsagainstB"/>
    2.82 +        <delete dir="${build.b}"/>
    2.83 +        <mkdir dir="${build.b}"/>
    2.84 +
    2.85 +        
    2.86 +        <echo level="info" message="Verifying source compatibility: Compiling the tests against new version of the API"/>
    2.87 +        <javac destdir="${build.b}" srcdir="test" failonerror="false" fork="true">
    2.88 +            <classpath>
    2.89 +                <pathelement location="${apiB}"/>
    2.90 +                <pathelement location="${junit.jar}"/>
    2.91 +            </classpath>
    2.92 +        </javac>
    2.93 +
    2.94 +        
    2.95 +        <uptodate property="compilation.failed">
    2.96 +            <srcfiles dir="${build.b}" includes="**/*.class"/>
    2.97 +            <mapper type="glob" from="*" to="build/tests/*"/>
    2.98 +        </uptodate>
    2.99 +        
   2.100 +
   2.101 +    </target>
   2.102 +    
   2.103 +    <target name="test" depends="run"/>
   2.104 +    
   2.105 +    <target name="clean">
   2.106 +        <delete dir="build"/>
   2.107 +    </target>
   2.108 +</project>    
     3.1 --- a/samples/apifest1/day3-intermezzo/jtulach/against-pinbasedsolution/build.xml	Sat Jun 14 09:52:51 2008 +0200
     3.2 +++ b/samples/apifest1/day3-intermezzo/jtulach/against-pinbasedsolution/build.xml	Sat Jun 14 09:52:52 2008 +0200
     3.3 @@ -1,104 +1,5 @@
     3.4  <?xml version="1.0" encoding="UTF-8"?>
     3.5  <!-- this is a template file to test  -->
     3.6  <project name="testing-template" default="run" basedir=".">
     3.7 -    <description>Builds the test against first version and runs them against two</description>
     3.8 -    
     3.9 -    <loadproperties srcfile="project.properties"/>
    3.10 -    
    3.11 -    <target name="make-sure-projects-are-compiled">
    3.12 -        <ant dir="${dayA}/${apitotest}" target="compile"/>
    3.13 -        <ant dir="${dayB}/${apitotest}" target="compile"/>
    3.14 -    </target>
    3.15 -    
    3.16 -    <target name="compile" depends="make-sure-projects-are-compiled">
    3.17 -        <mkdir dir="build/tests"/>
    3.18 -        <echo level="info" message="Compiling the tests against old version of the API"/>
    3.19 -        <javac destdir="build/tests" srcdir="test">
    3.20 -            <classpath>
    3.21 -                <pathelement location="${apiA}"/>
    3.22 -                <pathelement location="${junit.jar}"/>
    3.23 -            </classpath>
    3.24 -        </javac>
    3.25 -    </target>
    3.26 -    
    3.27 -    <target name="run" depends="-run-binary-check,-run-source-check">
    3.28 -        <fail message="The test shall either compile against A and not B or run on A and fail on B, nothing like that happened">
    3.29 -            <condition>
    3.30 -                <not><or>
    3.31 -                    <isset property="execution.failed"/>
    3.32 -                    <isset property="compilation.failed"/>
    3.33 -                </or></not>
    3.34 -            </condition>
    3.35 -        </fail>
    3.36 -    </target>
    3.37 -        
    3.38 -    <target name="-run-binary-check" depends="compile">
    3.39 -        <mkdir dir="build/testresultA"/>
    3.40 -
    3.41 -        <echo level="info" message="Running the tests against old version of the API"/>
    3.42 -        <junit dir="build/tests" failureproperty="run.on.A.shall.succeed" fork="true">
    3.43 -            <batchtest todir="build/testresultA">
    3.44 -                <fileset dir="test" includes="**/*.java"/>
    3.45 -            </batchtest>
    3.46 -            <formatter type="brief" usefile="false"/>
    3.47 -            <formatter type="xml"/>
    3.48 -            <classpath>
    3.49 -                <pathelement location="${apiA}"/>
    3.50 -                <pathelement location="${junit.jar}"/>
    3.51 -                <pathelement location="build/tests"/>
    3.52 -            </classpath>
    3.53 -        </junit>
    3.54 -        
    3.55 -        <mkdir dir="build/testresultB"/>
    3.56 -        <echo level="info" message="Running the same tests against new version of the API, this should fail, if there is binary or functional incompatibility"/>
    3.57 -        <junit dir="build/tests" failureproperty="run.on.B.shall.fail" fork="true">
    3.58 -            <batchtest todir="build/testresultB">
    3.59 -                <fileset dir="test" includes="**/*.java"/>
    3.60 -            </batchtest>
    3.61 -            <formatter type="brief" usefile="false"/>
    3.62 -            <formatter type="xml"/>
    3.63 -            <classpath>
    3.64 -                <pathelement location="${apiB}"/>
    3.65 -                <pathelement location="${junit.jar}"/>
    3.66 -                <pathelement location="build/tests"/>
    3.67 -            </classpath>
    3.68 -        </junit>
    3.69 -        
    3.70 -        <condition property="execution.failed">
    3.71 -            <and>
    3.72 -                <isset property="run.on.B.shall.fail"/>
    3.73 -                <not><isset property="run.on.A.shall.succeed"/></not>
    3.74 -            </and>
    3.75 -        </condition>
    3.76 -    </target>
    3.77 -    
    3.78 -    <target name="-run-source-check" depends="compile" unless="execution.failed">
    3.79 -        
    3.80 -        <property name="build.b" location="build/verifyitbuildsagainstB"/>
    3.81 -        <delete dir="${build.b}"/>
    3.82 -        <mkdir dir="${build.b}"/>
    3.83 -
    3.84 -        
    3.85 -        <echo level="info" message="Verifying source compatibility: Compiling the tests against new version of the API"/>
    3.86 -        <javac destdir="${build.b}" srcdir="test" failonerror="false" fork="true">
    3.87 -            <classpath>
    3.88 -                <pathelement location="${apiB}"/>
    3.89 -                <pathelement location="${junit.jar}"/>
    3.90 -            </classpath>
    3.91 -        </javac>
    3.92 -
    3.93 -        
    3.94 -        <uptodate property="compilation.failed">
    3.95 -            <srcfiles dir="${build.b}" includes="**/*.class"/>
    3.96 -            <mapper type="glob" from="*" to="build/tests/*"/>
    3.97 -        </uptodate>
    3.98 -        
    3.99 -
   3.100 -    </target>
   3.101 -    
   3.102 -    <target name="test" depends="run"/>
   3.103 -    
   3.104 -    <target name="clean">
   3.105 -        <delete dir="build"/>
   3.106 -    </target>
   3.107 +    <import file="../../common.xml"/>
   3.108  </project>    
     4.1 --- a/samples/apifest1/day3-intermezzo/jtulach/against-pinbasedsolution/nbproject/project.xml	Sat Jun 14 09:52:51 2008 +0200
     4.2 +++ b/samples/apifest1/day3-intermezzo/jtulach/against-pinbasedsolution/nbproject/project.xml	Sat Jun 14 09:52:52 2008 +0200
     4.3 @@ -7,7 +7,9 @@
     4.4              <name>testing template</name>
     4.5              <properties>
     4.6                  <property name="ant.script">build.xml</property>
     4.7 +                <property name="apifest">../../../</property>
     4.8                  <property-file>project.properties</property-file>
     4.9 +                <property-file>../../common.properties</property-file>
    4.10              </properties>
    4.11              <folders>
    4.12                  <source-folder>
     5.1 --- a/samples/apifest1/day3-intermezzo/jtulach/against-pinbasedsolution/project.properties	Sat Jun 14 09:52:51 2008 +0200
     5.2 +++ b/samples/apifest1/day3-intermezzo/jtulach/against-pinbasedsolution/project.properties	Sat Jun 14 09:52:52 2008 +0200
     5.3 @@ -1,8 +1,3 @@
     5.4 -
     5.5 -# location to root of the repository with apifest projects
     5.6 -apifest=../../..
     5.7 -# and where is junit?
     5.8 -junit.jar=../../../../libs/dist/junit-4.4.jar
     5.9  
    5.10  # name of a project to test
    5.11  apitotest=todo:specify_this_property_in:project.properties
     6.1 --- a/samples/apifest1/day3-intermezzo/jtulach/against-stackbasedsolution/build.xml	Sat Jun 14 09:52:51 2008 +0200
     6.2 +++ b/samples/apifest1/day3-intermezzo/jtulach/against-stackbasedsolution/build.xml	Sat Jun 14 09:52:52 2008 +0200
     6.3 @@ -1,104 +1,5 @@
     6.4  <?xml version="1.0" encoding="UTF-8"?>
     6.5  <!-- this is a template file to test  -->
     6.6  <project name="testing-template" default="run" basedir=".">
     6.7 -    <description>Builds the test against first version and runs them against two</description>
     6.8 -    
     6.9 -    <loadproperties srcfile="project.properties"/>
    6.10 -    
    6.11 -    <target name="make-sure-projects-are-compiled">
    6.12 -        <ant dir="${dayA}/${apitotest}" target="compile"/>
    6.13 -        <ant dir="${dayB}/${apitotest}" target="compile"/>
    6.14 -    </target>
    6.15 -    
    6.16 -    <target name="compile" depends="make-sure-projects-are-compiled">
    6.17 -        <mkdir dir="build/tests"/>
    6.18 -        <echo level="info" message="Compiling the tests against old version of the API"/>
    6.19 -        <javac destdir="build/tests" srcdir="test">
    6.20 -            <classpath>
    6.21 -                <pathelement location="${apiA}"/>
    6.22 -                <pathelement location="${junit.jar}"/>
    6.23 -            </classpath>
    6.24 -        </javac>
    6.25 -    </target>
    6.26 -    
    6.27 -    <target name="run" depends="-run-binary-check,-run-source-check">
    6.28 -        <fail message="The test shall either compile against A and not B or run on A and fail on B, nothing like that happened">
    6.29 -            <condition>
    6.30 -                <not><or>
    6.31 -                    <isset property="execution.failed"/>
    6.32 -                    <isset property="compilation.failed"/>
    6.33 -                </or></not>
    6.34 -            </condition>
    6.35 -        </fail>
    6.36 -    </target>
    6.37 -        
    6.38 -    <target name="-run-binary-check" depends="compile">
    6.39 -        <mkdir dir="build/testresultA"/>
    6.40 -
    6.41 -        <echo level="info" message="Running the tests against old version of the API"/>
    6.42 -        <junit dir="build/tests" failureproperty="run.on.A.shall.succeed" fork="true">
    6.43 -            <batchtest todir="build/testresultA">
    6.44 -                <fileset dir="test" includes="**/*.java"/>
    6.45 -            </batchtest>
    6.46 -            <formatter type="brief" usefile="false"/>
    6.47 -            <formatter type="xml"/>
    6.48 -            <classpath>
    6.49 -                <pathelement location="${apiA}"/>
    6.50 -                <pathelement location="${junit.jar}"/>
    6.51 -                <pathelement location="build/tests"/>
    6.52 -            </classpath>
    6.53 -        </junit>
    6.54 -        
    6.55 -        <mkdir dir="build/testresultB"/>
    6.56 -        <echo level="info" message="Running the same tests against new version of the API, this should fail, if there is binary or functional incompatibility"/>
    6.57 -        <junit dir="build/tests" failureproperty="run.on.B.shall.fail" fork="true">
    6.58 -            <batchtest todir="build/testresultB">
    6.59 -                <fileset dir="test" includes="**/*.java"/>
    6.60 -            </batchtest>
    6.61 -            <formatter type="brief" usefile="false"/>
    6.62 -            <formatter type="xml"/>
    6.63 -            <classpath>
    6.64 -                <pathelement location="${apiB}"/>
    6.65 -                <pathelement location="${junit.jar}"/>
    6.66 -                <pathelement location="build/tests"/>
    6.67 -            </classpath>
    6.68 -        </junit>
    6.69 -        
    6.70 -        <condition property="execution.failed">
    6.71 -            <and>
    6.72 -                <isset property="run.on.B.shall.fail"/>
    6.73 -                <not><isset property="run.on.A.shall.succeed"/></not>
    6.74 -            </and>
    6.75 -        </condition>
    6.76 -    </target>
    6.77 -    
    6.78 -    <target name="-run-source-check" depends="compile" unless="execution.failed">
    6.79 -        
    6.80 -        <property name="build.b" location="build/verifyitbuildsagainstB"/>
    6.81 -        <delete dir="${build.b}"/>
    6.82 -        <mkdir dir="${build.b}"/>
    6.83 -
    6.84 -        
    6.85 -        <echo level="info" message="Verifying source compatibility: Compiling the tests against new version of the API"/>
    6.86 -        <javac destdir="${build.b}" srcdir="test" failonerror="false" fork="true">
    6.87 -            <classpath>
    6.88 -                <pathelement location="${apiB}"/>
    6.89 -                <pathelement location="${junit.jar}"/>
    6.90 -            </classpath>
    6.91 -        </javac>
    6.92 -
    6.93 -        
    6.94 -        <uptodate property="compilation.failed">
    6.95 -            <srcfiles dir="${build.b}" includes="**/*.class"/>
    6.96 -            <mapper type="glob" from="*" to="build/tests/*"/>
    6.97 -        </uptodate>
    6.98 -        
    6.99 -
   6.100 -    </target>
   6.101 -    
   6.102 -    <target name="test" depends="run"/>
   6.103 -    
   6.104 -    <target name="clean">
   6.105 -        <delete dir="build"/>
   6.106 -    </target>
   6.107 +    <import file="../../common.xml"/>
   6.108  </project>    
     7.1 --- a/samples/apifest1/day3-intermezzo/jtulach/against-stackbasedsolution/nbproject/project.xml	Sat Jun 14 09:52:51 2008 +0200
     7.2 +++ b/samples/apifest1/day3-intermezzo/jtulach/against-stackbasedsolution/nbproject/project.xml	Sat Jun 14 09:52:52 2008 +0200
     7.3 @@ -7,7 +7,9 @@
     7.4              <name>Against Stack Based Solution</name>
     7.5              <properties>
     7.6                  <property name="ant.script">build.xml</property>
     7.7 +                <property name="apifest">../../../</property>
     7.8                  <property-file>project.properties</property-file>
     7.9 +                <property-file>../../common.properties</property-file>
    7.10              </properties>
    7.11              <folders>
    7.12                  <source-folder>
     8.1 --- a/samples/apifest1/day3-intermezzo/jtulach/against-stackbasedsolution/project.properties	Sat Jun 14 09:52:51 2008 +0200
     8.2 +++ b/samples/apifest1/day3-intermezzo/jtulach/against-stackbasedsolution/project.properties	Sat Jun 14 09:52:52 2008 +0200
     8.3 @@ -1,8 +1,3 @@
     8.4 -
     8.5 -# location to root of the repository with apifest projects
     8.6 -apifest=../../..
     8.7 -# and where is junit?
     8.8 -junit.jar=../../../../libs/dist/junit-4.4.jar
     8.9  
    8.10  # name of a project to test
    8.11  apitotest=stackbasedsolution
     9.1 --- a/samples/apifest1/day3-intermezzo/jtulach/against-subclassingsolution/build.xml	Sat Jun 14 09:52:51 2008 +0200
     9.2 +++ b/samples/apifest1/day3-intermezzo/jtulach/against-subclassingsolution/build.xml	Sat Jun 14 09:52:52 2008 +0200
     9.3 @@ -1,104 +1,5 @@
     9.4  <?xml version="1.0" encoding="UTF-8"?>
     9.5  <!-- this is a template file to test  -->
     9.6  <project name="testing-template" default="run" basedir=".">
     9.7 -    <description>Builds the test against first version and runs them against two</description>
     9.8 -    
     9.9 -    <loadproperties srcfile="project.properties"/>
    9.10 -    
    9.11 -    <target name="make-sure-projects-are-compiled">
    9.12 -        <ant dir="${dayA}/${apitotest}" target="compile"/>
    9.13 -        <ant dir="${dayB}/${apitotest}" target="compile"/>
    9.14 -    </target>
    9.15 -    
    9.16 -    <target name="compile" depends="make-sure-projects-are-compiled">
    9.17 -        <mkdir dir="build/tests"/>
    9.18 -        <echo level="info" message="Compiling the tests against old version of the API"/>
    9.19 -        <javac destdir="build/tests" srcdir="test">
    9.20 -            <classpath>
    9.21 -                <pathelement location="${apiA}"/>
    9.22 -                <pathelement location="${junit.jar}"/>
    9.23 -            </classpath>
    9.24 -        </javac>
    9.25 -    </target>
    9.26 -    
    9.27 -    <target name="run" depends="-run-binary-check,-run-source-check">
    9.28 -        <fail message="The test shall either compile against A and not B or run on A and fail on B, nothing like that happened">
    9.29 -            <condition>
    9.30 -                <not><or>
    9.31 -                    <isset property="execution.failed"/>
    9.32 -                    <isset property="compilation.failed"/>
    9.33 -                </or></not>
    9.34 -            </condition>
    9.35 -        </fail>
    9.36 -    </target>
    9.37 -        
    9.38 -    <target name="-run-binary-check" depends="compile">
    9.39 -        <mkdir dir="build/testresultA"/>
    9.40 -
    9.41 -        <echo level="info" message="Running the tests against old version of the API"/>
    9.42 -        <junit dir="build/tests" failureproperty="run.on.A.shall.succeed" fork="true">
    9.43 -            <batchtest todir="build/testresultA">
    9.44 -                <fileset dir="test" includes="**/*.java"/>
    9.45 -            </batchtest>
    9.46 -            <formatter type="brief" usefile="false"/>
    9.47 -            <formatter type="xml"/>
    9.48 -            <classpath>
    9.49 -                <pathelement location="${apiA}"/>
    9.50 -                <pathelement location="${junit.jar}"/>
    9.51 -                <pathelement location="build/tests"/>
    9.52 -            </classpath>
    9.53 -        </junit>
    9.54 -        
    9.55 -        <mkdir dir="build/testresultB"/>
    9.56 -        <echo level="info" message="Running the same tests against new version of the API, this should fail, if there is binary or functional incompatibility"/>
    9.57 -        <junit dir="build/tests" failureproperty="run.on.B.shall.fail" fork="true">
    9.58 -            <batchtest todir="build/testresultB">
    9.59 -                <fileset dir="test" includes="**/*.java"/>
    9.60 -            </batchtest>
    9.61 -            <formatter type="brief" usefile="false"/>
    9.62 -            <formatter type="xml"/>
    9.63 -            <classpath>
    9.64 -                <pathelement location="${apiB}"/>
    9.65 -                <pathelement location="${junit.jar}"/>
    9.66 -                <pathelement location="build/tests"/>
    9.67 -            </classpath>
    9.68 -        </junit>
    9.69 -        
    9.70 -        <condition property="execution.failed">
    9.71 -            <and>
    9.72 -                <isset property="run.on.B.shall.fail"/>
    9.73 -                <not><isset property="run.on.A.shall.succeed"/></not>
    9.74 -            </and>
    9.75 -        </condition>
    9.76 -    </target>
    9.77 -    
    9.78 -    <target name="-run-source-check" depends="compile" unless="execution.failed">
    9.79 -        
    9.80 -        <property name="build.b" location="build/verifyitbuildsagainstB"/>
    9.81 -        <delete dir="${build.b}"/>
    9.82 -        <mkdir dir="${build.b}"/>
    9.83 -
    9.84 -        
    9.85 -        <echo level="info" message="Verifying source compatibility: Compiling the tests against new version of the API"/>
    9.86 -        <javac destdir="${build.b}" srcdir="test" failonerror="false" fork="true">
    9.87 -            <classpath>
    9.88 -                <pathelement location="${apiB}"/>
    9.89 -                <pathelement location="${junit.jar}"/>
    9.90 -            </classpath>
    9.91 -        </javac>
    9.92 -
    9.93 -        
    9.94 -        <uptodate property="compilation.failed">
    9.95 -            <srcfiles dir="${build.b}" includes="**/*.class"/>
    9.96 -            <mapper type="glob" from="*" to="build/tests/*"/>
    9.97 -        </uptodate>
    9.98 -        
    9.99 -
   9.100 -    </target>
   9.101 -    
   9.102 -    <target name="test" depends="run"/>
   9.103 -    
   9.104 -    <target name="clean">
   9.105 -        <delete dir="build"/>
   9.106 -    </target>
   9.107 +    <import file="../../common.xml"/>
   9.108  </project>    
    10.1 --- a/samples/apifest1/day3-intermezzo/jtulach/against-subclassingsolution/nbproject/project.xml	Sat Jun 14 09:52:51 2008 +0200
    10.2 +++ b/samples/apifest1/day3-intermezzo/jtulach/against-subclassingsolution/nbproject/project.xml	Sat Jun 14 09:52:52 2008 +0200
    10.3 @@ -7,7 +7,9 @@
    10.4              <name>Against Subclassing Solution</name>
    10.5              <properties>
    10.6                  <property name="ant.script">build.xml</property>
    10.7 +                <property name="apifest">../../../</property>
    10.8                  <property-file>project.properties</property-file>
    10.9 +                <property-file>../../common.properties</property-file>
   10.10              </properties>
   10.11              <folders>
   10.12                  <source-folder>
    11.1 --- a/samples/apifest1/day3-intermezzo/jtulach/against-subclassingsolution/project.properties	Sat Jun 14 09:52:51 2008 +0200
    11.2 +++ b/samples/apifest1/day3-intermezzo/jtulach/against-subclassingsolution/project.properties	Sat Jun 14 09:52:52 2008 +0200
    11.3 @@ -1,8 +1,3 @@
    11.4 -
    11.5 -# location to root of the repository with apifest projects
    11.6 -apifest=../../..
    11.7 -# and where is junit?
    11.8 -junit.jar=../../../../libs/dist/junit-4.4.jar
    11.9  
   11.10  # name of a project to test
   11.11  apitotest=subclassingsolution
    12.1 --- a/samples/apifest1/day3-intermezzo/jtulach/against-welltestedsolution/build.xml	Sat Jun 14 09:52:51 2008 +0200
    12.2 +++ b/samples/apifest1/day3-intermezzo/jtulach/against-welltestedsolution/build.xml	Sat Jun 14 09:52:52 2008 +0200
    12.3 @@ -1,104 +1,5 @@
    12.4  <?xml version="1.0" encoding="UTF-8"?>
    12.5  <!-- this is a template file to test  -->
    12.6  <project name="testing-template" default="run" basedir=".">
    12.7 -    <description>Builds the test against first version and runs them against two</description>
    12.8 -    
    12.9 -    <loadproperties srcfile="project.properties"/>
   12.10 -    
   12.11 -    <target name="make-sure-projects-are-compiled">
   12.12 -        <ant dir="${dayA}/${apitotest}" target="compile"/>
   12.13 -        <ant dir="${dayB}/${apitotest}" target="compile"/>
   12.14 -    </target>
   12.15 -    
   12.16 -    <target name="compile" depends="make-sure-projects-are-compiled">
   12.17 -        <mkdir dir="build/tests"/>
   12.18 -        <echo level="info" message="Compiling the tests against old version of the API"/>
   12.19 -        <javac destdir="build/tests" srcdir="test">
   12.20 -            <classpath>
   12.21 -                <pathelement location="${apiA}"/>
   12.22 -                <pathelement location="${junit.jar}"/>
   12.23 -            </classpath>
   12.24 -        </javac>
   12.25 -    </target>
   12.26 -    
   12.27 -    <target name="run" depends="-run-binary-check,-run-source-check">
   12.28 -        <fail message="The test shall either compile against A and not B or run on A and fail on B, nothing like that happened">
   12.29 -            <condition>
   12.30 -                <not><or>
   12.31 -                    <isset property="execution.failed"/>
   12.32 -                    <isset property="compilation.failed"/>
   12.33 -                </or></not>
   12.34 -            </condition>
   12.35 -        </fail>
   12.36 -    </target>
   12.37 -        
   12.38 -    <target name="-run-binary-check" depends="compile">
   12.39 -        <mkdir dir="build/testresultA"/>
   12.40 -
   12.41 -        <echo level="info" message="Running the tests against old version of the API"/>
   12.42 -        <junit dir="build/tests" failureproperty="run.on.A.shall.succeed" fork="true">
   12.43 -            <batchtest todir="build/testresultA">
   12.44 -                <fileset dir="test" includes="**/*.java"/>
   12.45 -            </batchtest>
   12.46 -            <formatter type="brief" usefile="false"/>
   12.47 -            <formatter type="xml"/>
   12.48 -            <classpath>
   12.49 -                <pathelement location="${apiA}"/>
   12.50 -                <pathelement location="${junit.jar}"/>
   12.51 -                <pathelement location="build/tests"/>
   12.52 -            </classpath>
   12.53 -        </junit>
   12.54 -        
   12.55 -        <mkdir dir="build/testresultB"/>
   12.56 -        <echo level="info" message="Running the same tests against new version of the API, this should fail, if there is binary or functional incompatibility"/>
   12.57 -        <junit dir="build/tests" failureproperty="run.on.B.shall.fail" fork="true">
   12.58 -            <batchtest todir="build/testresultB">
   12.59 -                <fileset dir="test" includes="**/*.java"/>
   12.60 -            </batchtest>
   12.61 -            <formatter type="brief" usefile="false"/>
   12.62 -            <formatter type="xml"/>
   12.63 -            <classpath>
   12.64 -                <pathelement location="${apiB}"/>
   12.65 -                <pathelement location="${junit.jar}"/>
   12.66 -                <pathelement location="build/tests"/>
   12.67 -            </classpath>
   12.68 -        </junit>
   12.69 -        
   12.70 -        <condition property="execution.failed">
   12.71 -            <and>
   12.72 -                <isset property="run.on.B.shall.fail"/>
   12.73 -                <not><isset property="run.on.A.shall.succeed"/></not>
   12.74 -            </and>
   12.75 -        </condition>
   12.76 -    </target>
   12.77 -    
   12.78 -    <target name="-run-source-check" depends="compile" unless="execution.failed">
   12.79 -        
   12.80 -        <property name="build.b" location="build/verifyitbuildsagainstB"/>
   12.81 -        <delete dir="${build.b}"/>
   12.82 -        <mkdir dir="${build.b}"/>
   12.83 -
   12.84 -        
   12.85 -        <echo level="info" message="Verifying source compatibility: Compiling the tests against new version of the API"/>
   12.86 -        <javac destdir="${build.b}" srcdir="test" failonerror="false" fork="true">
   12.87 -            <classpath>
   12.88 -                <pathelement location="${apiB}"/>
   12.89 -                <pathelement location="${junit.jar}"/>
   12.90 -            </classpath>
   12.91 -        </javac>
   12.92 -
   12.93 -        
   12.94 -        <uptodate property="compilation.failed">
   12.95 -            <srcfiles dir="${build.b}" includes="**/*.class"/>
   12.96 -            <mapper type="glob" from="*" to="build/tests/*"/>
   12.97 -        </uptodate>
   12.98 -        
   12.99 -
  12.100 -    </target>
  12.101 -    
  12.102 -    <target name="test" depends="run"/>
  12.103 -    
  12.104 -    <target name="clean">
  12.105 -        <delete dir="build"/>
  12.106 -    </target>
  12.107 +    <import file="../../common.xml"/>
  12.108  </project>    
    13.1 --- a/samples/apifest1/day3-intermezzo/jtulach/against-welltestedsolution/nbproject/project.xml	Sat Jun 14 09:52:51 2008 +0200
    13.2 +++ b/samples/apifest1/day3-intermezzo/jtulach/against-welltestedsolution/nbproject/project.xml	Sat Jun 14 09:52:52 2008 +0200
    13.3 @@ -7,7 +7,9 @@
    13.4              <name>Against Subclassing Solution</name>
    13.5              <properties>
    13.6                  <property name="ant.script">build.xml</property>
    13.7 +                <property name="apifest">../../../</property>
    13.8                  <property-file>project.properties</property-file>
    13.9 +                <property-file>../../common.properties</property-file>
   13.10              </properties>
   13.11              <folders>
   13.12                  <source-folder>
    14.1 --- a/samples/apifest1/day3-intermezzo/jtulach/against-welltestedsolution/project.properties	Sat Jun 14 09:52:51 2008 +0200
    14.2 +++ b/samples/apifest1/day3-intermezzo/jtulach/against-welltestedsolution/project.properties	Sat Jun 14 09:52:52 2008 +0200
    14.3 @@ -1,8 +1,3 @@
    14.4 -
    14.5 -# location to root of the repository with apifest projects
    14.6 -apifest=../../..
    14.7 -# and where is junit?
    14.8 -junit.jar=../../../../libs/dist/junit-4.4.jar
    14.9  
   14.10  # name of a project to test
   14.11  apitotest=welltestedsolution
    15.1 --- a/samples/apifest1/day3-intermezzo/pnejedly/against-alwayscreatenewcircuit/build.xml	Sat Jun 14 09:52:51 2008 +0200
    15.2 +++ b/samples/apifest1/day3-intermezzo/pnejedly/against-alwayscreatenewcircuit/build.xml	Sat Jun 14 09:52:52 2008 +0200
    15.3 @@ -1,97 +1,5 @@
    15.4  <?xml version="1.0" encoding="UTF-8"?>
    15.5  <!-- this is a template file to test  -->
    15.6  <project name="testing-template" default="run" basedir=".">
    15.7 -    <description>Builds the test against first version and runs them against two</description>
    15.8 -    
    15.9 -    <loadproperties srcfile="project.properties"/>
   15.10 -    
   15.11 -    <target name="make-sure-projects-are-compiled">
   15.12 -        <ant dir="${dayA}/${apitotest}" target="compile"/>
   15.13 -        <ant dir="${dayB}/${apitotest}" target="compile"/>
   15.14 -    </target>
   15.15 -    
   15.16 -    <target name="compile" depends="make-sure-projects-are-compiled">
   15.17 -        <mkdir dir="build/tests"/>
   15.18 -        <javac destdir="build/tests" srcdir="test">
   15.19 -            <classpath>
   15.20 -                <pathelement location="${apiA}"/>
   15.21 -                <pathelement location="${apifest}/lib/junit-3.8.2.jar"/>
   15.22 -            </classpath>
   15.23 -        </javac>
   15.24 -    </target>
   15.25 -    
   15.26 -    <target name="run" depends="-run-binary-check,-run-source-check">
   15.27 -        <fail message="The test shall either compile against A and not B or run on A and fail on B, nothing like that happened">
   15.28 -            <condition>
   15.29 -                <not><or>
   15.30 -                    <isset property="execution.failed"/>
   15.31 -                    <isset property="compilation.failed"/>
   15.32 -                </or></not>
   15.33 -            </condition>
   15.34 -        </fail>
   15.35 -    </target>
   15.36 -        
   15.37 -    <target name="-run-binary-check" depends="compile">
   15.38 -        <mkdir dir="build/testresultA"/>
   15.39 -        <junit dir="build/tests" failureproperty="run.on.A.shall.succeed">
   15.40 -            <batchtest todir="build/testresultA">
   15.41 -                <fileset dir="test" includes="**/*.java"/>
   15.42 -            </batchtest>
   15.43 -            <formatter type="brief" usefile="false"/>
   15.44 -            <formatter type="xml"/>
   15.45 -            <classpath>
   15.46 -                <pathelement location="${apiA}"/>
   15.47 -                <pathelement location="${apifest}/lib/junit-3.8.2.jar"/>
   15.48 -                <pathelement location="build/tests"/>
   15.49 -            </classpath>
   15.50 -        </junit>
   15.51 -        
   15.52 -        <mkdir dir="build/testresultB"/>
   15.53 -        <junit dir="build/tests" failureproperty="run.on.B.shall.fail">
   15.54 -            <batchtest todir="build/testresultB">
   15.55 -                <fileset dir="test" includes="**/*.java"/>
   15.56 -            </batchtest>
   15.57 -            <formatter type="brief" usefile="false"/>
   15.58 -            <formatter type="xml"/>
   15.59 -            <classpath>
   15.60 -                <pathelement location="${apiB}"/>
   15.61 -                <pathelement location="${apifest}/lib/junit-3.8.2.jar"/>
   15.62 -                <pathelement location="build/tests"/>
   15.63 -            </classpath>
   15.64 -        </junit>
   15.65 -        
   15.66 -        <condition property="execution.failed">
   15.67 -            <and>
   15.68 -                <isset property="run.on.B.shall.fail"/>
   15.69 -                <not><isset property="run.on.A.shall.succeed"/></not>
   15.70 -            </and>
   15.71 -        </condition>
   15.72 -    </target>
   15.73 -    
   15.74 -    <target name="-run-source-check" depends="compile" unless="execution.failed">
   15.75 -        
   15.76 -        <property name="build.b" location="build/verifyitbuildsagainstB"/>
   15.77 -        <delete dir="${build.b}"/>
   15.78 -        <mkdir dir="${build.b}"/>
   15.79 -        <javac destdir="${build.b}" srcdir="test" failonerror="false">
   15.80 -            <classpath>
   15.81 -                <pathelement location="${apiB}"/>
   15.82 -                <pathelement location="${apifest}/lib/junit-3.8.2.jar"/>
   15.83 -            </classpath>
   15.84 -        </javac>
   15.85 -
   15.86 -        
   15.87 -        <uptodate property="compilation.failed">
   15.88 -            <srcfiles dir="${build.b}" includes="**/*.class"/>
   15.89 -            <mapper type="glob" from="*" to="build/tests/*"/>
   15.90 -        </uptodate>
   15.91 -        
   15.92 -
   15.93 -    </target>
   15.94 -    
   15.95 -    <target name="test" depends="run"/>
   15.96 -    
   15.97 -    <target name="clean">
   15.98 -        <delete dir="build"/>
   15.99 -    </target>
  15.100 +    <import file="../../common.xml"/>
  15.101  </project>    
    16.1 --- a/samples/apifest1/day3-intermezzo/pnejedly/against-alwayscreatenewcircuit/nbproject/project.xml	Sat Jun 14 09:52:51 2008 +0200
    16.2 +++ b/samples/apifest1/day3-intermezzo/pnejedly/against-alwayscreatenewcircuit/nbproject/project.xml	Sat Jun 14 09:52:52 2008 +0200
    16.3 @@ -4,10 +4,12 @@
    16.4      <configuration>
    16.5          <general-data xmlns="http://www.netbeans.org/ns/freeform-project/1">
    16.6              <!-- Do not use Project Properties customizer when editing this file manually. -->
    16.7 -            <name>against-alwayscreatenewcircuit</name>
    16.8 +            <name>Against alwayscreatenewcircuit Solution</name>
    16.9              <properties>
   16.10                  <property name="ant.script">build.xml</property>
   16.11 +                <property name="apifest">../../../</property>
   16.12                  <property-file>project.properties</property-file>
   16.13 +                <property-file>../../common.properties</property-file>
   16.14              </properties>
   16.15              <folders>
   16.16                  <source-folder>
   16.17 @@ -54,6 +56,9 @@
   16.18                      <source-file>
   16.19                          <location>${ant.script}</location>
   16.20                      </source-file>
   16.21 +                    <source-file>
   16.22 +                        <location>project.properties</location>
   16.23 +                    </source-file>
   16.24                  </items>
   16.25                  <context-menu>
   16.26                      <ide-action name="build"/>
   16.27 @@ -68,7 +73,7 @@
   16.28          <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/1">
   16.29              <compilation-unit>
   16.30                  <package-root>test</package-root>
   16.31 -                <classpath mode="compile">${apiA}:${apifest}/lib/junit-3.8.2.jar</classpath>
   16.32 +                <classpath mode="compile">${apiA}:${junit.jar}</classpath>
   16.33                  <built-to>build/tests</built-to>
   16.34                  <source-level>1.5</source-level>
   16.35              </compilation-unit>
    17.1 --- a/samples/apifest1/day3-intermezzo/pnejedly/against-alwayscreatenewcircuit/project.properties	Sat Jun 14 09:52:51 2008 +0200
    17.2 +++ b/samples/apifest1/day3-intermezzo/pnejedly/against-alwayscreatenewcircuit/project.properties	Sat Jun 14 09:52:52 2008 +0200
    17.3 @@ -1,7 +1,3 @@
    17.4 -
    17.5 -# location to root of the repository with apifest projects
    17.6 -apifest=../../..
    17.7 -
    17.8  # name of a project to test
    17.9  apitotest=alwayscreatenewcircuit
   17.10  
    18.1 --- a/samples/apifest1/day3-intermezzo/pnejedly/against-alwayscreatenewcircuit/test/apifest/CircuitTest.java	Sat Jun 14 09:52:51 2008 +0200
    18.2 +++ b/samples/apifest1/day3-intermezzo/pnejedly/against-alwayscreatenewcircuit/test/apifest/CircuitTest.java	Sat Jun 14 09:52:52 2008 +0200
    18.3 @@ -1,43 +1,3 @@
    18.4 -/*
    18.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    18.6 - *
    18.7 - * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    18.8 - *
    18.9 - * The contents of this file are subject to the terms of either the GNU
   18.10 - * General Public License Version 2 only ("GPL") or the Common
   18.11 - * Development and Distribution License("CDDL") (collectively, the
   18.12 - * "License"). You may not use this file except in compliance with the
   18.13 - * License. You can obtain a copy of the License at
   18.14 - * http://www.netbeans.org/cddl-gplv2.html
   18.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   18.16 - * specific language governing permissions and limitations under the
   18.17 - * License.  When distributing the software, include this License Header
   18.18 - * Notice in each file and include the License file at
   18.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   18.20 - * particular file as subject to the "Classpath" exception as provided
   18.21 - * by Sun in the GPL Version 2 section of the License file that
   18.22 - * accompanied this code. If applicable, add the following below the
   18.23 - * License Header, with the fields enclosed by brackets [] replaced by
   18.24 - * your own identifying information:
   18.25 - * "Portions Copyrighted [year] [name of copyright owner]"
   18.26 - *
   18.27 - * Contributor(s):
   18.28 - *
   18.29 - * The Original Software is NetBeans. The Initial Developer of the Original
   18.30 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
   18.31 - * Microsystems, Inc. All Rights Reserved.
   18.32 - *
   18.33 - * If you wish your version of this file to be governed by only the CDDL
   18.34 - * or only the GPL Version 2, indicate your decision by adding
   18.35 - * "[Contributor] elects to include this software in this distribution
   18.36 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
   18.37 - * single choice of license, a recipient has the option to distribute
   18.38 - * your version of this file under either the CDDL, the GPL Version 2 or
   18.39 - * to extend the choice of license to its licensees as provided above.
   18.40 - * However, if you add GPL Version 2 code and therefore, elected the GPL
   18.41 - * Version 2 license, then the option applies only if the new code is
   18.42 - * made subject to such option by the copyright holder.
   18.43 - */
   18.44  package apifest;
   18.45  
   18.46  import junit.framework.TestCase;
    19.1 --- a/samples/apifest1/day3-intermezzo/pnejedly/against-elementbasedsolution/build.xml	Sat Jun 14 09:52:51 2008 +0200
    19.2 +++ b/samples/apifest1/day3-intermezzo/pnejedly/against-elementbasedsolution/build.xml	Sat Jun 14 09:52:52 2008 +0200
    19.3 @@ -1,97 +1,5 @@
    19.4  <?xml version="1.0" encoding="UTF-8"?>
    19.5  <!-- this is a template file to test  -->
    19.6  <project name="testing-template" default="run" basedir=".">
    19.7 -    <description>Builds the test against first version and runs them against two</description>
    19.8 -    
    19.9 -    <loadproperties srcfile="project.properties"/>
   19.10 -    
   19.11 -    <target name="make-sure-projects-are-compiled">
   19.12 -        <ant dir="${dayA}/${apitotest}" target="compile"/>
   19.13 -        <ant dir="${dayB}/${apitotest}" target="compile"/>
   19.14 -    </target>
   19.15 -    
   19.16 -    <target name="compile" depends="make-sure-projects-are-compiled">
   19.17 -        <mkdir dir="build/tests"/>
   19.18 -        <javac destdir="build/tests" srcdir="test">
   19.19 -            <classpath>
   19.20 -                <pathelement location="${apiA}"/>
   19.21 -                <pathelement location="${apifest}/lib/junit-3.8.2.jar"/>
   19.22 -            </classpath>
   19.23 -        </javac>
   19.24 -    </target>
   19.25 -    
   19.26 -    <target name="run" depends="-run-binary-check,-run-source-check">
   19.27 -        <fail message="The test shall either compile against A and not B or run on A and fail on B, nothing like that happened">
   19.28 -            <condition>
   19.29 -                <not><or>
   19.30 -                    <isset property="execution.failed"/>
   19.31 -                    <isset property="compilation.failed"/>
   19.32 -                </or></not>
   19.33 -            </condition>
   19.34 -        </fail>
   19.35 -    </target>
   19.36 -        
   19.37 -    <target name="-run-binary-check" depends="compile">
   19.38 -        <mkdir dir="build/testresultA"/>
   19.39 -        <junit dir="build/tests" failureproperty="run.on.A.shall.succeed">
   19.40 -            <batchtest todir="build/testresultA">
   19.41 -                <fileset dir="test" includes="**/*.java"/>
   19.42 -            </batchtest>
   19.43 -            <formatter type="brief" usefile="false"/>
   19.44 -            <formatter type="xml"/>
   19.45 -            <classpath>
   19.46 -                <pathelement location="${apiA}"/>
   19.47 -                <pathelement location="${apifest}/lib/junit-3.8.2.jar"/>
   19.48 -                <pathelement location="build/tests"/>
   19.49 -            </classpath>
   19.50 -        </junit>
   19.51 -        
   19.52 -        <mkdir dir="build/testresultB"/>
   19.53 -        <junit dir="build/tests" failureproperty="run.on.B.shall.fail">
   19.54 -            <batchtest todir="build/testresultB">
   19.55 -                <fileset dir="test" includes="**/*.java"/>
   19.56 -            </batchtest>
   19.57 -            <formatter type="brief" usefile="false"/>
   19.58 -            <formatter type="xml"/>
   19.59 -            <classpath>
   19.60 -                <pathelement location="${apiB}"/>
   19.61 -                <pathelement location="${apifest}/lib/junit-3.8.2.jar"/>
   19.62 -                <pathelement location="build/tests"/>
   19.63 -            </classpath>
   19.64 -        </junit>
   19.65 -        
   19.66 -        <condition property="execution.failed">
   19.67 -            <and>
   19.68 -                <isset property="run.on.B.shall.fail"/>
   19.69 -                <not><isset property="run.on.A.shall.succeed"/></not>
   19.70 -            </and>
   19.71 -        </condition>
   19.72 -    </target>
   19.73 -    
   19.74 -    <target name="-run-source-check" depends="compile" unless="execution.failed">
   19.75 -        
   19.76 -        <property name="build.b" location="build/verifyitbuildsagainstB"/>
   19.77 -        <delete dir="${build.b}"/>
   19.78 -        <mkdir dir="${build.b}"/>
   19.79 -        <javac destdir="${build.b}" srcdir="test" failonerror="false">
   19.80 -            <classpath>
   19.81 -                <pathelement location="${apiB}"/>
   19.82 -                <pathelement location="${apifest}/lib/junit-3.8.2.jar"/>
   19.83 -            </classpath>
   19.84 -        </javac>
   19.85 -
   19.86 -        
   19.87 -        <uptodate property="compilation.failed">
   19.88 -            <srcfiles dir="${build.b}" includes="**/*.class"/>
   19.89 -            <mapper type="glob" from="*" to="build/tests/*"/>
   19.90 -        </uptodate>
   19.91 -        
   19.92 -
   19.93 -    </target>
   19.94 -    
   19.95 -    <target name="test" depends="run"/>
   19.96 -    
   19.97 -    <target name="clean">
   19.98 -        <delete dir="build"/>
   19.99 -    </target>
  19.100 +    <import file="../../common.xml"/>
  19.101  </project>    
    20.1 --- a/samples/apifest1/day3-intermezzo/pnejedly/against-elementbasedsolution/nbproject/project.xml	Sat Jun 14 09:52:51 2008 +0200
    20.2 +++ b/samples/apifest1/day3-intermezzo/pnejedly/against-elementbasedsolution/nbproject/project.xml	Sat Jun 14 09:52:52 2008 +0200
    20.3 @@ -4,10 +4,12 @@
    20.4      <configuration>
    20.5          <general-data xmlns="http://www.netbeans.org/ns/freeform-project/1">
    20.6              <!-- Do not use Project Properties customizer when editing this file manually. -->
    20.7 -            <name>against-elementbasedsolution</name>
    20.8 +            <name>Against Element Based Solution</name>
    20.9              <properties>
   20.10                  <property name="ant.script">build.xml</property>
   20.11 +                <property name="apifest">../../../</property>
   20.12                  <property-file>project.properties</property-file>
   20.13 +                <property-file>../../common.properties</property-file>
   20.14              </properties>
   20.15              <folders>
   20.16                  <source-folder>
   20.17 @@ -54,6 +56,9 @@
   20.18                      <source-file>
   20.19                          <location>${ant.script}</location>
   20.20                      </source-file>
   20.21 +                    <source-file>
   20.22 +                        <location>project.properties</location>
   20.23 +                    </source-file>
   20.24                  </items>
   20.25                  <context-menu>
   20.26                      <ide-action name="build"/>
   20.27 @@ -68,7 +73,7 @@
   20.28          <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/1">
   20.29              <compilation-unit>
   20.30                  <package-root>test</package-root>
   20.31 -                <classpath mode="compile">${apiA}:${apifest}/lib/junit-3.8.2.jar</classpath>
   20.32 +                <classpath mode="compile">${apiA}:${junit.jar}</classpath>
   20.33                  <built-to>build/tests</built-to>
   20.34                  <source-level>1.5</source-level>
   20.35              </compilation-unit>
    21.1 --- a/samples/apifest1/day3-intermezzo/pnejedly/against-elementbasedsolution/project.properties	Sat Jun 14 09:52:51 2008 +0200
    21.2 +++ b/samples/apifest1/day3-intermezzo/pnejedly/against-elementbasedsolution/project.properties	Sat Jun 14 09:52:52 2008 +0200
    21.3 @@ -1,7 +1,3 @@
    21.4 -
    21.5 -# location to root of the repository with apifest projects
    21.6 -apifest=../../..
    21.7 -
    21.8  # name of a project to test
    21.9  apitotest=elementbasedsolution
   21.10  
    22.1 --- a/samples/apifest1/day3-intermezzo/pnejedly/against-inputandoperation/build.xml	Sat Jun 14 09:52:51 2008 +0200
    22.2 +++ b/samples/apifest1/day3-intermezzo/pnejedly/against-inputandoperation/build.xml	Sat Jun 14 09:52:52 2008 +0200
    22.3 @@ -1,97 +1,5 @@
    22.4  <?xml version="1.0" encoding="UTF-8"?>
    22.5  <!-- this is a template file to test  -->
    22.6  <project name="testing-template" default="run" basedir=".">
    22.7 -    <description>Builds the test against first version and runs them against two</description>
    22.8 -    
    22.9 -    <loadproperties srcfile="project.properties"/>
   22.10 -    
   22.11 -    <target name="make-sure-projects-are-compiled">
   22.12 -        <ant dir="${dayA}/${apitotest}" target="compile"/>
   22.13 -        <ant dir="${dayB}/${apitotest}" target="compile"/>
   22.14 -    </target>
   22.15 -    
   22.16 -    <target name="compile" depends="make-sure-projects-are-compiled">
   22.17 -        <mkdir dir="build/tests"/>
   22.18 -        <javac destdir="build/tests" srcdir="test">
   22.19 -            <classpath>
   22.20 -                <pathelement location="${apiA}"/>
   22.21 -                <pathelement location="${apifest}/lib/junit-3.8.2.jar"/>
   22.22 -            </classpath>
   22.23 -        </javac>
   22.24 -    </target>
   22.25 -    
   22.26 -    <target name="run" depends="-run-binary-check,-run-source-check">
   22.27 -        <fail message="The test shall either compile against A and not B or run on A and fail on B, nothing like that happened">
   22.28 -            <condition>
   22.29 -                <not><or>
   22.30 -                    <isset property="execution.failed"/>
   22.31 -                    <isset property="compilation.failed"/>
   22.32 -                </or></not>
   22.33 -            </condition>
   22.34 -        </fail>
   22.35 -    </target>
   22.36 -        
   22.37 -    <target name="-run-binary-check" depends="compile">
   22.38 -        <mkdir dir="build/testresultA"/>
   22.39 -        <junit dir="build/tests" failureproperty="run.on.A.shall.succeed">
   22.40 -            <batchtest todir="build/testresultA">
   22.41 -                <fileset dir="test" includes="**/*.java"/>
   22.42 -            </batchtest>
   22.43 -            <formatter type="brief" usefile="false"/>
   22.44 -            <formatter type="xml"/>
   22.45 -            <classpath>
   22.46 -                <pathelement location="${apiA}"/>
   22.47 -                <pathelement location="${apifest}/lib/junit-3.8.2.jar"/>
   22.48 -                <pathelement location="build/tests"/>
   22.49 -            </classpath>
   22.50 -        </junit>
   22.51 -        
   22.52 -        <mkdir dir="build/testresultB"/>
   22.53 -        <junit dir="build/tests" failureproperty="run.on.B.shall.fail">
   22.54 -            <batchtest todir="build/testresultB">
   22.55 -                <fileset dir="test" includes="**/*.java"/>
   22.56 -            </batchtest>
   22.57 -            <formatter type="brief" usefile="false"/>
   22.58 -            <formatter type="xml"/>
   22.59 -            <classpath>
   22.60 -                <pathelement location="${apiB}"/>
   22.61 -                <pathelement location="${apifest}/lib/junit-3.8.2.jar"/>
   22.62 -                <pathelement location="build/tests"/>
   22.63 -            </classpath>
   22.64 -        </junit>
   22.65 -        
   22.66 -        <condition property="execution.failed">
   22.67 -            <and>
   22.68 -                <isset property="run.on.B.shall.fail"/>
   22.69 -                <not><isset property="run.on.A.shall.succeed"/></not>
   22.70 -            </and>
   22.71 -        </condition>
   22.72 -    </target>
   22.73 -    
   22.74 -    <target name="-run-source-check" depends="compile" unless="execution.failed">
   22.75 -        
   22.76 -        <property name="build.b" location="build/verifyitbuildsagainstB"/>
   22.77 -        <delete dir="${build.b}"/>
   22.78 -        <mkdir dir="${build.b}"/>
   22.79 -        <javac destdir="${build.b}" srcdir="test" failonerror="false">
   22.80 -            <classpath>
   22.81 -                <pathelement location="${apiB}"/>
   22.82 -                <pathelement location="${apifest}/lib/junit-3.8.2.jar"/>
   22.83 -            </classpath>
   22.84 -        </javac>
   22.85 -
   22.86 -        
   22.87 -        <uptodate property="compilation.failed">
   22.88 -            <srcfiles dir="${build.b}" includes="**/*.class"/>
   22.89 -            <mapper type="glob" from="*" to="build/tests/*"/>
   22.90 -        </uptodate>
   22.91 -        
   22.92 -
   22.93 -    </target>
   22.94 -    
   22.95 -    <target name="test" depends="run"/>
   22.96 -    
   22.97 -    <target name="clean">
   22.98 -        <delete dir="build"/>
   22.99 -    </target>
  22.100 +    <import file="../../common.xml"/>
  22.101  </project>    
    23.1 --- a/samples/apifest1/day3-intermezzo/pnejedly/against-inputandoperation/nbproject/project.xml	Sat Jun 14 09:52:51 2008 +0200
    23.2 +++ b/samples/apifest1/day3-intermezzo/pnejedly/against-inputandoperation/nbproject/project.xml	Sat Jun 14 09:52:52 2008 +0200
    23.3 @@ -4,10 +4,12 @@
    23.4      <configuration>
    23.5          <general-data xmlns="http://www.netbeans.org/ns/freeform-project/1">
    23.6              <!-- Do not use Project Properties customizer when editing this file manually. -->
    23.7 -            <name>against-inputandoperation</name>
    23.8 +            <name>Against inputandoperation</name>
    23.9              <properties>
   23.10                  <property name="ant.script">build.xml</property>
   23.11 +                <property name="apifest">../../../</property>
   23.12                  <property-file>project.properties</property-file>
   23.13 +                <property-file>../../common.properties</property-file>
   23.14              </properties>
   23.15              <folders>
   23.16                  <source-folder>
   23.17 @@ -54,6 +56,9 @@
   23.18                      <source-file>
   23.19                          <location>${ant.script}</location>
   23.20                      </source-file>
   23.21 +                    <source-file>
   23.22 +                        <location>project.properties</location>
   23.23 +                    </source-file>
   23.24                  </items>
   23.25                  <context-menu>
   23.26                      <ide-action name="build"/>
   23.27 @@ -68,7 +73,7 @@
   23.28          <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/1">
   23.29              <compilation-unit>
   23.30                  <package-root>test</package-root>
   23.31 -                <classpath mode="compile">${apiA}:${apifest}/lib/junit-3.8.2.jar</classpath>
   23.32 +                <classpath mode="compile">${apiA}:${junit.jar}</classpath>
   23.33                  <built-to>build/tests</built-to>
   23.34                  <source-level>1.5</source-level>
   23.35              </compilation-unit>
    24.1 --- a/samples/apifest1/day3-intermezzo/pnejedly/against-inputandoperation/project.properties	Sat Jun 14 09:52:51 2008 +0200
    24.2 +++ b/samples/apifest1/day3-intermezzo/pnejedly/against-inputandoperation/project.properties	Sat Jun 14 09:52:52 2008 +0200
    24.3 @@ -1,7 +1,3 @@
    24.4 -
    24.5 -# location to root of the repository with apifest projects
    24.6 -apifest=../../..
    24.7 -
    24.8  # name of a project to test
    24.9  apitotest=inputandoperation
   24.10  
    25.1 --- a/samples/apifest1/day3-intermezzo/pnejedly/against-inputandoperation/test/apifest/CircuitTest.java	Sat Jun 14 09:52:51 2008 +0200
    25.2 +++ b/samples/apifest1/day3-intermezzo/pnejedly/against-inputandoperation/test/apifest/CircuitTest.java	Sat Jun 14 09:52:52 2008 +0200
    25.3 @@ -1,43 +1,3 @@
    25.4 -/*
    25.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    25.6 - *
    25.7 - * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    25.8 - *
    25.9 - * The contents of this file are subject to the terms of either the GNU
   25.10 - * General Public License Version 2 only ("GPL") or the Common
   25.11 - * Development and Distribution License("CDDL") (collectively, the
   25.12 - * "License"). You may not use this file except in compliance with the
   25.13 - * License. You can obtain a copy of the License at
   25.14 - * http://www.netbeans.org/cddl-gplv2.html
   25.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   25.16 - * specific language governing permissions and limitations under the
   25.17 - * License.  When distributing the software, include this License Header
   25.18 - * Notice in each file and include the License file at
   25.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   25.20 - * particular file as subject to the "Classpath" exception as provided
   25.21 - * by Sun in the GPL Version 2 section of the License file that
   25.22 - * accompanied this code. If applicable, add the following below the
   25.23 - * License Header, with the fields enclosed by brackets [] replaced by
   25.24 - * your own identifying information:
   25.25 - * "Portions Copyrighted [year] [name of copyright owner]"
   25.26 - *
   25.27 - * Contributor(s):
   25.28 - *
   25.29 - * The Original Software is NetBeans. The Initial Developer of the Original
   25.30 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
   25.31 - * Microsystems, Inc. All Rights Reserved.
   25.32 - *
   25.33 - * If you wish your version of this file to be governed by only the CDDL
   25.34 - * or only the GPL Version 2, indicate your decision by adding
   25.35 - * "[Contributor] elects to include this software in this distribution
   25.36 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
   25.37 - * single choice of license, a recipient has the option to distribute
   25.38 - * your version of this file under either the CDDL, the GPL Version 2 or
   25.39 - * to extend the choice of license to its licensees as provided above.
   25.40 - * However, if you add GPL Version 2 code and therefore, elected the GPL
   25.41 - * Version 2 license, then the option applies only if the new code is
   25.42 - * made subject to such option by the copyright holder.
   25.43 - */
   25.44  package apifest;
   25.45  
   25.46  import junit.framework.TestCase;
    26.1 --- a/samples/apifest1/day3-intermezzo/pnejedly/against-stackbasedsolution/build.xml	Sat Jun 14 09:52:51 2008 +0200
    26.2 +++ b/samples/apifest1/day3-intermezzo/pnejedly/against-stackbasedsolution/build.xml	Sat Jun 14 09:52:52 2008 +0200
    26.3 @@ -1,97 +1,5 @@
    26.4  <?xml version="1.0" encoding="UTF-8"?>
    26.5  <!-- this is a template file to test  -->
    26.6  <project name="testing-template" default="run" basedir=".">
    26.7 -    <description>Builds the test against first version and runs them against two</description>
    26.8 -    
    26.9 -    <loadproperties srcfile="project.properties"/>
   26.10 -    
   26.11 -    <target name="make-sure-projects-are-compiled">
   26.12 -        <ant dir="${dayA}/${apitotest}" target="compile"/>
   26.13 -        <ant dir="${dayB}/${apitotest}" target="compile"/>
   26.14 -    </target>
   26.15 -    
   26.16 -    <target name="compile" depends="make-sure-projects-are-compiled">
   26.17 -        <mkdir dir="build/tests"/>
   26.18 -        <javac destdir="build/tests" srcdir="test">
   26.19 -            <classpath>
   26.20 -                <pathelement location="${apiA}"/>
   26.21 -                <pathelement location="${apifest}/lib/junit-3.8.2.jar"/>
   26.22 -            </classpath>
   26.23 -        </javac>
   26.24 -    </target>
   26.25 -    
   26.26 -    <target name="run" depends="-run-binary-check,-run-source-check">
   26.27 -        <fail message="The test shall either compile against A and not B or run on A and fail on B, nothing like that happened">
   26.28 -            <condition>
   26.29 -                <not><or>
   26.30 -                    <isset property="execution.failed"/>
   26.31 -                    <isset property="compilation.failed"/>
   26.32 -                </or></not>
   26.33 -            </condition>
   26.34 -        </fail>
   26.35 -    </target>
   26.36 -        
   26.37 -    <target name="-run-binary-check" depends="compile">
   26.38 -        <mkdir dir="build/testresultA"/>
   26.39 -        <junit dir="build/tests" failureproperty="run.on.A.shall.succeed">
   26.40 -            <batchtest todir="build/testresultA">
   26.41 -                <fileset dir="test" includes="**/*.java"/>
   26.42 -            </batchtest>
   26.43 -            <formatter type="brief" usefile="false"/>
   26.44 -            <formatter type="xml"/>
   26.45 -            <classpath>
   26.46 -                <pathelement location="${apiA}"/>
   26.47 -                <pathelement location="${apifest}/lib/junit-3.8.2.jar"/>
   26.48 -                <pathelement location="build/tests"/>
   26.49 -            </classpath>
   26.50 -        </junit>
   26.51 -        
   26.52 -        <mkdir dir="build/testresultB"/>
   26.53 -        <junit dir="build/tests" failureproperty="run.on.B.shall.fail">
   26.54 -            <batchtest todir="build/testresultB">
   26.55 -                <fileset dir="test" includes="**/*.java"/>
   26.56 -            </batchtest>
   26.57 -            <formatter type="brief" usefile="false"/>
   26.58 -            <formatter type="xml"/>
   26.59 -            <classpath>
   26.60 -                <pathelement location="${apiB}"/>
   26.61 -                <pathelement location="${apifest}/lib/junit-3.8.2.jar"/>
   26.62 -                <pathelement location="build/tests"/>
   26.63 -            </classpath>
   26.64 -        </junit>
   26.65 -        
   26.66 -        <condition property="execution.failed">
   26.67 -            <and>
   26.68 -                <isset property="run.on.B.shall.fail"/>
   26.69 -                <not><isset property="run.on.A.shall.succeed"/></not>
   26.70 -            </and>
   26.71 -        </condition>
   26.72 -    </target>
   26.73 -    
   26.74 -    <target name="-run-source-check" depends="compile" unless="execution.failed">
   26.75 -        
   26.76 -        <property name="build.b" location="build/verifyitbuildsagainstB"/>
   26.77 -        <delete dir="${build.b}"/>
   26.78 -        <mkdir dir="${build.b}"/>
   26.79 -        <javac destdir="${build.b}" srcdir="test" failonerror="false">
   26.80 -            <classpath>
   26.81 -                <pathelement location="${apiB}"/>
   26.82 -                <pathelement location="${apifest}/lib/junit-3.8.2.jar"/>
   26.83 -            </classpath>
   26.84 -        </javac>
   26.85 -
   26.86 -        
   26.87 -        <uptodate property="compilation.failed">
   26.88 -            <srcfiles dir="${build.b}" includes="**/*.class"/>
   26.89 -            <mapper type="glob" from="*" to="build/tests/*"/>
   26.90 -        </uptodate>
   26.91 -        
   26.92 -
   26.93 -    </target>
   26.94 -    
   26.95 -    <target name="test" depends="run"/>
   26.96 -    
   26.97 -    <target name="clean">
   26.98 -        <delete dir="build"/>
   26.99 -    </target>
  26.100 +    <import file="../../common.xml"/>
  26.101  </project>    
    27.1 --- a/samples/apifest1/day3-intermezzo/pnejedly/against-stackbasedsolution/nbproject/project.xml	Sat Jun 14 09:52:51 2008 +0200
    27.2 +++ b/samples/apifest1/day3-intermezzo/pnejedly/against-stackbasedsolution/nbproject/project.xml	Sat Jun 14 09:52:52 2008 +0200
    27.3 @@ -4,10 +4,12 @@
    27.4      <configuration>
    27.5          <general-data xmlns="http://www.netbeans.org/ns/freeform-project/1">
    27.6              <!-- Do not use Project Properties customizer when editing this file manually. -->
    27.7 -            <name>against-stackbasedsolution</name>
    27.8 +            <name>Against Stack Based Solution</name>
    27.9              <properties>
   27.10                  <property name="ant.script">build.xml</property>
   27.11 +                <property name="apifest">../../../</property>
   27.12                  <property-file>project.properties</property-file>
   27.13 +                <property-file>../../common.properties</property-file>
   27.14              </properties>
   27.15              <folders>
   27.16                  <source-folder>
   27.17 @@ -54,6 +56,9 @@
   27.18                      <source-file>
   27.19                          <location>${ant.script}</location>
   27.20                      </source-file>
   27.21 +                    <source-file>
   27.22 +                        <location>project.properties</location>
   27.23 +                    </source-file>
   27.24                  </items>
   27.25                  <context-menu>
   27.26                      <ide-action name="build"/>
   27.27 @@ -68,7 +73,7 @@
   27.28          <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/1">
   27.29              <compilation-unit>
   27.30                  <package-root>test</package-root>
   27.31 -                <classpath mode="compile">../../../lib/junit-3.8.2.jar:../../../day1/stackbasedsolution/dist/boolcircuit.jar</classpath>
   27.32 +                <classpath mode="compile">${apiA}:${junit.jar}</classpath>
   27.33                  <built-to>build/tests</built-to>
   27.34                  <source-level>1.5</source-level>
   27.35              </compilation-unit>
    28.1 --- a/samples/apifest1/day3-intermezzo/pnejedly/against-stackbasedsolution/project.properties	Sat Jun 14 09:52:51 2008 +0200
    28.2 +++ b/samples/apifest1/day3-intermezzo/pnejedly/against-stackbasedsolution/project.properties	Sat Jun 14 09:52:52 2008 +0200
    28.3 @@ -1,7 +1,3 @@
    28.4 -
    28.5 -# location to root of the repository with apifest projects
    28.6 -apifest=../../..
    28.7 -
    28.8  # name of a project to test
    28.9  apitotest=stackbasedsolution
   28.10  
    29.1 --- a/samples/apifest1/day3-intermezzo/pnejedly/against-stackbasedsolution/test/apifest/CircuitTest.java	Sat Jun 14 09:52:51 2008 +0200
    29.2 +++ b/samples/apifest1/day3-intermezzo/pnejedly/against-stackbasedsolution/test/apifest/CircuitTest.java	Sat Jun 14 09:52:52 2008 +0200
    29.3 @@ -1,43 +1,3 @@
    29.4 -/*
    29.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    29.6 - *
    29.7 - * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    29.8 - *
    29.9 - * The contents of this file are subject to the terms of either the GNU
   29.10 - * General Public License Version 2 only ("GPL") or the Common
   29.11 - * Development and Distribution License("CDDL") (collectively, the
   29.12 - * "License"). You may not use this file except in compliance with the
   29.13 - * License. You can obtain a copy of the License at
   29.14 - * http://www.netbeans.org/cddl-gplv2.html
   29.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   29.16 - * specific language governing permissions and limitations under the
   29.17 - * License.  When distributing the software, include this License Header
   29.18 - * Notice in each file and include the License file at
   29.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   29.20 - * particular file as subject to the "Classpath" exception as provided
   29.21 - * by Sun in the GPL Version 2 section of the License file that
   29.22 - * accompanied this code. If applicable, add the following below the
   29.23 - * License Header, with the fields enclosed by brackets [] replaced by
   29.24 - * your own identifying information:
   29.25 - * "Portions Copyrighted [year] [name of copyright owner]"
   29.26 - *
   29.27 - * Contributor(s):
   29.28 - *
   29.29 - * The Original Software is NetBeans. The Initial Developer of the Original
   29.30 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
   29.31 - * Microsystems, Inc. All Rights Reserved.
   29.32 - *
   29.33 - * If you wish your version of this file to be governed by only the CDDL
   29.34 - * or only the GPL Version 2, indicate your decision by adding
   29.35 - * "[Contributor] elects to include this software in this distribution
   29.36 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
   29.37 - * single choice of license, a recipient has the option to distribute
   29.38 - * your version of this file under either the CDDL, the GPL Version 2 or
   29.39 - * to extend the choice of license to its licensees as provided above.
   29.40 - * However, if you add GPL Version 2 code and therefore, elected the GPL
   29.41 - * Version 2 license, then the option applies only if the new code is
   29.42 - * made subject to such option by the copyright holder.
   29.43 - */
   29.44  package apifest;
   29.45  
   29.46  import java.util.Arrays;
    30.1 --- a/samples/apifest1/day3-intermezzo/pnejedly/against-subclassingsolution/build.xml	Sat Jun 14 09:52:51 2008 +0200
    30.2 +++ b/samples/apifest1/day3-intermezzo/pnejedly/against-subclassingsolution/build.xml	Sat Jun 14 09:52:52 2008 +0200
    30.3 @@ -1,97 +1,5 @@
    30.4  <?xml version="1.0" encoding="UTF-8"?>
    30.5  <!-- this is a template file to test  -->
    30.6  <project name="testing-template" default="run" basedir=".">
    30.7 -    <description>Builds the test against first version and runs them against two</description>
    30.8 -    
    30.9 -    <loadproperties srcfile="project.properties"/>
   30.10 -    
   30.11 -    <target name="make-sure-projects-are-compiled">
   30.12 -        <ant dir="${dayA}/${apitotest}" target="compile"/>
   30.13 -        <ant dir="${dayB}/${apitotest}" target="compile"/>
   30.14 -    </target>
   30.15 -    
   30.16 -    <target name="compile" depends="make-sure-projects-are-compiled">
   30.17 -        <mkdir dir="build/tests"/>
   30.18 -        <javac destdir="build/tests" srcdir="test">
   30.19 -            <classpath>
   30.20 -                <pathelement location="${apiA}"/>
   30.21 -                <pathelement location="${apifest}/lib/junit-3.8.2.jar"/>
   30.22 -            </classpath>
   30.23 -        </javac>
   30.24 -    </target>
   30.25 -    
   30.26 -    <target name="run" depends="-run-binary-check,-run-source-check">
   30.27 -        <fail message="The test shall either compile against A and not B or run on A and fail on B, nothing like that happened">
   30.28 -            <condition>
   30.29 -                <not><or>
   30.30 -                    <isset property="execution.failed"/>
   30.31 -                    <isset property="compilation.failed"/>
   30.32 -                </or></not>
   30.33 -            </condition>
   30.34 -        </fail>
   30.35 -    </target>
   30.36 -        
   30.37 -    <target name="-run-binary-check" depends="compile">
   30.38 -        <mkdir dir="build/testresultA"/>
   30.39 -        <junit dir="build/tests" failureproperty="run.on.A.shall.succeed">
   30.40 -            <batchtest todir="build/testresultA">
   30.41 -                <fileset dir="test" includes="**/*.java"/>
   30.42 -            </batchtest>
   30.43 -            <formatter type="brief" usefile="false"/>
   30.44 -            <formatter type="xml"/>
   30.45 -            <classpath>
   30.46 -                <pathelement location="${apiA}"/>
   30.47 -                <pathelement location="${apifest}/lib/junit-3.8.2.jar"/>
   30.48 -                <pathelement location="build/tests"/>
   30.49 -            </classpath>
   30.50 -        </junit>
   30.51 -        
   30.52 -        <mkdir dir="build/testresultB"/>
   30.53 -        <junit dir="build/tests" failureproperty="run.on.B.shall.fail">
   30.54 -            <batchtest todir="build/testresultB">
   30.55 -                <fileset dir="test" includes="**/*.java"/>
   30.56 -            </batchtest>
   30.57 -            <formatter type="brief" usefile="false"/>
   30.58 -            <formatter type="xml"/>
   30.59 -            <classpath>
   30.60 -                <pathelement location="${apiB}"/>
   30.61 -                <pathelement location="${apifest}/lib/junit-3.8.2.jar"/>
   30.62 -                <pathelement location="build/tests"/>
   30.63 -            </classpath>
   30.64 -        </junit>
   30.65 -        
   30.66 -        <condition property="execution.failed">
   30.67 -            <and>
   30.68 -                <isset property="run.on.B.shall.fail"/>
   30.69 -                <not><isset property="run.on.A.shall.succeed"/></not>
   30.70 -            </and>
   30.71 -        </condition>
   30.72 -    </target>
   30.73 -    
   30.74 -    <target name="-run-source-check" depends="compile" unless="execution.failed">
   30.75 -        
   30.76 -        <property name="build.b" location="build/verifyitbuildsagainstB"/>
   30.77 -        <delete dir="${build.b}"/>
   30.78 -        <mkdir dir="${build.b}"/>
   30.79 -        <javac destdir="${build.b}" srcdir="test" failonerror="false">
   30.80 -            <classpath>
   30.81 -                <pathelement location="${apiB}"/>
   30.82 -                <pathelement location="${apifest}/lib/junit-3.8.2.jar"/>
   30.83 -            </classpath>
   30.84 -        </javac>
   30.85 -
   30.86 -        
   30.87 -        <uptodate property="compilation.failed">
   30.88 -            <srcfiles dir="${build.b}" includes="**/*.class"/>
   30.89 -            <mapper type="glob" from="*" to="build/tests/*"/>
   30.90 -        </uptodate>
   30.91 -        
   30.92 -
   30.93 -    </target>
   30.94 -    
   30.95 -    <target name="test" depends="run"/>
   30.96 -    
   30.97 -    <target name="clean">
   30.98 -        <delete dir="build"/>
   30.99 -    </target>
  30.100 +    <import file="../../common.xml"/>
  30.101  </project>    
    31.1 --- a/samples/apifest1/day3-intermezzo/pnejedly/against-subclassingsolution/nbproject/project.xml	Sat Jun 14 09:52:51 2008 +0200
    31.2 +++ b/samples/apifest1/day3-intermezzo/pnejedly/against-subclassingsolution/nbproject/project.xml	Sat Jun 14 09:52:52 2008 +0200
    31.3 @@ -4,10 +4,12 @@
    31.4      <configuration>
    31.5          <general-data xmlns="http://www.netbeans.org/ns/freeform-project/1">
    31.6              <!-- Do not use Project Properties customizer when editing this file manually. -->
    31.7 -            <name>against-subclassingsolution</name>
    31.8 +            <name>Against Subclassing Solution</name>
    31.9              <properties>
   31.10                  <property name="ant.script">build.xml</property>
   31.11 +                <property name="apifest">../../../</property>
   31.12                  <property-file>project.properties</property-file>
   31.13 +                <property-file>../../common.properties</property-file>
   31.14              </properties>
   31.15              <folders>
   31.16                  <source-folder>
   31.17 @@ -54,6 +56,9 @@
   31.18                      <source-file>
   31.19                          <location>${ant.script}</location>
   31.20                      </source-file>
   31.21 +                    <source-file>
   31.22 +                        <location>project.properties</location>
   31.23 +                    </source-file>
   31.24                  </items>
   31.25                  <context-menu>
   31.26                      <ide-action name="build"/>
   31.27 @@ -68,7 +73,7 @@
   31.28          <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/1">
   31.29              <compilation-unit>
   31.30                  <package-root>test</package-root>
   31.31 -                <classpath mode="compile">${apiA}:${apifest}/lib/junit-3.8.2.jar</classpath>
   31.32 +                <classpath mode="compile">${apiA}:${junit.jar}</classpath>
   31.33                  <built-to>build/tests</built-to>
   31.34                  <source-level>1.5</source-level>
   31.35              </compilation-unit>
    32.1 --- a/samples/apifest1/day3-intermezzo/pnejedly/against-subclassingsolution/project.properties	Sat Jun 14 09:52:51 2008 +0200
    32.2 +++ b/samples/apifest1/day3-intermezzo/pnejedly/against-subclassingsolution/project.properties	Sat Jun 14 09:52:52 2008 +0200
    32.3 @@ -1,7 +1,3 @@
    32.4 -
    32.5 -# location to root of the repository with apifest projects
    32.6 -apifest=../../..
    32.7 -
    32.8  # name of a project to test
    32.9  apitotest=subclassingsolution
   32.10  
    33.1 --- a/samples/apifest1/day3-intermezzo/pnejedly/against-welltestedsolution/build.xml	Sat Jun 14 09:52:51 2008 +0200
    33.2 +++ b/samples/apifest1/day3-intermezzo/pnejedly/against-welltestedsolution/build.xml	Sat Jun 14 09:52:52 2008 +0200
    33.3 @@ -1,97 +1,5 @@
    33.4  <?xml version="1.0" encoding="UTF-8"?>
    33.5  <!-- this is a template file to test  -->
    33.6  <project name="testing-template" default="run" basedir=".">
    33.7 -    <description>Builds the test against first version and runs them against two</description>
    33.8 -    
    33.9 -    <loadproperties srcfile="project.properties"/>
   33.10 -    
   33.11 -    <target name="make-sure-projects-are-compiled">
   33.12 -        <ant dir="${dayA}/${apitotest}" target="compile"/>
   33.13 -        <ant dir="${dayB}/${apitotest}" target="compile"/>
   33.14 -    </target>
   33.15 -    
   33.16 -    <target name="compile" depends="make-sure-projects-are-compiled">
   33.17 -        <mkdir dir="build/tests"/>
   33.18 -        <javac destdir="build/tests" srcdir="test">
   33.19 -            <classpath>
   33.20 -                <pathelement location="${apiA}"/>
   33.21 -                <pathelement location="${apifest}/lib/junit-3.8.2.jar"/>
   33.22 -            </classpath>
   33.23 -        </javac>
   33.24 -    </target>
   33.25 -    
   33.26 -    <target name="run" depends="-run-binary-check,-run-source-check">
   33.27 -        <fail message="The test shall either compile against A and not B or run on A and fail on B, nothing like that happened">
   33.28 -            <condition>
   33.29 -                <not><or>
   33.30 -                    <isset property="execution.failed"/>
   33.31 -                    <isset property="compilation.failed"/>
   33.32 -                </or></not>
   33.33 -            </condition>
   33.34 -        </fail>
   33.35 -    </target>
   33.36 -        
   33.37 -    <target name="-run-binary-check" depends="compile">
   33.38 -        <mkdir dir="build/testresultA"/>
   33.39 -        <junit dir="build/tests" failureproperty="run.on.A.shall.succeed">
   33.40 -            <batchtest todir="build/testresultA">
   33.41 -                <fileset dir="test" includes="**/*.java"/>
   33.42 -            </batchtest>
   33.43 -            <formatter type="brief" usefile="false"/>
   33.44 -            <formatter type="xml"/>
   33.45 -            <classpath>
   33.46 -                <pathelement location="${apiA}"/>
   33.47 -                <pathelement location="${apifest}/lib/junit-3.8.2.jar"/>
   33.48 -                <pathelement location="build/tests"/>
   33.49 -            </classpath>
   33.50 -        </junit>
   33.51 -        
   33.52 -        <mkdir dir="build/testresultB"/>
   33.53 -        <junit dir="build/tests" failureproperty="run.on.B.shall.fail">
   33.54 -            <batchtest todir="build/testresultB">
   33.55 -                <fileset dir="test" includes="**/*.java"/>
   33.56 -            </batchtest>
   33.57 -            <formatter type="brief" usefile="false"/>
   33.58 -            <formatter type="xml"/>
   33.59 -            <classpath>
   33.60 -                <pathelement location="${apiB}"/>
   33.61 -                <pathelement location="${apifest}/lib/junit-3.8.2.jar"/>
   33.62 -                <pathelement location="build/tests"/>
   33.63 -            </classpath>
   33.64 -        </junit>
   33.65 -        
   33.66 -        <condition property="execution.failed">
   33.67 -            <and>
   33.68 -                <isset property="run.on.B.shall.fail"/>
   33.69 -                <not><isset property="run.on.A.shall.succeed"/></not>
   33.70 -            </and>
   33.71 -        </condition>
   33.72 -    </target>
   33.73 -    
   33.74 -    <target name="-run-source-check" depends="compile" unless="execution.failed">
   33.75 -        
   33.76 -        <property name="build.b" location="build/verifyitbuildsagainstB"/>
   33.77 -        <delete dir="${build.b}"/>
   33.78 -        <mkdir dir="${build.b}"/>
   33.79 -        <javac destdir="${build.b}" srcdir="test" failonerror="false">
   33.80 -            <classpath>
   33.81 -                <pathelement location="${apiB}"/>
   33.82 -                <pathelement location="${apifest}/lib/junit-3.8.2.jar"/>
   33.83 -            </classpath>
   33.84 -        </javac>
   33.85 -
   33.86 -        
   33.87 -        <uptodate property="compilation.failed">
   33.88 -            <srcfiles dir="${build.b}" includes="**/*.class"/>
   33.89 -            <mapper type="glob" from="*" to="build/tests/*"/>
   33.90 -        </uptodate>
   33.91 -        
   33.92 -
   33.93 -    </target>
   33.94 -    
   33.95 -    <target name="test" depends="run"/>
   33.96 -    
   33.97 -    <target name="clean">
   33.98 -        <delete dir="build"/>
   33.99 -    </target>
  33.100 +    <import file="../../common.xml"/>
  33.101  </project>    
    34.1 --- a/samples/apifest1/day3-intermezzo/pnejedly/against-welltestedsolution/nbproject/project.xml	Sat Jun 14 09:52:51 2008 +0200
    34.2 +++ b/samples/apifest1/day3-intermezzo/pnejedly/against-welltestedsolution/nbproject/project.xml	Sat Jun 14 09:52:52 2008 +0200
    34.3 @@ -4,10 +4,12 @@
    34.4      <configuration>
    34.5          <general-data xmlns="http://www.netbeans.org/ns/freeform-project/1">
    34.6              <!-- Do not use Project Properties customizer when editing this file manually. -->
    34.7 -            <name>Against Well Tested Solution</name>
    34.8 +            <name>Against Welltested Solution</name>
    34.9              <properties>
   34.10                  <property name="ant.script">build.xml</property>
   34.11 +                <property name="apifest">../../../</property>
   34.12                  <property-file>project.properties</property-file>
   34.13 +                <property-file>../../common.properties</property-file>
   34.14              </properties>
   34.15              <folders>
   34.16                  <source-folder>
   34.17 @@ -54,6 +56,9 @@
   34.18                      <source-file>
   34.19                          <location>${ant.script}</location>
   34.20                      </source-file>
   34.21 +                    <source-file>
   34.22 +                        <location>project.properties</location>
   34.23 +                    </source-file>
   34.24                  </items>
   34.25                  <context-menu>
   34.26                      <ide-action name="build"/>
   34.27 @@ -68,7 +73,7 @@
   34.28          <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/1">
   34.29              <compilation-unit>
   34.30                  <package-root>test</package-root>
   34.31 -                <classpath mode="compile">${apiA}:${apifest}/lib/junit-3.8.2.jar</classpath>
   34.32 +                <classpath mode="compile">${apiA}:${junit.jar}</classpath>
   34.33                  <built-to>build/tests</built-to>
   34.34                  <source-level>1.5</source-level>
   34.35              </compilation-unit>
    35.1 --- a/samples/apifest1/day3-intermezzo/pnejedly/against-welltestedsolution/project.properties	Sat Jun 14 09:52:51 2008 +0200
    35.2 +++ b/samples/apifest1/day3-intermezzo/pnejedly/against-welltestedsolution/project.properties	Sat Jun 14 09:52:52 2008 +0200
    35.3 @@ -1,7 +1,3 @@
    35.4 -
    35.5 -# location to root of the repository with apifest projects
    35.6 -apifest=../../..
    35.7 -
    35.8  # name of a project to test
    35.9  apitotest=welltestedsolution
   35.10