You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ps...@apache.org on 2015/07/20 02:39:07 UTC
svn commit: r1691863 - in /commons/proper/dbcp/trunk:
build.properties.sample build.xml
Author: psteitz
Date: Mon Jul 20 00:39:07 2015
New Revision: 1691863
URL: http://svn.apache.org/r1691863
Log:
Added ant target to verify that maven has generated a good jar.
Modified:
commons/proper/dbcp/trunk/build.properties.sample
commons/proper/dbcp/trunk/build.xml
Modified: commons/proper/dbcp/trunk/build.properties.sample
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/build.properties.sample?rev=1691863&r1=1691862&r2=1691863&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/build.properties.sample (original)
+++ commons/proper/dbcp/trunk/build.properties.sample Mon Jul 20 00:39:07 2015
@@ -23,6 +23,9 @@
# Repository base path
repository=${user.home}/.m2/repository
+# Maven-generated jar to validate in test-jar target
+dbcp.jar=./target/commons-dbcp2-2.1.1-SNAPSHOT.jar
+
# commons-pool.jar - path to commons-pool2-2.4
commons-pool.home=${repository}/org/apache/commons/commons-pool2/2.4.1
commons-pool.jar=${commons-pool.home}/commons-pool2-2.4.1.jar
Modified: commons/proper/dbcp/trunk/build.xml
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/build.xml?rev=1691863&r1=1691862&r2=1691863&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/build.xml (original)
+++ commons/proper/dbcp/trunk/build.xml Mon Jul 20 00:39:07 2015
@@ -210,6 +210,32 @@
</batchtest>
</junit>
</target>
+
+ <!-- Target to test that maven-generated jar works against test sources. -->
+ <target name="test-jar" depends="compile-test" description="runs (junit) unit tests">
+ <echo message="${classpath}"/>
+ <mkdir dir="${build.dir}/ant-reports"/>
+ <junit printsummary="true" showoutput="true" fork="yes" haltonfailure="${test.failonerror}">
+ <classpath>
+ <pathelement location="${build.test-classes.dir}" />
+ <pathelement path="${classpath}:${dbcp.jar}" />
+ </classpath>
+ <sysproperty key="org.apache.commons.logging.Log"
+ value="org.apache.commons.dbcp2.StackMessageLog"/>
+ <formatter type="plain" usefile="true" />
+ <!-- If test.entry is defined, run a single test, otherwise run all valid tests -->
+ <test name="${test.entry}" if="test.entry"/>
+ <batchtest todir="${build.dir}/ant-reports" unless="test.entry">
+ <fileset dir="${src.test.dir}">
+ <include name="**/*Test*.java"/>
+ <!-- Test support files -->
+ <exclude name="**/Tester*.java"/>
+ <!-- Ant JUnit does not handle abstract classes -->
+ <exclude name="**/TestConnectionPool.java"/>
+ </fileset>
+ </batchtest>
+ </junit>
+ </target>
<target name="build-jar" depends="compile">
<mkdir dir="${dist.dir}"/>