[ 
https://issues.apache.org/jira/browse/CASSANDRA-18387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17706644#comment-17706644
 ] 

Abe Ratnofsky commented on CASSANDRA-18387:
-------------------------------------------

The initial issue happened on Ant 1.10.5 - I'm able to repro on versions as new 
as these:
{code:java}
$ mvn -version
Apache Maven 3.9.1 (2e178502fcdbffc201671fb2537d0cb4b4cc58f8)
Maven home: /apache-maven-3.9.1
Java version: 11.0.18
$ ant -version
Apache Ant(TM) version 1.10.5
{code}

But then I just tried to repro with Ant 1.10.13 and got things working. When I 
go back to Maven 3.5.4 and keep Ant 1.10.13, things work! So it's the Ant 
1.10.5 that seems to be the problem. We can either increase the minimum Ant 
version check in build.xml, or just leave this thread up for folks to find who 
may be encountering this issue. Given it's the dtest-jar, it's less common that 
a user would find this.

> Fix build script for shaded jvm-dtest JAR
> -----------------------------------------
>
>                 Key: CASSANDRA-18387
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-18387
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Build, Test/dtest/java
>            Reporter: Abe Ratnofsky
>            Priority: Normal
>
> On trunk as of 6a5f84d0f44f5562776a12a678c7d68168d2c7e7, 
> ./build-shaded-dtest-jar.sh fails with errors related to 
> org.apache.tools.ant.taskdefs.optional.junit package visibility:
> {code}
> ...
>     [javac]   symbol:   class JUnitTest
>     [javac]   location: class CassandraXMLJUnitResultFormatter
>     [javac] 
> /cassandra/test/unit/org/apache/cassandra/JStackJUnitTask.java:27: error: 
> package org.apache.tools.ant.taskdefs.optional.junit does not exist
>     [javac] import org.apache.tools.ant.taskdefs.optional.junit.JUnitTask;
>     [javac]                                                    ^
>     [javac] 
> /cassandra/test/unit/org/apache/cassandra/JStackJUnitTask.java:30: error: 
> cannot find symbol
>     [javac] public class JStackJUnitTask extends JUnitTask
>     [javac]                                      ^
>     [javac]   symbol: class JUnitTask
>     [javac] Note: Processing compiler hints annotations
>     [javac] Note: Writing compiler command file at META-INF/hotspot_compiler
>     [javac] Note: Done processing compiler hints annotations
>     [javac] 22 errors
> BUILD FAILED
> /cassandra/build.xml:999: The following error occurred while executing this 
> line:
> /cassandra/build.xml:1012: Compile failed; see the compiler error output for 
> details.
> {code}
> Reproduced with Java 11, Maven 3.5.4, Ant 1.10.5.
> This is caused by the classpath exclusion of 
> {noformat}${test.lib}/jars/**/ant-*.jar{noformat}, which includes ant-junit, 
> which is depended on by org.apache.cassandra.CassandraXMLJUnitResultFormatter.
> See: 
> https://github.com/apache/cassandra/blob/6a5f84d0f44f5562776a12a678c7d68168d2c7e7/build.xml#L331
> To fix, update to include that library specifically:
> {code}
>          <fileset dir="${test.lib}/jars">
>              <include name="**/*.jar" />
>              <exclude name="**/ant-*.jar"/>
>          </fileset>
> +        <fileset dir="${test.lib}/jars">
> +            <include name="**/ant-junit-*.jar" />
> +        </fileset>
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to