You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Martin Krüger (JIRA)" <ji...@apache.org> on 2018/11/26 08:57:00 UTC

[jira] [Created] (KARAF-6021) Running karaf-maven-plugin in java 11 fails

Martin Krüger created KARAF-6021:
------------------------------------

             Summary: Running karaf-maven-plugin in java 11 fails
                 Key: KARAF-6021
                 URL: https://issues.apache.org/jira/browse/KARAF-6021
             Project: Karaf
          Issue Type: Bug
          Components: karaf
    Affects Versions: 4.2.1
            Reporter: Martin Krüger


Running karaf-maven-plugin in java 11 fails

This is because the dependency towards avax.xml.bind/jaxb-api is needed.

When applying the patch
{noformat}
diff --git a/tooling/karaf-maven-plugin/pom.xml b/tooling/karaf-maven-plugin/pom.xml
index 4f9cb04c7c..1d87604c10 100644
--- a/tooling/karaf-maven-plugin/pom.xml
+++ b/tooling/karaf-maven-plugin/pom.xml
@@ -414,6 +414,19 @@
                 </property>
             </activation>
         </profile>
+        <profile>
+            <id>java9-plus</id>
+            <dependencies>
+                <dependency>
+                    <groupId>javax.xml.bind</groupId>
+                    <artifactId>jaxb-api</artifactId>
+                    <version>${jaxb.version}</version>
+                </dependency>
+            </dependencies>
+            <activation>
+                <jdk>[9,)</jdk>
+            </activation>
+        </profile>
         <profile>
             <id>java11</id>
             <activation>
{noformat}
then the problem is gone.

But maybe the dependency should be declared regardless of the compiler version used to compile the plugin because the version you run when using the plugin is essential.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)