You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Brandon Williams (Jira)" <ji...@apache.org> on 2021/04/07 21:32:00 UTC
[jira] [Comment Edited] (CASSANDRA-16571) "multiple versions of ant
detected in path for junit" printed for every junit test case spawned by
"ant test"
[ https://issues.apache.org/jira/browse/CASSANDRA-16571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17316699#comment-17316699 ]
Brandon Williams edited comment on CASSANDRA-16571 at 4/7/21, 9:31 PM:
-----------------------------------------------------------------------
Hmm, even with a little extra effort:
{noformat}
diff --git a/build.xml b/build.xml
index 15f3219..2a0b7fd 100644
--- a/build.xml
+++ b/build.xml
@@ -267,15 +267,18 @@
<pathelement location="${build.classes.main}" />
<fileset dir="${build.dir.lib}">
<include name="**/*.jar" />
+ <exclude name="**/ant-*.jar"/>
</fileset>
</path>
<path id="cassandra.classpath.test">
<file file="${build.dir}/${final.name}.jar"/> <!-- we need the jar for tests and benchmarks (multi-version jar) -->
<fileset dir="${build.dir.lib}">
<include name="**/*.jar" />
+ <exclude name="**/ant-*.jar"/>
</fileset>
<fileset dir="${test.lib}/jars">
<include name="**/*.jar" />
+ <exclude name="**/ant-*.jar"/>
</fileset>
</path>
@@ -718,7 +721,6 @@
<dependency groupId="org.openjdk.jmh" artifactId="jmh-core" scope="test"/>
<dependency groupId="org.openjdk.jmh" artifactId="jmh-generator-annprocess" scope="test"/>
<dependency groupId="net.ju-n.compile-command-annotations" artifactId="compile-command-annotations" scope="test"/>
- <dependency groupId="org.apache.ant" artifactId="ant-junit" version="1.9.7" scope="test"/>
<!-- adding this dependency is necessary for assertj. When updating assertj, need to also update the version of
this that the new assertj's `assertj-parent-pom` depends on. -->
<dependency groupId="org.junit" artifactId="junit-bom" type="pom" scope="test"/>
{noformat}
I still get:
{noformat}
[junit-timeout] WARNING: multiple versions of ant detected in path for junit
[junit-timeout] jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/Project.class
[junit-timeout] and jar:file:/home/ubuntu/cassandra/build/test/lib/jars/ant-1.9.7.jar!/org/apache/tools/ant/Project.class
{noformat}
was (Author: brandon.williams):
Hmm, even with a little extra effort:
{quote}
diff --git a/build.xml b/build.xml
index 15f3219..2a0b7fd 100644
--- a/build.xml
+++ b/build.xml
@@ -267,15 +267,18 @@
<pathelement location="${build.classes.main}" />
<fileset dir="${build.dir.lib}">
<include name="**/*.jar" />
+ <exclude name="**/ant-*.jar"/>
</fileset>
</path>
<path id="cassandra.classpath.test">
<file file="${build.dir}/${final.name}.jar"/> <!-- we need the jar for tests and benchmarks (multi-version jar) -->
<fileset dir="${build.dir.lib}">
<include name="**/*.jar" />
+ <exclude name="**/ant-*.jar"/>
</fileset>
<fileset dir="${test.lib}/jars">
<include name="**/*.jar" />
+ <exclude name="**/ant-*.jar"/>
</fileset>
</path>
@@ -718,7 +721,6 @@
<dependency groupId="org.openjdk.jmh" artifactId="jmh-core" scope="test"/>
<dependency groupId="org.openjdk.jmh" artifactId="jmh-generator-annprocess" scope="test"/>
<dependency groupId="net.ju-n.compile-command-annotations" artifactId="compile-command-annotations" scope="test"/>
- <dependency groupId="org.apache.ant" artifactId="ant-junit" version="1.9.7" scope="test"/>
<!-- adding this dependency is necessary for assertj. When updating assertj, need to also update the version of
this that the new assertj's `assertj-parent-pom` depends on. -->
<dependency groupId="org.junit" artifactId="junit-bom" type="pom" scope="test"/>
{quote}
I still get:
{quote}
[junit-timeout] WARNING: multiple versions of ant detected in path for junit
[junit-timeout] jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/Project.class
[junit-timeout] and jar:file:/home/ubuntu/cassandra/build/test/lib/jars/ant-1.9.7.jar!/org/apache/tools/ant/Project.class
{quote}
> "multiple versions of ant detected in path for junit" printed for every junit test case spawned by "ant test"
> -------------------------------------------------------------------------------------------------------------
>
> Key: CASSANDRA-16571
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16571
> Project: Cassandra
> Issue Type: Bug
> Components: Build
> Reporter: Ekaterina Dimitrova
> Assignee: Ekaterina Dimitrova
> Priority: Normal
> Fix For: 4.0.x
>
>
> I saw this warning for the first time after CASSANDRA-16391. To be confirmed that it wasn't there with some of the previous patches.
> The same warning was taken care of in CASSANDRA-13232
> Seems to me that the issue is similar but the fix will be different.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org