singhpk234 commented on code in PR #1517:
URL: https://github.com/apache/polaris/pull/1517#discussion_r2081932271


##########
quarkus/common/build.gradle.kts:
##########
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+plugins {
+    alias(libs.plugins.jandex)
+}
+
+configurations.all {
+    exclude(group = "org.antlr", module = "antlr4-runtime")
+    exclude(group = "org.scala-lang", module = "scala-library")
+    exclude(group = "org.scala-lang", module = "scala-reflect")
+}
+
+java {
+    sourceCompatibility = JavaVersion.VERSION_21
+    targetCompatibility = JavaVersion.VERSION_21

Review Comment:
   > Well, actually, this is not correct. Although Polaris can be built with 
any JDK ≥21, [the target version must be 
21](https://github.com/apache/polaris/blob/9377aa731a64d6262dc7cc177d8a457d14c46f0a/build-logic/src/main/kotlin/polaris-server.gradle.kts#L24).
   
   I see, so source can be 23 but the target is 21, i think i missed that. 
   
   > AFAICT, 
[this](https://github.com/apache/polaris/blob/38013e49bd9edc24db4a706e0e8fe5bd4ed2a885/quarkus/common/build.gradle.kts)
 is the build file that was used by the CI job you linked. It does not contain 
any directive that pulls the common settings defined in polaris-quarkus, which 
is most likely the cause of the error.
   
   yes thats true, and it was suggested to remove the directive (maybe since we 
know this fact we can make the target vs explicit to 21) ? 
   
   > Robert's suggestion is that you probably want to add id("polaris-quarkus") 
inside the plugins block of polaris/quarkus/common/build.gradle.kts`.
   
   I tried, as i mentioned above this doesn;t work 
   
   ```
   diff --git a/quarkus/common/build.gradle.kts 
b/quarkus/common/build.gradle.kts
   index 353e50df..430bee88 100644
   --- a/quarkus/common/build.gradle.kts
   +++ b/quarkus/common/build.gradle.kts
   @@ -19,12 +19,13 @@
    
    plugins {
        alias(libs.plugins.jandex)
   +    id("polaris-quarkus")
    }
    
   -java {
   -    sourceCompatibility = JavaVersion.toVersion(findProperty("javaVersion") 
as String? ?: JavaVersion.VERSION_21)
   -    targetCompatibility = JavaVersion.toVersion(findProperty("javaVersion") 
as String? ?: JavaVersion.VERSION_21)
   -}
   +//java {
   +//    sourceCompatibility = 
JavaVersion.toVersion(findProperty("javaVersion") as String? ?: 
JavaVersion.VERSION_21)
   +//    targetCompatibility = 
JavaVersion.toVersion(findProperty("javaVersion") as String? ?: 
JavaVersion.VERSION_21)
   +//}
    
    dependencies {
        compileOnly(libs.smallrye.config.core)
   ```
   
   Failure 
   
   ```
   ➜  polaris git:(enhancement/add-retries) ✗ ./gradlew assemble 
   Configuration on demand is an incubating feature.
   
   [Incubating] Problems report is available at: 
file:///Users/prsingh/Desktop/oss-work/polaris/build/reports/problems/problems-report.html
   
   FAILURE: Build failed with an exception.
   
   * Where:
   Build file 
'/Users/prsingh/Desktop/oss-work/polaris/quarkus/common/build.gradle.kts' line: 
20
   
   * What went wrong:
   An exception occurred applying plugin request [id: 'polaris-quarkus']
   > Failed to apply plugin 'polaris-quarkus'.
      > Could not create domain object 'intTest' (JvmTestSuite)
      ```



-- 
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...@polaris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to