Author: todd
Date: Mon Sep 27 23:51:22 2010
New Revision: 1001967
URL: http://svn.apache.org/viewvc?rev=1001967&view=rev
Log:
THRIFT-931. java: Use log4j for Java tests
Modified:
incubator/thrift/trunk/lib/java/build.xml
incubator/thrift/trunk/lib/java/ivy.xml
Modified: incubator/thrift/trunk/lib/java/build.xml
URL:
http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/java/build.xml?rev=1001967&r1=1001966&r2=1001967&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/java/build.xml (original)
+++ incubator/thrift/trunk/lib/java/build.xml Mon Sep 27 23:51:22 2010
@@ -55,15 +55,14 @@
<!-- TODO: Get the appropriate tokens / URL for upload -->
<property name="apache.snapshot.repository"
value="https://repository.apache.org/content/repositories/snapshots" />
-
+
<path id="compile.classpath">
- <fileset dir="${ivy.lib.dir}">
- <include name="**/*.jar" />
- </fileset>
+ <path refid="ivy.compile.classpath" />
</path>
<path id="test.classpath">
<path refid="compile.classpath" />
+ <path refid="ivy.test.classpath" />
<pathelement path="${env.CLASSPATH}" />
<pathelement location="build/test" />
<pathelement location="${jar.file}" />
@@ -118,6 +117,8 @@
<target name="resolve" depends="ivy-init-antlib" description="retrieve
dependencies with ivy" unless="noivy">
<ivy:retrieve />
+ <ivy:cachepath pathid="ivy.compile.classpath" conf="compile" />
+ <ivy:cachepath pathid="ivy.test.classpath" conf="test" />
</target>
<target name="compile" depends="init,resolve">
@@ -172,6 +173,9 @@
<javac debug="true" srcdir="${gen}" destdir="${build.test}"
classpathref="test.classpath" />
<javac debug="true" srcdir="${genbean}" destdir="${build.test}"
classpathref="test.classpath" />
<javac debug="true" srcdir="${src.test}" destdir="${build.test}"
classpathref="test.classpath" />
+ <copy todir="${build.test}">
+ <fileset dir="${src.test}" includes="log4j.properties" />
+ </copy>
</target>
<property name="build.test" location="${build.dir}/test"/>
Modified: incubator/thrift/trunk/lib/java/ivy.xml
URL:
http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/java/ivy.xml?rev=1001967&r1=1001966&r2=1001967&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/java/ivy.xml (original)
+++ incubator/thrift/trunk/lib/java/ivy.xml Mon Sep 27 23:51:22 2010
@@ -21,11 +21,15 @@
<repository name="apache repository"
url="http://incubator.apache.org/thrift/" />
<description homepage="http://incubator.apache.org/thrift/" />
</info>
+ <configurations defaultconfmapping="compile">
+ <conf name="compile" />
+ <conf name="test" extends="compile" visibility="private" />
+ </configurations>
<dependencies>
<dependency org="org.slf4j" name="slf4j-api" rev="1.5.8" conf="* ->
*,!sources,!javadoc"/>
- <dependency org="org.slf4j" name="slf4j-simple" rev="1.5.8" conf="* ->
*,!sources,!javadoc"/>
+ <dependency org="org.slf4j" name="slf4j-log4j12" rev="1.5.8" conf="test
-> *,!sources,!javadoc"/>
<dependency org="commons-lang" name="commons-lang" rev="2.5" conf="* ->
*,!sources,!javadoc"/>
- <dependency org="junit" name="junit" rev="4.4" conf="* ->
*,!sources,!javadoc"/>
+ <dependency org="junit" name="junit" rev="4.4" conf="test ->
*,!sources,!javadoc"/>
<dependency org="javax.servlet" name="servlet-api" rev="2.5" conf="* ->
*,!sources,!javadoc"/>
</dependencies>
</ivy-module>