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

ASF GitHub Bot commented on KARAF-6021:
---------------------------------------

jbonofre closed pull request #681: [KARAF-6021] Add missing dependency allowing 
karaf-maven-plugin to work with Java11
URL: https://github.com/apache/karaf/pull/681
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/tooling/karaf-maven-plugin/pom.xml 
b/tooling/karaf-maven-plugin/pom.xml
index 4f9cb04c7c..5fdc7210f0 100644
--- a/tooling/karaf-maven-plugin/pom.xml
+++ b/tooling/karaf-maven-plugin/pom.xml
@@ -219,6 +219,11 @@
             <groupId>org.apache.xbean</groupId>
             <artifactId>xbean-finder-shaded</artifactId>
         </dependency>
+        <dependency>
+            <groupId>javax.xml.bind</groupId>
+            <artifactId>jaxb-api</artifactId>
+            <version>${jaxb.version}</version>
+        </dependency>
     </dependencies>
 
     <build>
@@ -377,7 +382,6 @@
         </plugins>
     </build>
 
-
     <reporting>
         <!--<outputDirectory>target/site</outputDirectory>-->
         <plugins>


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> 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
>            Assignee: Jean-Baptiste Onofré
>            Priority: Major
>             Fix For: 4.2.2
>
>
> 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)

Reply via email to