iamsanjay commented on PR #2497: URL: https://github.com/apache/solr/pull/2497#issuecomment-2157143107
Setting different Java version for main and SolrJ resulting in error. Currently, `:solr:api:ecjLintTest ` task is failing and below is the error. ``` > Task :solr:api:ecjLintTest ---------- 1. ERROR in /Users/sanjaydutt/Documents/Solr/solr-main/solr/solr/api/src/test/org/apache/solr/util/TestSolrVersion.java (at line 19) import org.apache.solr.SolrTestCase; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The import org.apache.solr.SolrTestCase cannot be resolved ---------- 2. ERROR in /Users/sanjaydutt/Documents/Solr/solr-main/solr/solr/api/src/test/org/apache/solr/util/TestSolrVersion.java (at line 23) public class TestSolrVersion extends SolrTestCase { ^^^^^^^^^^^^ SolrTestCase cannot be resolved to a type ``` The api test cases not able to access the class, `SolrTestClass`, from the main branch. Further, I logged the java version that has been used to configure SolrJ via adding println statements. `ecj-lint.gradle` ``` allprojects { plugins.withType(JavaPlugin) { // Create a [sourceSetName]EcjLint task for each source set // with a non-empty java.srcDirs. These tasks are then // attached to project's "ecjLint" task. println "The project name is " + project + " and the sourceCompatibility is " + project.sourceCompatibility def lintTasks = sourceSets.collect { sourceSet -> def srcDirs = sourceSet.java.srcDirs.findAll { dir -> dir.exists() } tasks.create(sourceSet.getTaskName("ecjLint", null), JavaExec, {task -> .... ... ``` **Output** ``` > Configure project :solr:server The project name is project ':solr:server' and the sourceCompatibility is 21 > Configure project :solr:core The project name is project ':solr:core' and the sourceCompatibility is 21 > Configure project :solr:api The project name is project ':solr:api' and the sourceCompatibility is 17 > Configure project :solr:solrj The project name is project ':solr:solrj' and the sourceCompatibility is 17 ``` The version has changed for SolrJ and for api as well. However, as @dsmiley pointed out before that test classes for both of these project should point to 21. Still looking for a way How we can achieve that. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org