Commit 813ded32 authored by gmantele's avatar gmantele
Browse files

TAP: Execute all JUnit tests before building the TAP library. At any JUnit...

TAP: Execute all JUnit tests before building the TAP library. At any JUnit failure, the build is canceled
+ Update the version number for the generated JARs.
parent 2aaef7da
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
<!DOCTYPE project>
<project name="adql" basedir="." default="buildLib">
	
	<property name="version" value="1.1" />
	<property name="version" value="1.2" />

	<property name="srcDir" value="src" />
	<property name="compileDir" value="antBuild" />
+27 −3
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
<!DOCTYPE project>
<project name="tap" basedir="." default="buildLib">
	
	<property name="version" value="1.0" />
	<property name="version" value="1.1" />

	<property name="srcDir" value="src" />
	<property name="compileDir" value="antBuild" />
@@ -28,11 +28,26 @@
	<fail message="The property SERVLET-API must be set! It provides the path toward a directory or a JAR which contains all classes inside javax.servlet.">
		<condition><not><isset property="SERVLET-API"/></not></condition>
	</fail>
	<fail message="The property JUNIT-API must be set! It provides the path toward a directory or a JAR which contains all classes needed to use JUnit.">
		<condition><not><isset property="JUNIT-API"/></not></condition>
	</fail>
	
	<path id="tap.classpath">
		<pathelement location="${uploadUtilsJar}" />
		<pathelement location="${CATALINA}" />
		<pathelement location="${SERVLET-API}" />
		<pathelement path="${JUNIT-API}" />
	</path>
	
	<!-- Define the classpath which includes the junit.jar and the classes after compiling-->
		<path id="junit.class.path">
			<pathelement path="${JUNIT-API}" />
			<pathelement location="/opt/Java_Libraries/postgresql-9.3-1100.jdbc3.jar" />
			<pathelement location="${jsonJar}" />
			<pathelement location="${uploadUtilsJar}" />
			<pathelement location="${CATALINA}" />
			<pathelement location="${SERVLET-API}" />
			<pathelement location="bin" />
		</path>
		
		<echo>TAP LIBRARY VERSION = ${version}</echo>
@@ -46,7 +61,16 @@
	<target name="cleanAll" depends="clean,cleanJavadoc" description="Delete all files generated by this ANT file for the set version." />
			
	<!-- LIB & SOURCES -->
	<target name="clean" description="Delete the JARs for the library (classes) and for its sources for the set version.">
	<target name="junitValidation" description="Executes all JUnit tests before building the library and stop ANT at any error.">
			<junit printsummary="on" fork="yes" haltonfailure="yes">
				<classpath refid="junit.class.path" />
				<test name="tap.config.AllTests" outfile="testReports">
					<formatter type="plain" usefile="yes" />
				</test>
			</junit>
		</target>
		
		<target name="clean" depends="junitValidation" description="Delete the JARs for the library (classes) and for its sources for the set version.">
		<delete file="${libJarFile}" failonerror="false" />
		<delete file="${srcJarFile}" failonerror="false" />
		<delete dir="${compileDir}" failonerror="false" />
+1 −1
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
<!DOCTYPE project>
<project name="uws" basedir="." default="buildLib">
	
	<property name="version" value="4.0" />
	<property name="version" value="4.1" />

	<property name="srcDir" value="src" />
	<property name="compileDir" value="antBuild" />