This is an automated email from the ASF dual-hosted git repository.

ffang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/karaf.git


The following commit(s) were added to refs/heads/master by this push:
     new 49bd539  add the --patch-module if those modules are available in JDK 
by default
49bd539 is described below

commit 49bd5393371c99e3dc4ea8fbdda14db1c3397f18
Author: Freeman Fang <[email protected]>
AuthorDate: Wed Jul 25 15:33:13 2018 +0800

    add the --patch-module if those modules are available in JDK by default
---
 assemblies/features/base/pom.xml                               | 10 ++++++++++
 .../base/src/main/filtered-resources/resources/bin/karaf       |  3 +++
 .../base/src/main/filtered-resources/resources/bin/karaf.bat   |  4 ----
 3 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/assemblies/features/base/pom.xml b/assemblies/features/base/pom.xml
index e81f3ab..40d5afd 100644
--- a/assemblies/features/base/pom.xml
+++ b/assemblies/features/base/pom.xml
@@ -188,6 +188,16 @@
                         <configuration>
                             <artifactItems>
                                 <artifactItem>
+                                    <groupId>org.apache.karaf.specs</groupId>
+                                    
<artifactId>org.apache.karaf.specs.locator</artifactId>
+                                    
<outputDirectory>target/classes/resources/lib/endorsed</outputDirectory>
+                                </artifactItem>
+                                <artifactItem>
+                                    <groupId>org.apache.karaf.specs</groupId>
+                                    
<artifactId>org.apache.karaf.specs.java.xml</artifactId>
+                                    
<outputDirectory>target/classes/resources/lib/endorsed</outputDirectory>
+                                </artifactItem>
+                                <artifactItem>
                                     <groupId>javax.xml.bind</groupId>
                                     <artifactId>jaxb-api</artifactId>
                                     
<outputDirectory>target/classes/resources/lib/boot</outputDirectory>
diff --git 
a/assemblies/features/base/src/main/filtered-resources/resources/bin/karaf 
b/assemblies/features/base/src/main/filtered-resources/resources/bin/karaf
index 69f9a58..73e7f00 100644
--- a/assemblies/features/base/src/main/filtered-resources/resources/bin/karaf
+++ b/assemblies/features/base/src/main/filtered-resources/resources/bin/karaf
@@ -284,6 +284,9 @@ run() {
         if [ "${ROOT_INSTANCE_RUNNING}" = "false" ] || [ 
"${CHECK_ROOT_INSTANCE_RUNNING}" = "false" ] ; then
             if [ "${VERSION}" -gt "8" ]; then
                 ${KARAF_EXEC} "${JAVA}" ${JAVA_OPTS} \
+                    --add-reads=java.xml=java.logging \
+                    --patch-module 
java.base=lib/endorsed/org.apache.karaf.specs.locator-@@project.version@@.jar \
+                    --patch-module 
java.xml=lib/endorsed/org.apache.karaf.specs.java.xml-@@project.version@@.jar \
                     --add-opens java.base/java.security=ALL-UNNAMED \
                     --add-opens java.base/java.net=ALL-UNNAMED \
                     --add-opens java.base/java.lang=ALL-UNNAMED \
diff --git 
a/assemblies/features/base/src/main/filtered-resources/resources/bin/karaf.bat 
b/assemblies/features/base/src/main/filtered-resources/resources/bin/karaf.bat
index f62f21f..b8c2a6b 100644
--- 
a/assemblies/features/base/src/main/filtered-resources/resources/bin/karaf.bat
+++ 
b/assemblies/features/base/src/main/filtered-resources/resources/bin/karaf.bat
@@ -405,10 +405,8 @@ if "%KARAF_PROFILER%" == "" goto :RUN
         if %JAVA_VERSION% GTR 8 (
             "%JAVA%" %JAVA_OPTS% %OPTS% ^
                 --add-reads=java.xml=java.logging ^
-                
--add-exports=java.base/org.apache.karaf.specs.locator=java.xml,java.xml.ws,ALL-UNNAMED
 ^
                 --patch-module 
java.base=lib/endorsed/org.apache.karaf.specs.locator-@@project.version@@.jar ^
                 --patch-module 
java.xml=lib/endorsed/org.apache.karaf.specs.java.xml-@@project.version@@.jar ^
-                --patch-module 
java.xml.ws=lib/endorsed/org.apache.karaf.specs.java.xml.ws-@@project.version@@.jar
 ^
                 --add-opens java.base/java.security=ALL-UNNAMED ^
                 --add-opens java.base/java.net=ALL-UNNAMED ^
                 --add-opens java.base/java.lang=ALL-UNNAMED ^
@@ -418,10 +416,8 @@ if "%KARAF_PROFILER%" == "" goto :RUN
                 --add-exports=java.base/sun.net.www.protocol.http=ALL-UNNAMED ^
                 --add-exports=java.base/sun.net.www.protocol.https=ALL-UNNAMED 
^
                 --add-exports=java.base/sun.net.www.protocol.jar=ALL-UNNAMED ^
-                
--add-exports=java.xml.bind/com.sun.xml.internal.bind.v2.runtime=ALL-UNNAMED ^
                 --add-exports=jdk.xml.dom/org.w3c.dom.html=ALL-UNNAMED ^
                 --add-exports=jdk.naming.rmi/com.sun.jndi.url.rmi=ALL-UNNAMED ^
-                --add-modules 
java.xml.ws.annotation,java.corba,java.transaction,java.xml.bind,java.xml.ws ^
                 -classpath "%CLASSPATH%" ^
                 -Dkaraf.instances="%KARAF_HOME%\instances" ^
                 -Dkaraf.home="%KARAF_HOME%" ^

Reply via email to