[karaf] branch karaf-4.2.x updated: [KARAF-7276]LinkageError when receiving SOAP message with attachments
This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch karaf-4.2.x in repository https://gitbox.apache.org/repos/asf/karaf.git The following commit(s) were added to refs/heads/karaf-4.2.x by this push: new 2a66ce7 [KARAF-7276]LinkageError when receiving SOAP message with attachments 2a66ce7 is described below commit 2a66ce7651332cdf3161dbc8ce5159dd8eed7e22 Author: Freeman Fang AuthorDate: Thu Nov 18 11:03:31 2021 -0500 [KARAF-7276]LinkageError when receiving SOAP message with attachments (cherry picked from commit 81168a5d5694c6d4ca6e1dd4003a8e231d7e6edb) (cherry picked from commit 6d44d65a84a581802904c3185a46462d4f98ad63) --- assemblies/features/base/pom.xml | 10 +- .../src/main/filtered-resources/resources/etc/jre.properties | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/assemblies/features/base/pom.xml b/assemblies/features/base/pom.xml index d2290eb..ac69baa 100644 --- a/assemblies/features/base/pom.xml +++ b/assemblies/features/base/pom.xml @@ -59,9 +59,9 @@ ${javax.annotation.version} -com.sun.activation -javax.activation -1.2.0 +org.apache.servicemix.specs + org.apache.servicemix.specs.activation-api-1.2.1 +1.2.1_3 org.glassfish.jaxb @@ -203,8 +203,8 @@ target/classes/resources/lib/jdk9plus -com.sun.activation -javax.activation + org.apache.servicemix.specs + org.apache.servicemix.specs.activation-api-1.2.1 target/classes/resources/lib/jdk9plus diff --git a/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties b/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties index 46ffd27..2dcf885 100644 --- a/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties +++ b/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties @@ -578,6 +578,7 @@ jre-9= \ javax.activity, \ javax.annotation;version="1.3", \ javax.annotation.processing;version="1.0", \ + javax.activation;version="1.2.1", \ javax.crypto, \ javax.crypto.interfaces, \ javax.crypto.spec, \
[karaf] branch karaf-4.3.x updated: [KARAF-7276]LinkageError when receiving SOAP message with attachments
This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch karaf-4.3.x in repository https://gitbox.apache.org/repos/asf/karaf.git The following commit(s) were added to refs/heads/karaf-4.3.x by this push: new 6d44d65 [KARAF-7276]LinkageError when receiving SOAP message with attachments 6d44d65 is described below commit 6d44d65a84a581802904c3185a46462d4f98ad63 Author: Freeman Fang AuthorDate: Thu Nov 18 11:03:31 2021 -0500 [KARAF-7276]LinkageError when receiving SOAP message with attachments (cherry picked from commit 81168a5d5694c6d4ca6e1dd4003a8e231d7e6edb) --- assemblies/features/base/pom.xml | 10 +- .../src/main/filtered-resources/resources/etc/jre.properties | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/assemblies/features/base/pom.xml b/assemblies/features/base/pom.xml index 28b16da..719c3c6 100644 --- a/assemblies/features/base/pom.xml +++ b/assemblies/features/base/pom.xml @@ -59,9 +59,9 @@ ${javax.annotation.version} -com.sun.activation -javax.activation -1.2.0 +org.apache.servicemix.specs + org.apache.servicemix.specs.activation-api-1.2.1 +1.2.1_3 org.glassfish.jaxb @@ -197,8 +197,8 @@ target/classes/resources/lib/jdk9plus -com.sun.activation -javax.activation + org.apache.servicemix.specs + org.apache.servicemix.specs.activation-api-1.2.1 target/classes/resources/lib/jdk9plus diff --git a/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties b/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties index b7bfdf8..944188c 100644 --- a/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties +++ b/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties @@ -647,6 +647,7 @@ jre-9= \ javax.activity, \ javax.annotation;version="1.3", \ javax.annotation.processing;version="1.0", \ + javax.activation;version="1.2.1", \ javax.crypto, \ javax.crypto.interfaces, \ javax.crypto.spec, \
[karaf] branch main updated: [KARAF-7276]LinkageError when receiving SOAP message with attachments
This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/karaf.git The following commit(s) were added to refs/heads/main by this push: new 81168a5 [KARAF-7276]LinkageError when receiving SOAP message with attachments 81168a5 is described below commit 81168a5d5694c6d4ca6e1dd4003a8e231d7e6edb Author: Freeman Fang AuthorDate: Thu Nov 18 11:03:31 2021 -0500 [KARAF-7276]LinkageError when receiving SOAP message with attachments --- assemblies/features/base/pom.xml | 10 +- .../src/main/filtered-resources/resources/etc/jre.properties | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/assemblies/features/base/pom.xml b/assemblies/features/base/pom.xml index 5d6f495..11fcbc1 100644 --- a/assemblies/features/base/pom.xml +++ b/assemblies/features/base/pom.xml @@ -59,9 +59,9 @@ ${javax.annotation.version} -com.sun.activation -javax.activation -1.2.0 +org.apache.servicemix.specs + org.apache.servicemix.specs.activation-api-1.2.1 +1.2.1_3 org.glassfish.jaxb @@ -197,8 +197,8 @@ target/classes/resources/lib/jdk9plus -com.sun.activation -javax.activation + org.apache.servicemix.specs + org.apache.servicemix.specs.activation-api-1.2.1 target/classes/resources/lib/jdk9plus diff --git a/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties b/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties index b7bfdf8..944188c 100644 --- a/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties +++ b/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties @@ -647,6 +647,7 @@ jre-9= \ javax.activity, \ javax.annotation;version="1.3", \ javax.annotation.processing;version="1.0", \ + javax.activation;version="1.2.1", \ javax.crypto, \ javax.crypto.interfaces, \ javax.crypto.spec, \
[karaf] branch main updated: [KARAF-7225]ensure karaf can build and run with JDK17
This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/karaf.git The following commit(s) were added to refs/heads/main by this push: new e449416 [KARAF-7225]ensure karaf can build and run with JDK17 e449416 is described below commit e449416b968329984e619ced73eb37f7da38dca3 Author: Freeman Fang AuthorDate: Tue Jul 20 15:36:44 2021 -0400 [KARAF-7225]ensure karaf can build and run with JDK17 --- .../features/base/src/main/filtered-resources/resources/bin/karaf | 3 ++- .../base/src/main/filtered-resources/resources/bin/karaf.bat| 3 ++- .../src/main/filtered-resources/resources/etc/config.properties | 6 ++ .../base/src/main/filtered-resources/resources/etc/jre.properties | 1 + examples/karaf-cdi-example/karaf-cdi-example-consumer/pom.xml | 4 +--- examples/karaf-cdi-example/karaf-cdi-example-provider/pom.xml | 4 +--- .../apache/karaf/instance/core/internal/InstanceServiceImpl.java| 1 + .../org/apache/karaf/instance/resources/etc/config.properties | 6 ++ .../src/main/java/org/apache/karaf/itests/KarafTestSupport.java | 1 + itests/test/src/test/filtered-resources/etc/config.properties | 6 ++ .../itests/mavenresolver/KarafMinimalMonitoredTestSupport.java | 1 + .../org/apache/karaf/jaas/modules/krb5/Krb5LoginModuleTest.java | 5 +++-- main/src/test/resources/test-karaf-home/etc/config.properties | 6 ++ main/src/test/resources/test-karaf-home/etc/jre.properties | 2 ++ .../main/java/org/apache/karaf/management/internal/Activator.java | 2 +- .../apache/karaf/wrapper/internal/unix/karaf-wrapper-java11.conf| 2 +- .../apache/karaf/wrapper/internal/windows/karaf-wrapper-java11.conf | 2 +- .../karaf/wrapper/internal/windows64/karaf-wrapper-java11.conf | 2 +- 18 files changed, 43 insertions(+), 14 deletions(-) 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 48bc56a..46505c0 100644 --- a/assemblies/features/base/src/main/filtered-resources/resources/bin/karaf +++ b/assemblies/features/base/src/main/filtered-resources/resources/bin/karaf @@ -320,7 +320,8 @@ run() { --add-exports=java.base/sun.net.www.content.text=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-exports java.security.sasl/com.sun.security.sasl=ALL-UNNAMED \ +--add-exports=java.rmi/sun.rmi.registry=ALL-UNNAMED \ + --add-exports=java.security.sasl/com.sun.security.sasl=ALL-UNNAMED \ -Dkaraf.instances="${KARAF_HOME}/instances" \ -Dkaraf.home="${KARAF_HOME}" \ -Dkaraf.base="${KARAF_BASE}" \ 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 437adc1..7e161c8 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 @@ -438,7 +438,8 @@ if "%KARAF_PROFILER%" == "" goto :RUN --add-exports=java.base/sun.net.www.content.text=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-exports java.security.sasl/com.sun.security.sasl=ALL-UNNAMED ^ +--add-exports=java.rmi/sun.rmi.registry=ALL-UNNAMED ^ + --add-exports=java.security.sasl/com.sun.security.sasl=ALL-UNNAMED ^ -classpath "%CLASSPATH%" ^ -Dkaraf.instances="%KARAF_HOME%\instances" ^ -Dkaraf.home="%KARAF_HOME%" ^ diff --git a/assemblies/features/base/src/main/filtered-resources/resources/etc/config.properties b/assemblies/features/base/src/main/filtered-resources/resources/etc/config.properties index 88000a1..84eca3e 100644 --- a/assemblies/features/base/src/main/filtered-resources/resources/etc/config.properties +++ b/assemblies/features/base/src/main/filtered-resources/resources/etc/config.properties @@ -125,6 +125,12 @@ equinox-capabilities= \ osgi.service;objectClass:List=org.eclipse.osgi.service.security.TrustEngine;osgi.signedcontent.trust.engine=org.eclipse.osgi, \ osgi.service;objectClass:List=org.eclipse.osgi.service.urlconversion.URLConverter;protocol:List="bundleentry,bundleresource" +eecap-17 = osgi.ee; osgi.ee="OSGi/Minimum"; version:List="1.0,1.1,1.2", \ + osgi.ee; osgi.ee="JavaSE&
[karaf] branch karaf-4.2.x updated: [KARAF-7164]Pax-Exam failure to Start Karaf container Java > 8
This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch karaf-4.2.x in repository https://gitbox.apache.org/repos/asf/karaf.git The following commit(s) were added to refs/heads/karaf-4.2.x by this push: new b14a2c2 [KARAF-7164]Pax-Exam failure to Start Karaf container Java > 8 b14a2c2 is described below commit b14a2c2b354f00faf2f9edd374ca6fea43a9fded Author: Freeman Fang AuthorDate: Wed May 26 14:43:59 2021 -0400 [KARAF-7164]Pax-Exam failure to Start Karaf container Java > 8 (cherry picked from commit cb22aeb91e99b7cc7622b22af255aac8f478798a) --- .../common/src/main/java/org/apache/karaf/itests/KarafTestSupport.java | 1 + itests/test/pom.xml | 1 + .../karaf/itests/mavenresolver/KarafMinimalMonitoredTestSupport.java | 1 + 3 files changed, 3 insertions(+) diff --git a/itests/common/src/main/java/org/apache/karaf/itests/KarafTestSupport.java b/itests/common/src/main/java/org/apache/karaf/itests/KarafTestSupport.java index 86a0a2b..279b6cb 100644 --- a/itests/common/src/main/java/org/apache/karaf/itests/KarafTestSupport.java +++ b/itests/common/src/main/java/org/apache/karaf/itests/KarafTestSupport.java @@ -251,6 +251,7 @@ public class KarafTestSupport { KarafDistributionOption.editConfigurationFilePut("etc/branding.properties", "welcome", ""), // No welcome banner KarafDistributionOption.editConfigurationFilePut("etc/branding-ssh.properties", "welcome", ""), new VMOption("--add-reads=java.xml=java.logging"), +new VMOption("--add-exports=java.base/org.apache.karaf.specs.locator=java.xml,ALL-UNNAMED"), new VMOption("--patch-module"), new VMOption("java.base=lib/endorsed/org.apache.karaf.specs.locator-" + System.getProperty("karaf.version") + ".jar"), diff --git a/itests/test/pom.xml b/itests/test/pom.xml index 98b434c..48d5c1d 100644 --- a/itests/test/pom.xml +++ b/itests/test/pom.xml @@ -327,6 +327,7 @@ ${spring.security53.version} ${spring.security54.version} ${activemq.version} +${project.version} file:src/test/resources/controlled-exam.properties diff --git a/itests/test/src/test/java/org/apache/karaf/itests/mavenresolver/KarafMinimalMonitoredTestSupport.java b/itests/test/src/test/java/org/apache/karaf/itests/mavenresolver/KarafMinimalMonitoredTestSupport.java index 5fccfc5..21cef9d 100644 --- a/itests/test/src/test/java/org/apache/karaf/itests/mavenresolver/KarafMinimalMonitoredTestSupport.java +++ b/itests/test/src/test/java/org/apache/karaf/itests/mavenresolver/KarafMinimalMonitoredTestSupport.java @@ -91,6 +91,7 @@ public abstract class KarafMinimalMonitoredTestSupport { editConfigurationFilePut("etc/startup.properties", "file:../../" + new File(url.toURI()).getName(), "1"), composite(editConfigurationFilePut("etc/org.apache.karaf.features.cfg", new File("target/test-classes/etc/org.apache.karaf.features.cfg"))), new VMOption("--add-reads=java.xml=java.logging"), +new VMOption("--add-exports=java.base/org.apache.karaf.specs.locator=java.xml,ALL-UNNAMED"), new VMOption("--patch-module"), new VMOption("java.base=lib/endorsed/org.apache.karaf.specs.locator-" + System.getProperty("karaf.version") + ".jar"),
[karaf] branch main updated: [KARAF-7164]Pax-Exam failure to Start Karaf container Java > 8
This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/karaf.git The following commit(s) were added to refs/heads/main by this push: new cb22aeb [KARAF-7164]Pax-Exam failure to Start Karaf container Java > 8 cb22aeb is described below commit cb22aeb91e99b7cc7622b22af255aac8f478798a Author: Freeman Fang AuthorDate: Wed May 26 14:43:59 2021 -0400 [KARAF-7164]Pax-Exam failure to Start Karaf container Java > 8 --- .../common/src/main/java/org/apache/karaf/itests/KarafTestSupport.java | 1 + itests/test/pom.xml | 1 + .../karaf/itests/mavenresolver/KarafMinimalMonitoredTestSupport.java | 1 + 3 files changed, 3 insertions(+) diff --git a/itests/common/src/main/java/org/apache/karaf/itests/KarafTestSupport.java b/itests/common/src/main/java/org/apache/karaf/itests/KarafTestSupport.java index b267e03..e57ce89 100644 --- a/itests/common/src/main/java/org/apache/karaf/itests/KarafTestSupport.java +++ b/itests/common/src/main/java/org/apache/karaf/itests/KarafTestSupport.java @@ -252,6 +252,7 @@ public class KarafTestSupport { KarafDistributionOption.editConfigurationFilePut("etc/branding.properties", "welcome", ""), // No welcome banner KarafDistributionOption.editConfigurationFilePut("etc/branding-ssh.properties", "welcome", ""), new VMOption("--add-reads=java.xml=java.logging"), +new VMOption("--add-exports=java.base/org.apache.karaf.specs.locator=java.xml,ALL-UNNAMED"), new VMOption("--patch-module"), new VMOption("java.base=lib/endorsed/org.apache.karaf.specs.locator-" + System.getProperty("karaf.version") + ".jar"), diff --git a/itests/test/pom.xml b/itests/test/pom.xml index 9aeaead..0d98a20 100644 --- a/itests/test/pom.xml +++ b/itests/test/pom.xml @@ -327,6 +327,7 @@ ${spring.security53.version} ${spring.security54.version} ${activemq.version} +${project.version} file:src/test/resources/controlled-exam.properties diff --git a/itests/test/src/test/java/org/apache/karaf/itests/mavenresolver/KarafMinimalMonitoredTestSupport.java b/itests/test/src/test/java/org/apache/karaf/itests/mavenresolver/KarafMinimalMonitoredTestSupport.java index 5fccfc5..21cef9d 100644 --- a/itests/test/src/test/java/org/apache/karaf/itests/mavenresolver/KarafMinimalMonitoredTestSupport.java +++ b/itests/test/src/test/java/org/apache/karaf/itests/mavenresolver/KarafMinimalMonitoredTestSupport.java @@ -91,6 +91,7 @@ public abstract class KarafMinimalMonitoredTestSupport { editConfigurationFilePut("etc/startup.properties", "file:../../" + new File(url.toURI()).getName(), "1"), composite(editConfigurationFilePut("etc/org.apache.karaf.features.cfg", new File("target/test-classes/etc/org.apache.karaf.features.cfg"))), new VMOption("--add-reads=java.xml=java.logging"), +new VMOption("--add-exports=java.base/org.apache.karaf.specs.locator=java.xml,ALL-UNNAMED"), new VMOption("--patch-module"), new VMOption("java.base=lib/endorsed/org.apache.karaf.specs.locator-" + System.getProperty("karaf.version") + ".jar"),
[karaf] branch karaf-4.2.x updated: [KARAF-7095]JDK11+: we should use full lib path when patch-module
This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch karaf-4.2.x in repository https://gitbox.apache.org/repos/asf/karaf.git The following commit(s) were added to refs/heads/karaf-4.2.x by this push: new 5b0f473 [KARAF-7095]JDK11+: we should use full lib path when patch-module 5b0f473 is described below commit 5b0f473e6dd677e412bdb5cbe0720c13a8a69850 Author: Freeman Fang AuthorDate: Wed Apr 7 15:55:24 2021 -0400 [KARAF-7095]JDK11+: we should use full lib path when patch-module (cherry picked from commit 33174f7c6980795de9829b42f98d8b9903948f6f) --- .../features/base/src/main/filtered-resources/resources/bin/karaf | 4 ++-- .../features/base/src/main/filtered-resources/resources/bin/karaf.bat | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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 f9d967e..8f84db2 100755 --- a/assemblies/features/base/src/main/filtered-resources/resources/bin/karaf +++ b/assemblies/features/base/src/main/filtered-resources/resources/bin/karaf @@ -308,8 +308,8 @@ run() { ${KARAF_EXEC} "${JAVA}" ${JAVA_OPTS} \ --add-reads=java.xml=java.logging \ --add-exports=java.base/org.apache.karaf.specs.locator=java.xml,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.base=${KARAF_HOME}/lib/endorsed/org.apache.karaf.specs.locator-@@project.version@@.jar \ +--patch-module java.xml=${KARAF_HOME}/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 95e862e..9b16adc 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 @@ -428,8 +428,8 @@ if "%KARAF_PROFILER%" == "" goto :RUN "%JAVA%" %JAVA_OPTS% %OPTS% ^ --add-reads=java.xml=java.logging ^ --add-exports=java.base/org.apache.karaf.specs.locator=java.xml,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.base=%KARAF_HOME%\lib\endorsed\org.apache.karaf.specs.locator-@@project.version@@.jar ^ +--patch-module java.xml=%KARAF_HOME%\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 ^
[karaf] branch main updated: [KARAF-7095]JDK11+: we should use full lib path when patch-module
This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/karaf.git The following commit(s) were added to refs/heads/main by this push: new 33174f7 [KARAF-7095]JDK11+: we should use full lib path when patch-module new 6d0ba35 Merge branch 'main' of github.com:apache/karaf into main 33174f7 is described below commit 33174f7c6980795de9829b42f98d8b9903948f6f Author: Freeman Fang AuthorDate: Wed Apr 7 15:55:24 2021 -0400 [KARAF-7095]JDK11+: we should use full lib path when patch-module --- .../features/base/src/main/filtered-resources/resources/bin/karaf | 4 ++-- .../features/base/src/main/filtered-resources/resources/bin/karaf.bat | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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 0bc0f67..48bc56a 100644 --- a/assemblies/features/base/src/main/filtered-resources/resources/bin/karaf +++ b/assemblies/features/base/src/main/filtered-resources/resources/bin/karaf @@ -304,8 +304,8 @@ run() { ${KARAF_EXEC} "${JAVA}" ${JAVA_OPTS} \ --add-reads=java.xml=java.logging \ --add-exports=java.base/org.apache.karaf.specs.locator=java.xml,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.base=${KARAF_HOME}/lib/endorsed/org.apache.karaf.specs.locator-@@project.version@@.jar \ +--patch-module java.xml=${KARAF_HOME}/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 8f95ae1..68f72cb 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 @@ -422,8 +422,8 @@ if "%KARAF_PROFILER%" == "" goto :RUN "%JAVA%" %JAVA_OPTS% %OPTS% ^ --add-reads=java.xml=java.logging ^ --add-exports=java.base/org.apache.karaf.specs.locator=java.xml,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.base=%KARAF_HOME%\lib\endorsed\org.apache.karaf.specs.locator-@@project.version@@.jar ^ +--patch-module java.xml=%KARAF_HOME%\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 ^
[karaf] branch karaf-4.2.x updated: [KARAF-7089]Upgrade to CXF 3.4.3
This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch karaf-4.2.x in repository https://gitbox.apache.org/repos/asf/karaf.git The following commit(s) were added to refs/heads/karaf-4.2.x by this push: new d1cfef3 [KARAF-7089]Upgrade to CXF 3.4.3 d1cfef3 is described below commit d1cfef31119395a49722b340c62099b4c702cd9b Author: Freeman Fang AuthorDate: Tue Mar 30 20:09:50 2021 -0400 [KARAF-7089]Upgrade to CXF 3.4.3 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1ecfddb..ed1d4ff 100644 --- a/pom.xml +++ b/pom.xml @@ -149,7 +149,7 @@ 1.66 3.6.0 3.2.9_1 -3.4.0 +3.4.3 2.10.5 5.8.0 2.3.3
[karaf] branch main updated: [KARAF-7089]Upgrade to CXF 3.4.3
This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/karaf.git The following commit(s) were added to refs/heads/main by this push: new 54d2ec0 [KARAF-7089]Upgrade to CXF 3.4.3 54d2ec0 is described below commit 54d2ec09b3b535f7cddbb4219bf6893e32edc10f Author: Freeman Fang AuthorDate: Tue Mar 30 20:08:10 2021 -0400 [KARAF-7089]Upgrade to CXF 3.4.3 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 315e8ea..8d12665 100644 --- a/pom.xml +++ b/pom.xml @@ -146,7 +146,7 @@ 1.66 3.6.0 3.2.9_1 -3.4.0 +3.4.3 2.11.3 5.8.0 2.3.3
[karaf] branch karaf-4.2.x updated: [KARAF-5362]remove unnecessary try..catch from the test
This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch karaf-4.2.x in repository https://gitbox.apache.org/repos/asf/karaf.git The following commit(s) were added to refs/heads/karaf-4.2.x by this push: new a692529 [KARAF-5362]remove unnecessary try..catch from the test a692529 is described below commit a6925291cc57b9274e3ba6580921e44566df7857 Author: Freeman Fang AuthorDate: Mon Mar 29 14:13:16 2021 -0400 [KARAF-5362]remove unnecessary try..catch from the test (cherry picked from commit ae5e22c2bd89d272c2c9fb91da3fa4c0db11bcc2) --- .../karaf/shell/impl/console/session/SessionFactoryImplTest.java | 4 1 file changed, 4 deletions(-) diff --git a/shell/core/src/test/java/org/apache/karaf/shell/impl/console/session/SessionFactoryImplTest.java b/shell/core/src/test/java/org/apache/karaf/shell/impl/console/session/SessionFactoryImplTest.java index c658691..36ecfe4 100644 --- a/shell/core/src/test/java/org/apache/karaf/shell/impl/console/session/SessionFactoryImplTest.java +++ b/shell/core/src/test/java/org/apache/karaf/shell/impl/console/session/SessionFactoryImplTest.java @@ -33,12 +33,8 @@ public class SessionFactoryImplTest { @Test public void createWithNullInputStream() throws UnsupportedEncodingException { -try { final SessionFactory sessionFactory = new SessionFactoryImpl(createMock(ThreadIO.class)); sessionFactory.create(null, createMock(PrintStream.class), createMock(PrintStream.class)); -} catch (Exception ex) { -ex.printStackTrace(); -} } } \ No newline at end of file
[karaf] branch main updated: [KARAF-5362]remove unnecessary try..catch from the test
This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/karaf.git The following commit(s) were added to refs/heads/main by this push: new ae5e22c [KARAF-5362]remove unnecessary try..catch from the test ae5e22c is described below commit ae5e22c2bd89d272c2c9fb91da3fa4c0db11bcc2 Author: Freeman Fang AuthorDate: Mon Mar 29 14:13:16 2021 -0400 [KARAF-5362]remove unnecessary try..catch from the test --- .../karaf/shell/impl/console/session/SessionFactoryImplTest.java | 4 1 file changed, 4 deletions(-) diff --git a/shell/core/src/test/java/org/apache/karaf/shell/impl/console/session/SessionFactoryImplTest.java b/shell/core/src/test/java/org/apache/karaf/shell/impl/console/session/SessionFactoryImplTest.java index c658691..36ecfe4 100644 --- a/shell/core/src/test/java/org/apache/karaf/shell/impl/console/session/SessionFactoryImplTest.java +++ b/shell/core/src/test/java/org/apache/karaf/shell/impl/console/session/SessionFactoryImplTest.java @@ -33,12 +33,8 @@ public class SessionFactoryImplTest { @Test public void createWithNullInputStream() throws UnsupportedEncodingException { -try { final SessionFactory sessionFactory = new SessionFactoryImpl(createMock(ThreadIO.class)); sessionFactory.create(null, createMock(PrintStream.class), createMock(PrintStream.class)); -} catch (Exception ex) { -ex.printStackTrace(); -} } } \ No newline at end of file
[karaf] branch karaf-4.2.x updated: [KARAF-5362]NPE creating session with a null in parameter from a SessionFactory
This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch karaf-4.2.x in repository https://gitbox.apache.org/repos/asf/karaf.git The following commit(s) were added to refs/heads/karaf-4.2.x by this push: new b5adb32 [KARAF-5362]NPE creating session with a null in parameter from a SessionFactory b5adb32 is described below commit b5adb32eeb2455e1f87ec66e03593958527a7cb1 Author: Freeman Fang AuthorDate: Mon Mar 29 14:03:00 2021 -0400 [KARAF-5362]NPE creating session with a null in parameter from a SessionFactory (cherry picked from commit c4f6d451e2bbb81b1490279d73b12826d1c8e8c8) --- .../shell/impl/console/HeadlessSessionImpl.java| 16 +++- .../console/session/SessionFactoryImplTest.java| 44 ++ 2 files changed, 59 insertions(+), 1 deletion(-) diff --git a/shell/core/src/main/java/org/apache/karaf/shell/impl/console/HeadlessSessionImpl.java b/shell/core/src/main/java/org/apache/karaf/shell/impl/console/HeadlessSessionImpl.java index 4f063af..e38552c 100644 --- a/shell/core/src/main/java/org/apache/karaf/shell/impl/console/HeadlessSessionImpl.java +++ b/shell/core/src/main/java/org/apache/karaf/shell/impl/console/HeadlessSessionImpl.java @@ -40,6 +40,7 @@ import org.apache.karaf.shell.api.console.SignalListener; import org.apache.karaf.shell.api.console.Terminal; import org.apache.karaf.shell.impl.console.parsing.CommandLineParser; import org.apache.karaf.shell.support.ShellUtil; +import org.jline.terminal.impl.DumbTerminal; public class HeadlessSessionImpl implements Session { @@ -66,7 +67,20 @@ public class HeadlessSessionImpl implements Session { registry.register(this); registry.register(registry); // Session -session = processor.createSession(in, out, err); +if (in == null || out == null || err == null) { +try { +Terminal sessionTerminal = terminal != null ? terminal : +new JLineTerminal(new DumbTerminal(in, out)); +session = processor.createSession(((org.jline.terminal.Terminal) sessionTerminal).input(), + ((org.jline.terminal.Terminal) sessionTerminal).output(), + ((org.jline.terminal.Terminal) sessionTerminal).output()); +} catch (IOException e) { +throw new RuntimeException("Unable to create terminal", e); +} + +} else { +session = processor.createSession(in, out, err); +} if (parent == null) { Properties sysProps = System.getProperties(); // iterating over sysProps.keySet() directly is not thread-safe and may throw ConcurrentMod.Ex., diff --git a/shell/core/src/test/java/org/apache/karaf/shell/impl/console/session/SessionFactoryImplTest.java b/shell/core/src/test/java/org/apache/karaf/shell/impl/console/session/SessionFactoryImplTest.java new file mode 100644 index 000..c658691 --- /dev/null +++ b/shell/core/src/test/java/org/apache/karaf/shell/impl/console/session/SessionFactoryImplTest.java @@ -0,0 +1,44 @@ +/* + * 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. + */ +package org.apache.karaf.shell.impl.console.session; + +import static org.easymock.EasyMock.createMock; + +import java.io.PrintStream; +import java.io.UnsupportedEncodingException; + +import org.apache.felix.service.threadio.ThreadIO; +import org.apache.karaf.shell.api.console.SessionFactory; +import org.apache.karaf.shell.impl.console.SessionFactoryImpl; + +import org.junit.Test; + +public class SessionFactoryImplTest { + +@Test +public void createWithNullInputStream() throws UnsupportedEncodingException { +try { +final SessionFactory sessionFactory = new SessionFactoryImpl(createMock(ThreadIO.class)); +sessionFactory.create(null, createMock(PrintStream.class), createMock(PrintStream.class)); +} catch (Exception ex) { +ex.printStackTrace(); +} +} + +} \ No newline at end of file
[karaf] branch main updated: [KARAF-5362]NPE creating session with a null in parameter from a SessionFactory
This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/karaf.git The following commit(s) were added to refs/heads/main by this push: new c4f6d45 [KARAF-5362]NPE creating session with a null in parameter from a SessionFactory c4f6d45 is described below commit c4f6d451e2bbb81b1490279d73b12826d1c8e8c8 Author: Freeman Fang AuthorDate: Mon Mar 29 14:03:00 2021 -0400 [KARAF-5362]NPE creating session with a null in parameter from a SessionFactory --- .../shell/impl/console/HeadlessSessionImpl.java| 16 +++- .../console/session/SessionFactoryImplTest.java| 44 ++ 2 files changed, 59 insertions(+), 1 deletion(-) diff --git a/shell/core/src/main/java/org/apache/karaf/shell/impl/console/HeadlessSessionImpl.java b/shell/core/src/main/java/org/apache/karaf/shell/impl/console/HeadlessSessionImpl.java index 4f063af..e38552c 100644 --- a/shell/core/src/main/java/org/apache/karaf/shell/impl/console/HeadlessSessionImpl.java +++ b/shell/core/src/main/java/org/apache/karaf/shell/impl/console/HeadlessSessionImpl.java @@ -40,6 +40,7 @@ import org.apache.karaf.shell.api.console.SignalListener; import org.apache.karaf.shell.api.console.Terminal; import org.apache.karaf.shell.impl.console.parsing.CommandLineParser; import org.apache.karaf.shell.support.ShellUtil; +import org.jline.terminal.impl.DumbTerminal; public class HeadlessSessionImpl implements Session { @@ -66,7 +67,20 @@ public class HeadlessSessionImpl implements Session { registry.register(this); registry.register(registry); // Session -session = processor.createSession(in, out, err); +if (in == null || out == null || err == null) { +try { +Terminal sessionTerminal = terminal != null ? terminal : +new JLineTerminal(new DumbTerminal(in, out)); +session = processor.createSession(((org.jline.terminal.Terminal) sessionTerminal).input(), + ((org.jline.terminal.Terminal) sessionTerminal).output(), + ((org.jline.terminal.Terminal) sessionTerminal).output()); +} catch (IOException e) { +throw new RuntimeException("Unable to create terminal", e); +} + +} else { +session = processor.createSession(in, out, err); +} if (parent == null) { Properties sysProps = System.getProperties(); // iterating over sysProps.keySet() directly is not thread-safe and may throw ConcurrentMod.Ex., diff --git a/shell/core/src/test/java/org/apache/karaf/shell/impl/console/session/SessionFactoryImplTest.java b/shell/core/src/test/java/org/apache/karaf/shell/impl/console/session/SessionFactoryImplTest.java new file mode 100644 index 000..c658691 --- /dev/null +++ b/shell/core/src/test/java/org/apache/karaf/shell/impl/console/session/SessionFactoryImplTest.java @@ -0,0 +1,44 @@ +/* + * 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. + */ +package org.apache.karaf.shell.impl.console.session; + +import static org.easymock.EasyMock.createMock; + +import java.io.PrintStream; +import java.io.UnsupportedEncodingException; + +import org.apache.felix.service.threadio.ThreadIO; +import org.apache.karaf.shell.api.console.SessionFactory; +import org.apache.karaf.shell.impl.console.SessionFactoryImpl; + +import org.junit.Test; + +public class SessionFactoryImplTest { + +@Test +public void createWithNullInputStream() throws UnsupportedEncodingException { +try { +final SessionFactory sessionFactory = new SessionFactoryImpl(createMock(ThreadIO.class)); +sessionFactory.create(null, createMock(PrintStream.class), createMock(PrintStream.class)); +} catch (Exception ex) { +ex.printStackTrace(); +} +} + +} \ No newline at end of file
[karaf] branch main updated: [KARAF-7086]fix test failure
This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/karaf.git The following commit(s) were added to refs/heads/main by this push: new acc0153 [KARAF-7086]fix test failure acc0153 is described below commit acc015319ddaf578035e872bb8c1b5554b55da84 Author: Freeman Fang AuthorDate: Mon Mar 29 12:33:55 2021 -0400 [KARAF-7086]fix test failure --- .../src/test/resources/etc/users.properties| 33 ++ 1 file changed, 33 insertions(+) diff --git a/examples/karaf-itest-example/src/test/resources/etc/users.properties b/examples/karaf-itest-example/src/test/resources/etc/users.properties new file mode 100644 index 000..ace2282 --- /dev/null +++ b/examples/karaf-itest-example/src/test/resources/etc/users.properties @@ -0,0 +1,33 @@ + +# +#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. +# + + +# +# This file contains the users, groups, and roles. +# Each line has to be of the format: +# +# USER=PASSWORD,ROLE1,ROLE2,... +# USER=PASSWORD,_g_:GROUP,... +# _g_\:GROUP=ROLE1,ROLE2,... +# +# All users, groups, and roles entered in this file are available after Karaf startup +# and modifiable via the JAAS command group. These users reside in a JAAS domain +# with the name "karaf". +# +karaf = karaf,_g_:admingroup +_g_\:admingroup = group,admin,manager,viewer,systembundles,ssh
[karaf] branch main updated: [KARAF-7086]disable default user karaf in etc/user.properties by default to make the karaf installation more secure
This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/karaf.git The following commit(s) were added to refs/heads/main by this push: new 326d3e9 [KARAF-7086]disable default user karaf in etc/user.properties by default to make the karaf installation more secure 326d3e9 is described below commit 326d3e9ccf55c2095eb344538166c5dde2840422 Author: Freeman Fang AuthorDate: Mon Mar 29 11:25:01 2021 -0400 [KARAF-7086]disable default user karaf in etc/user.properties by default to make the karaf installation more secure --- .../features/base/src/main/resources/resources/etc/users.properties | 4 ++-- .../src/main/java/org/apache/karaf/itests/KarafTestSupport.java | 2 ++ .../resources => itests/test/src/test}/resources/etc/users.properties | 0 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/assemblies/features/base/src/main/resources/resources/etc/users.properties b/assemblies/features/base/src/main/resources/resources/etc/users.properties index ace2282..1891183 100644 --- a/assemblies/features/base/src/main/resources/resources/etc/users.properties +++ b/assemblies/features/base/src/main/resources/resources/etc/users.properties @@ -29,5 +29,5 @@ # and modifiable via the JAAS command group. These users reside in a JAAS domain # with the name "karaf". # -karaf = karaf,_g_:admingroup -_g_\:admingroup = group,admin,manager,viewer,systembundles,ssh +#karaf = karaf,_g_:admingroup +#_g_\:admingroup = group,admin,manager,viewer,systembundles,ssh diff --git a/itests/common/src/main/java/org/apache/karaf/itests/KarafTestSupport.java b/itests/common/src/main/java/org/apache/karaf/itests/KarafTestSupport.java index bd865f0..b267e03 100644 --- a/itests/common/src/main/java/org/apache/karaf/itests/KarafTestSupport.java +++ b/itests/common/src/main/java/org/apache/karaf/itests/KarafTestSupport.java @@ -242,6 +242,7 @@ public class KarafTestSupport { CoreOptions.mavenBundle().groupId("org.apache.karaf.itests").artifactId("common").versionAsInProject(), CoreOptions.mavenBundle().groupId("javax.annotation").artifactId("javax.annotation-api").versionAsInProject(), //replaceConfigurationFile("etc/host.key", getConfigFile("/etc/host.key")), + KarafDistributionOption.replaceConfigurationFile("etc/users.properties", getConfigFile("/etc/users.properties")), KarafDistributionOption.editConfigurationFilePut("etc/org.apache.karaf.features.cfg", "updateSnapshots", "none"), KarafDistributionOption.editConfigurationFilePut("etc/org.ops4j.pax.web.cfg", "org.osgi.service.http.port", httpPort), KarafDistributionOption.editConfigurationFilePut("etc/org.apache.karaf.management.cfg", "rmiRegistryPort", rmiRegistryPort), @@ -295,6 +296,7 @@ public class KarafTestSupport { CoreOptions.mavenBundle().groupId("org.apache.servicemix.bundles").artifactId("org.apache.servicemix.bundles.hamcrest").versionAsInProject(), CoreOptions.mavenBundle().groupId("org.apache.karaf.itests").artifactId("common").versionAsInProject(), //replaceConfigurationFile("etc/host.key", getConfigFile("/etc/host.key")), + KarafDistributionOption.replaceConfigurationFile("etc/users.properties", getConfigFile("/etc/users.properties")), KarafDistributionOption.editConfigurationFilePut("etc/org.apache.karaf.features.cfg", "updateSnapshots", "none"), KarafDistributionOption.editConfigurationFilePut("etc/org.ops4j.pax.web.cfg", "org.osgi.service.http.port", httpPort), KarafDistributionOption.editConfigurationFilePut("etc/org.apache.karaf.management.cfg", "rmiRegistryPort", rmiRegistryPort), diff --git a/assemblies/features/base/src/main/resources/resources/etc/users.properties b/itests/test/src/test/resources/etc/users.properties similarity index 100% copy from assemblies/features/base/src/main/resources/resources/etc/users.properties copy to itests/test/src/test/resources/etc/users.properties
[karaf] branch main updated: [KARAF-6654]Remote JMX connection not working with security manager
This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/karaf.git The following commit(s) were added to refs/heads/main by this push: new 5144a1e [KARAF-6654]Remote JMX connection not working with security manager 5144a1e is described below commit 5144a1eba5687dab0f016a9bf95e58e6687a26ad Author: Freeman Fang AuthorDate: Tue Mar 23 18:05:44 2021 -0400 [KARAF-6654]Remote JMX connection not working with security manager --- .../management/internal/MBeanInvocationHandler.java | 21 ++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/management/server/src/main/java/org/apache/karaf/management/internal/MBeanInvocationHandler.java b/management/server/src/main/java/org/apache/karaf/management/internal/MBeanInvocationHandler.java index b26ef2a..2a5015e 100644 --- a/management/server/src/main/java/org/apache/karaf/management/internal/MBeanInvocationHandler.java +++ b/management/server/src/main/java/org/apache/karaf/management/internal/MBeanInvocationHandler.java @@ -21,6 +21,8 @@ import java.lang.reflect.InvocationHandler; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.lang.reflect.Proxy; +import java.security.AccessController; +import java.security.PrivilegedExceptionAction; import java.util.Arrays; import java.util.Collections; import java.util.List; @@ -56,11 +58,24 @@ public class MBeanInvocationHandler implements InvocationHandler { return null; } + + try { -return method.invoke(wrapped, args); -} catch (InvocationTargetException e) { -throw e.getCause(); +return AccessController.doPrivilegedWithCombiner(new PrivilegedExceptionAction() { +@Override +public Object run() throws Exception { +try { +return method.invoke(wrapped, args); +} catch (InvocationTargetException e) { +return null; +} +} +}); +} catch (Exception pae) { +Throwable cause = pae.getCause(); +throw cause == null ? pae:cause; } + } public MBeanServer getDelegate() {
[karaf] branch karaf-4.2.x updated: [KARAF-6654]Remote JMX connection not working with security manager
This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch karaf-4.2.x in repository https://gitbox.apache.org/repos/asf/karaf.git The following commit(s) were added to refs/heads/karaf-4.2.x by this push: new e173d00 [KARAF-6654]Remote JMX connection not working with security manager e173d00 is described below commit e173d002436d7d775570ef989c73d1cbb18d1230 Author: Freeman Fang AuthorDate: Tue Mar 23 18:05:44 2021 -0400 [KARAF-6654]Remote JMX connection not working with security manager (cherry picked from commit 5144a1eba5687dab0f016a9bf95e58e6687a26ad) --- .../management/internal/MBeanInvocationHandler.java | 21 ++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/management/server/src/main/java/org/apache/karaf/management/internal/MBeanInvocationHandler.java b/management/server/src/main/java/org/apache/karaf/management/internal/MBeanInvocationHandler.java index b26ef2a..2a5015e 100644 --- a/management/server/src/main/java/org/apache/karaf/management/internal/MBeanInvocationHandler.java +++ b/management/server/src/main/java/org/apache/karaf/management/internal/MBeanInvocationHandler.java @@ -21,6 +21,8 @@ import java.lang.reflect.InvocationHandler; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.lang.reflect.Proxy; +import java.security.AccessController; +import java.security.PrivilegedExceptionAction; import java.util.Arrays; import java.util.Collections; import java.util.List; @@ -56,11 +58,24 @@ public class MBeanInvocationHandler implements InvocationHandler { return null; } + + try { -return method.invoke(wrapped, args); -} catch (InvocationTargetException e) { -throw e.getCause(); +return AccessController.doPrivilegedWithCombiner(new PrivilegedExceptionAction() { +@Override +public Object run() throws Exception { +try { +return method.invoke(wrapped, args); +} catch (InvocationTargetException e) { +return null; +} +} +}); +} catch (Exception pae) { +Throwable cause = pae.getCause(); +throw cause == null ? pae:cause; } + } public MBeanServer getDelegate() {
[karaf] branch karaf-4.2.x updated: [KARAF-6878]Fix WARNING: package org.apache.karaf.specs.locator not in java.base
This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch karaf-4.2.x in repository https://gitbox.apache.org/repos/asf/karaf.git The following commit(s) were added to refs/heads/karaf-4.2.x by this push: new 94d6b53 [KARAF-6878]Fix WARNING: package org.apache.karaf.specs.locator not in java.base 94d6b53 is described below commit 94d6b536624e0c83865ff8274cec753f826afad2 Author: Freeman Fang AuthorDate: Thu Mar 18 21:18:23 2021 -0400 [KARAF-6878]Fix WARNING: package org.apache.karaf.specs.locator not in java.base (cherry picked from commit 473586c163aa3e208fa8be96cd3393b9a6623d1c) --- .../src/main/java/org/apache/karaf/itests/KarafTestSupport.java | 4 ++-- .../karaf/itests/mavenresolver/KarafMinimalMonitoredTestSupport.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/itests/common/src/main/java/org/apache/karaf/itests/KarafTestSupport.java b/itests/common/src/main/java/org/apache/karaf/itests/KarafTestSupport.java index 898cc33..86a0a2b 100644 --- a/itests/common/src/main/java/org/apache/karaf/itests/KarafTestSupport.java +++ b/itests/common/src/main/java/org/apache/karaf/itests/KarafTestSupport.java @@ -251,7 +251,6 @@ public class KarafTestSupport { KarafDistributionOption.editConfigurationFilePut("etc/branding.properties", "welcome", ""), // No welcome banner KarafDistributionOption.editConfigurationFilePut("etc/branding-ssh.properties", "welcome", ""), new VMOption("--add-reads=java.xml=java.logging"), -new VMOption("--add-exports=java.base/org.apache.karaf.specs.locator=java.xml,ALL-UNNAMED"), new VMOption("--patch-module"), new VMOption("java.base=lib/endorsed/org.apache.karaf.specs.locator-" + System.getProperty("karaf.version") + ".jar"), @@ -277,7 +276,8 @@ public class KarafTestSupport { new VMOption("--add-exports=java.base/sun.net.www.content.text=ALL-UNNAMED"), new VMOption("--add-exports=jdk.naming.rmi/com.sun.jndi.url.rmi=ALL-UNNAMED"), new VMOption("-classpath"), -new VMOption("lib/jdk9plus/*" + File.pathSeparator + "lib/boot/*") +new VMOption("lib/jdk9plus/*" + File.pathSeparator + "lib/boot/*" ++ File.pathSeparator + "lib/endorsed/*") }; } else { diff --git a/itests/test/src/test/java/org/apache/karaf/itests/mavenresolver/KarafMinimalMonitoredTestSupport.java b/itests/test/src/test/java/org/apache/karaf/itests/mavenresolver/KarafMinimalMonitoredTestSupport.java index d8bcedb..5fccfc5 100644 --- a/itests/test/src/test/java/org/apache/karaf/itests/mavenresolver/KarafMinimalMonitoredTestSupport.java +++ b/itests/test/src/test/java/org/apache/karaf/itests/mavenresolver/KarafMinimalMonitoredTestSupport.java @@ -91,7 +91,6 @@ public abstract class KarafMinimalMonitoredTestSupport { editConfigurationFilePut("etc/startup.properties", "file:../../" + new File(url.toURI()).getName(), "1"), composite(editConfigurationFilePut("etc/org.apache.karaf.features.cfg", new File("target/test-classes/etc/org.apache.karaf.features.cfg"))), new VMOption("--add-reads=java.xml=java.logging"), -new VMOption("--add-exports=java.base/org.apache.karaf.specs.locator=java.xml,ALL-UNNAMED"), new VMOption("--patch-module"), new VMOption("java.base=lib/endorsed/org.apache.karaf.specs.locator-" + System.getProperty("karaf.version") + ".jar"), @@ -118,7 +117,8 @@ public abstract class KarafMinimalMonitoredTestSupport { new VMOption("--add-exports=java.base/sun.net.www.content.text=ALL-UNNAMED"), new VMOption("--add-exports=jdk.naming.rmi/com.sun.jndi.url.rmi=ALL-UNNAMED"), new VMOption("-classpath"), -new VMOption("lib/jdk9plus/*" + File.pathSeparator + "lib/boot/*") +new VMOption("lib/jdk9plus/*" + File.pathSeparator + "lib/boot/*" ++ File.pathSeparator + "lib/endorsed/*" ) }; } else { return new Option[] {
[karaf] branch master updated: [KARAF-6878]Fix WARNING: package org.apache.karaf.specs.locator not in java.base
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 473586c [KARAF-6878]Fix WARNING: package org.apache.karaf.specs.locator not in java.base 473586c is described below commit 473586c163aa3e208fa8be96cd3393b9a6623d1c Author: Freeman Fang AuthorDate: Thu Mar 18 21:18:23 2021 -0400 [KARAF-6878]Fix WARNING: package org.apache.karaf.specs.locator not in java.base --- .../src/main/java/org/apache/karaf/itests/KarafTestSupport.java | 4 ++-- .../karaf/itests/mavenresolver/KarafMinimalMonitoredTestSupport.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/itests/common/src/main/java/org/apache/karaf/itests/KarafTestSupport.java b/itests/common/src/main/java/org/apache/karaf/itests/KarafTestSupport.java index 990b633..bd865f0 100644 --- a/itests/common/src/main/java/org/apache/karaf/itests/KarafTestSupport.java +++ b/itests/common/src/main/java/org/apache/karaf/itests/KarafTestSupport.java @@ -251,7 +251,6 @@ public class KarafTestSupport { KarafDistributionOption.editConfigurationFilePut("etc/branding.properties", "welcome", ""), // No welcome banner KarafDistributionOption.editConfigurationFilePut("etc/branding-ssh.properties", "welcome", ""), new VMOption("--add-reads=java.xml=java.logging"), -new VMOption("--add-exports=java.base/org.apache.karaf.specs.locator=java.xml,ALL-UNNAMED"), new VMOption("--patch-module"), new VMOption("java.base=lib/endorsed/org.apache.karaf.specs.locator-" + System.getProperty("karaf.version") + ".jar"), @@ -277,7 +276,8 @@ public class KarafTestSupport { new VMOption("--add-exports=java.base/sun.net.www.content.text=ALL-UNNAMED"), new VMOption("--add-exports=jdk.naming.rmi/com.sun.jndi.url.rmi=ALL-UNNAMED"), new VMOption("-classpath"), -new VMOption("lib/jdk9plus/*" + File.pathSeparator + "lib/boot/*") +new VMOption("lib/jdk9plus/*" + File.pathSeparator + "lib/boot/*" ++ File.pathSeparator + "lib/endorsed/*") }; } else { diff --git a/itests/test/src/test/java/org/apache/karaf/itests/mavenresolver/KarafMinimalMonitoredTestSupport.java b/itests/test/src/test/java/org/apache/karaf/itests/mavenresolver/KarafMinimalMonitoredTestSupport.java index d8bcedb..5fccfc5 100644 --- a/itests/test/src/test/java/org/apache/karaf/itests/mavenresolver/KarafMinimalMonitoredTestSupport.java +++ b/itests/test/src/test/java/org/apache/karaf/itests/mavenresolver/KarafMinimalMonitoredTestSupport.java @@ -91,7 +91,6 @@ public abstract class KarafMinimalMonitoredTestSupport { editConfigurationFilePut("etc/startup.properties", "file:../../" + new File(url.toURI()).getName(), "1"), composite(editConfigurationFilePut("etc/org.apache.karaf.features.cfg", new File("target/test-classes/etc/org.apache.karaf.features.cfg"))), new VMOption("--add-reads=java.xml=java.logging"), -new VMOption("--add-exports=java.base/org.apache.karaf.specs.locator=java.xml,ALL-UNNAMED"), new VMOption("--patch-module"), new VMOption("java.base=lib/endorsed/org.apache.karaf.specs.locator-" + System.getProperty("karaf.version") + ".jar"), @@ -118,7 +117,8 @@ public abstract class KarafMinimalMonitoredTestSupport { new VMOption("--add-exports=java.base/sun.net.www.content.text=ALL-UNNAMED"), new VMOption("--add-exports=jdk.naming.rmi/com.sun.jndi.url.rmi=ALL-UNNAMED"), new VMOption("-classpath"), -new VMOption("lib/jdk9plus/*" + File.pathSeparator + "lib/boot/*") +new VMOption("lib/jdk9plus/*" + File.pathSeparator + "lib/boot/*" ++ File.pathSeparator + "lib/endorsed/*" ) }; } else { return new Option[] {
[karaf] branch karaf-4.2.x updated: [KARAF-6855]JMX over SSL doesn't work anymore
This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch karaf-4.2.x in repository https://gitbox.apache.org/repos/asf/karaf.git The following commit(s) were added to refs/heads/karaf-4.2.x by this push: new 4b0ccb5 [KARAF-6855]JMX over SSL doesn't work anymore 4b0ccb5 is described below commit 4b0ccb5648766c913ea425f63e18b44ad63d89df Author: Freeman Fang AuthorDate: Wed Sep 16 19:15:15 2020 -0400 [KARAF-6855]JMX over SSL doesn't work anymore (cherry picked from commit 58c7885a6bfed734ec455019102c6f2059b4179b) --- .../java/org/apache/karaf/management/ConnectorServerFactory.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/management/server/src/main/java/org/apache/karaf/management/ConnectorServerFactory.java b/management/server/src/main/java/org/apache/karaf/management/ConnectorServerFactory.java index 9a58ed2..570ff01 100644 --- a/management/server/src/main/java/org/apache/karaf/management/ConnectorServerFactory.java +++ b/management/server/src/main/java/org/apache/karaf/management/ConnectorServerFactory.java @@ -392,8 +392,9 @@ public class ConnectorServerFactory { MBeanInvocationHandler handler = new MBeanInvocationHandler(server, guard); MBeanServer guardedServer = (MBeanServer) Proxy.newProxyInstance(server.getClass().getClassLoader(), new Class[]{ MBeanServer.class }, handler); - -rmiServer = new RMIJRMPServerImpl(url.getPort(), null, null, environment); +rmiServer = new RMIJRMPServerImpl(url.getPort(), + (RMIClientSocketFactory)environment.get(RMIConnectorServer.RMI_CLIENT_SOCKET_FACTORY_ATTRIBUTE), + (RMIServerSocketFactory)environment.get(RMIConnectorServer.RMI_SERVER_SOCKET_FACTORY_ATTRIBUTE), environment); // Create the connector server now. this.connectorServer = new RMIConnectorServer(url, environment, rmiServer, guardedServer);
[karaf] branch master updated: [KARAF-6855]JMX over SSL doesn't work anymore
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 58c7885 [KARAF-6855]JMX over SSL doesn't work anymore 58c7885 is described below commit 58c7885a6bfed734ec455019102c6f2059b4179b Author: Freeman Fang AuthorDate: Wed Sep 16 19:15:15 2020 -0400 [KARAF-6855]JMX over SSL doesn't work anymore --- .../java/org/apache/karaf/management/ConnectorServerFactory.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/management/server/src/main/java/org/apache/karaf/management/ConnectorServerFactory.java b/management/server/src/main/java/org/apache/karaf/management/ConnectorServerFactory.java index 9a58ed2..570ff01 100644 --- a/management/server/src/main/java/org/apache/karaf/management/ConnectorServerFactory.java +++ b/management/server/src/main/java/org/apache/karaf/management/ConnectorServerFactory.java @@ -392,8 +392,9 @@ public class ConnectorServerFactory { MBeanInvocationHandler handler = new MBeanInvocationHandler(server, guard); MBeanServer guardedServer = (MBeanServer) Proxy.newProxyInstance(server.getClass().getClassLoader(), new Class[]{ MBeanServer.class }, handler); - -rmiServer = new RMIJRMPServerImpl(url.getPort(), null, null, environment); +rmiServer = new RMIJRMPServerImpl(url.getPort(), + (RMIClientSocketFactory)environment.get(RMIConnectorServer.RMI_CLIENT_SOCKET_FACTORY_ATTRIBUTE), + (RMIServerSocketFactory)environment.get(RMIConnectorServer.RMI_SERVER_SOCKET_FACTORY_ATTRIBUTE), environment); // Create the connector server now. this.connectorServer = new RMIConnectorServer(url, environment, rmiServer, guardedServer);
[karaf] branch karaf-4.2.x updated: [KARAF-6838]bin\start.bat doesn't work if no data directory in Karaf kit
This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch karaf-4.2.x in repository https://gitbox.apache.org/repos/asf/karaf.git The following commit(s) were added to refs/heads/karaf-4.2.x by this push: new 61ac071 [KARAF-6838]bin\start.bat doesn't work if no data directory in Karaf kit 61ac071 is described below commit 61ac071ef242fc71fa27c2c93bb029d2cb20e3c4 Author: Freeman Fang AuthorDate: Wed Sep 2 11:00:32 2020 -0400 [KARAF-6838]bin\start.bat doesn't work if no data directory in Karaf kit (cherry picked from commit 38987191875a6d862112d14ce1483cfe3e093255) --- .../base/src/main/filtered-resources/resources/bin/instance.bat| 3 ++- .../features/base/src/main/filtered-resources/resources/bin/start.bat | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/assemblies/features/base/src/main/filtered-resources/resources/bin/instance.bat b/assemblies/features/base/src/main/filtered-resources/resources/bin/instance.bat index 4cf9196..c518549 100644 --- a/assemblies/features/base/src/main/filtered-resources/resources/bin/instance.bat +++ b/assemblies/features/base/src/main/filtered-resources/resources/bin/instance.bat @@ -79,7 +79,8 @@ if "%KARAF_BASE%" == "" ( if not "%KARAF_DATA%" == "" ( if not exist "%KARAF_DATA%" ( call :warn KARAF_DATA is not valid: "%KARAF_DATA%" -goto END +call :warn Creating %KARAF_DATA% +mkdir %KARAF_DATA% ) ) if "%KARAF_DATA%" == "" ( diff --git a/assemblies/features/base/src/main/filtered-resources/resources/bin/start.bat b/assemblies/features/base/src/main/filtered-resources/resources/bin/start.bat index 0db464a..912b73e 100644 --- a/assemblies/features/base/src/main/filtered-resources/resources/bin/start.bat +++ b/assemblies/features/base/src/main/filtered-resources/resources/bin/start.bat @@ -64,7 +64,8 @@ if "%KARAF_BASE%" == "" ( if not "%KARAF_DATA%" == "" ( if not exist "%KARAF_DATA%" ( call :warn KARAF_DATA is not valid: "%KARAF_DATA%" -goto END +call :warn Creating %KARAF_DATA% +mkdir %KARAF_DATA% ) ) if "%KARAF_DATA%" == "" (
[karaf] branch master updated: [KARAF-6838]bin\start.bat doesn't work if no data directory in Karaf kit
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 3898719 [KARAF-6838]bin\start.bat doesn't work if no data directory in Karaf kit 3898719 is described below commit 38987191875a6d862112d14ce1483cfe3e093255 Author: Freeman Fang AuthorDate: Wed Sep 2 11:00:32 2020 -0400 [KARAF-6838]bin\start.bat doesn't work if no data directory in Karaf kit --- .../base/src/main/filtered-resources/resources/bin/instance.bat| 3 ++- .../features/base/src/main/filtered-resources/resources/bin/start.bat | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/assemblies/features/base/src/main/filtered-resources/resources/bin/instance.bat b/assemblies/features/base/src/main/filtered-resources/resources/bin/instance.bat index 4cf9196..c518549 100644 --- a/assemblies/features/base/src/main/filtered-resources/resources/bin/instance.bat +++ b/assemblies/features/base/src/main/filtered-resources/resources/bin/instance.bat @@ -79,7 +79,8 @@ if "%KARAF_BASE%" == "" ( if not "%KARAF_DATA%" == "" ( if not exist "%KARAF_DATA%" ( call :warn KARAF_DATA is not valid: "%KARAF_DATA%" -goto END +call :warn Creating %KARAF_DATA% +mkdir %KARAF_DATA% ) ) if "%KARAF_DATA%" == "" ( diff --git a/assemblies/features/base/src/main/filtered-resources/resources/bin/start.bat b/assemblies/features/base/src/main/filtered-resources/resources/bin/start.bat index 0db464a..912b73e 100644 --- a/assemblies/features/base/src/main/filtered-resources/resources/bin/start.bat +++ b/assemblies/features/base/src/main/filtered-resources/resources/bin/start.bat @@ -64,7 +64,8 @@ if "%KARAF_BASE%" == "" ( if not "%KARAF_DATA%" == "" ( if not exist "%KARAF_DATA%" ( call :warn KARAF_DATA is not valid: "%KARAF_DATA%" -goto END +call :warn Creating %KARAF_DATA% +mkdir %KARAF_DATA% ) ) if "%KARAF_DATA%" == "" (
[karaf] branch karaf-4.2.x updated: [KARAF-6826]update to aries.spi 1.2.4
This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch karaf-4.2.x in repository https://gitbox.apache.org/repos/asf/karaf.git The following commit(s) were added to refs/heads/karaf-4.2.x by this push: new 4bac36b [KARAF-6826]update to aries.spi 1.2.4 4bac36b is described below commit 4bac36b4ea947ff949cbbd14a55c7b66bc4a0717 Author: Freeman Fang AuthorDate: Tue Aug 25 13:58:56 2020 -0400 [KARAF-6826]update to aries.spi 1.2.4 (cherry picked from commit bb8247cd794e0a9323b8886989406682e98349ee) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ff4252d..3ed0242 100644 --- a/pom.xml +++ b/pom.xml @@ -239,7 +239,7 @@ 1.1.0 1.1.7 1.1.1 -1.2.3 +1.2.4 2.0.10 2.0.10 1.3.3
[karaf] branch master updated: [KARAF-6826]update to aries.spi 1.2.4
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 bb8247c [KARAF-6826]update to aries.spi 1.2.4 bb8247c is described below commit bb8247cd794e0a9323b8886989406682e98349ee Author: Freeman Fang AuthorDate: Tue Aug 25 13:58:56 2020 -0400 [KARAF-6826]update to aries.spi 1.2.4 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index bb1e2e8..7ca40db 100644 --- a/pom.xml +++ b/pom.xml @@ -239,7 +239,7 @@ 1.1.0 1.1.7 1.1.1 -1.2.3 +1.2.4 2.0.10 2.0.10 1.3.3
[karaf] branch karaf-4.2.x updated: [KARAF-6594]introduce new property enabledCipherSuites for org.apache.karaf.management.cfg
This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch karaf-4.2.x in repository https://gitbox.apache.org/repos/asf/karaf.git The following commit(s) were added to refs/heads/karaf-4.2.x by this push: new 533b274 [KARAF-6594]introduce new property enabledCipherSuites for org.apache.karaf.management.cfg 533b274 is described below commit 533b2742673b2e3f293a9a97014978a34d91cb9f Author: Freeman Fang AuthorDate: Mon Jan 13 13:48:14 2020 -0500 [KARAF-6594]introduce new property enabledCipherSuites for org.apache.karaf.management.cfg (cherry picked from commit 15fabb930ae390be099ff8a6b522ca85dd041224) --- .../karaf/management/ConnectorServerFactory.java | 24 -- .../karaf/management/internal/Activator.java | 2 ++ 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/management/server/src/main/java/org/apache/karaf/management/ConnectorServerFactory.java b/management/server/src/main/java/org/apache/karaf/management/ConnectorServerFactory.java index 204c3b5..ed8e248 100644 --- a/management/server/src/main/java/org/apache/karaf/management/ConnectorServerFactory.java +++ b/management/server/src/main/java/org/apache/karaf/management/ConnectorServerFactory.java @@ -75,6 +75,7 @@ public class ConnectorServerFactory { private String algorithm; private String secureProtocol; private String[] enabledProtocols; +private String[] enabledCipherSuites; private String keyStore; private String trustStore; private String keyAlias; @@ -381,7 +382,8 @@ public class ConnectorServerFactory { private void setupSsl() throws GeneralSecurityException { SSLServerSocketFactory sssf = keystoreManager.createSSLServerFactory(null, secureProtocol, algorithm, keyStore, keyAlias, trustStore,keyStoreAvailabilityTimeout); -RMIServerSocketFactory rssf = new KarafSslRMIServerSocketFactory(sssf, isClientAuth(), getRmiServerHost(), getEnabledProtocols()); +RMIServerSocketFactory rssf = new KarafSslRMIServerSocketFactory(sssf, isClientAuth(), getRmiServerHost(), getEnabledProtocols(), + getEnabledCipherSuites()); RMIClientSocketFactory rcsf = new SslRMIClientSocketFactory(); environment.put(RMIConnectorServer.RMI_SERVER_SOCKET_FACTORY_ATTRIBUTE, rssf); environment.put(RMIConnectorServer.RMI_CLIENT_SOCKET_FACTORY_ATTRIBUTE, rcsf); @@ -399,12 +401,16 @@ public class ConnectorServerFactory { private boolean clientAuth; private String rmiServerHost; private String[] enabledProtocols; +private String[] enabledCipherSuites; -public KarafSslRMIServerSocketFactory(SSLServerSocketFactory sssf, boolean clientAuth, String rmiServerHost, String[] enabledProtocols) { +public KarafSslRMIServerSocketFactory(SSLServerSocketFactory sssf, boolean clientAuth, String rmiServerHost, + String[] enabledProtocols, + String[] enabledCipherSuites) { this.sssf = sssf; this.clientAuth = clientAuth; this.rmiServerHost = rmiServerHost; this.enabledProtocols = enabledProtocols; +this.enabledCipherSuites = enabledCipherSuites; } public ServerSocket createServerSocket(int port) throws IOException { @@ -415,6 +421,9 @@ public class ConnectorServerFactory { if (this.enabledProtocols != null && this.enabledProtocols.length > 0) { ss.setEnabledProtocols(this.enabledProtocols); } +if (this.enabledCipherSuites != null && this.enabledCipherSuites.length > 0) { +ss.setEnabledCipherSuites(this.enabledCipherSuites); +} return new LocalOnlySSLServerSocket(ss); } else { final SSLServerSocket ss = (SSLServerSocket) sssf.createServerSocket(port, 50, InetAddress.getByName(rmiServerHost)); @@ -422,6 +431,9 @@ public class ConnectorServerFactory { if (this.enabledProtocols != null && this.enabledProtocols.length > 0) { ss.setEnabledProtocols(this.enabledProtocols); } +if (this.enabledCipherSuites != null && this.enabledCipherSuites.length > 0) { +ss.setEnabledCipherSuites(this.enabledCipherSuites); +} return ss; } } @@ -746,4 +758,12 @@ public class ConnectorServerFactory { this.enabledProtocols = enabledProtocols; } +public String[] getEnabledCipherSuites() { +return enabledCipherSuites; +} + +public void setEnabledCipherSuites(String[] enabledCipherSuites) { +this.enabledCipherSuites = enabledCipher
[karaf] branch master updated: [KARAF-6594]introduce new property enabledCipherSuites for org.apache.karaf.management.cfg
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 15fabb9 [KARAF-6594]introduce new property enabledCipherSuites for org.apache.karaf.management.cfg 15fabb9 is described below commit 15fabb930ae390be099ff8a6b522ca85dd041224 Author: Freeman Fang AuthorDate: Mon Jan 13 13:48:14 2020 -0500 [KARAF-6594]introduce new property enabledCipherSuites for org.apache.karaf.management.cfg --- .../karaf/management/ConnectorServerFactory.java | 24 -- .../karaf/management/internal/Activator.java | 2 ++ 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/management/server/src/main/java/org/apache/karaf/management/ConnectorServerFactory.java b/management/server/src/main/java/org/apache/karaf/management/ConnectorServerFactory.java index 204c3b5..ed8e248 100644 --- a/management/server/src/main/java/org/apache/karaf/management/ConnectorServerFactory.java +++ b/management/server/src/main/java/org/apache/karaf/management/ConnectorServerFactory.java @@ -75,6 +75,7 @@ public class ConnectorServerFactory { private String algorithm; private String secureProtocol; private String[] enabledProtocols; +private String[] enabledCipherSuites; private String keyStore; private String trustStore; private String keyAlias; @@ -381,7 +382,8 @@ public class ConnectorServerFactory { private void setupSsl() throws GeneralSecurityException { SSLServerSocketFactory sssf = keystoreManager.createSSLServerFactory(null, secureProtocol, algorithm, keyStore, keyAlias, trustStore,keyStoreAvailabilityTimeout); -RMIServerSocketFactory rssf = new KarafSslRMIServerSocketFactory(sssf, isClientAuth(), getRmiServerHost(), getEnabledProtocols()); +RMIServerSocketFactory rssf = new KarafSslRMIServerSocketFactory(sssf, isClientAuth(), getRmiServerHost(), getEnabledProtocols(), + getEnabledCipherSuites()); RMIClientSocketFactory rcsf = new SslRMIClientSocketFactory(); environment.put(RMIConnectorServer.RMI_SERVER_SOCKET_FACTORY_ATTRIBUTE, rssf); environment.put(RMIConnectorServer.RMI_CLIENT_SOCKET_FACTORY_ATTRIBUTE, rcsf); @@ -399,12 +401,16 @@ public class ConnectorServerFactory { private boolean clientAuth; private String rmiServerHost; private String[] enabledProtocols; +private String[] enabledCipherSuites; -public KarafSslRMIServerSocketFactory(SSLServerSocketFactory sssf, boolean clientAuth, String rmiServerHost, String[] enabledProtocols) { +public KarafSslRMIServerSocketFactory(SSLServerSocketFactory sssf, boolean clientAuth, String rmiServerHost, + String[] enabledProtocols, + String[] enabledCipherSuites) { this.sssf = sssf; this.clientAuth = clientAuth; this.rmiServerHost = rmiServerHost; this.enabledProtocols = enabledProtocols; +this.enabledCipherSuites = enabledCipherSuites; } public ServerSocket createServerSocket(int port) throws IOException { @@ -415,6 +421,9 @@ public class ConnectorServerFactory { if (this.enabledProtocols != null && this.enabledProtocols.length > 0) { ss.setEnabledProtocols(this.enabledProtocols); } +if (this.enabledCipherSuites != null && this.enabledCipherSuites.length > 0) { +ss.setEnabledCipherSuites(this.enabledCipherSuites); +} return new LocalOnlySSLServerSocket(ss); } else { final SSLServerSocket ss = (SSLServerSocket) sssf.createServerSocket(port, 50, InetAddress.getByName(rmiServerHost)); @@ -422,6 +431,9 @@ public class ConnectorServerFactory { if (this.enabledProtocols != null && this.enabledProtocols.length > 0) { ss.setEnabledProtocols(this.enabledProtocols); } +if (this.enabledCipherSuites != null && this.enabledCipherSuites.length > 0) { +ss.setEnabledCipherSuites(this.enabledCipherSuites); +} return ss; } } @@ -746,4 +758,12 @@ public class ConnectorServerFactory { this.enabledProtocols = enabledProtocols; } +public String[] getEnabledCipherSuites() { +return enabledCipherSuites; +} + +public void setEnabledCipherSuites(String[] enabledCipherSuites) { +this.enabledCipherSuites = enabledCipherSuites; +} + } diff --git a/management/server/src/main/java/org/apache/karaf/manag
[karaf] branch karaf-4.2.x updated: [KARAF-6476]ClassLoader and Memory leak
This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch karaf-4.2.x in repository https://gitbox.apache.org/repos/asf/karaf.git The following commit(s) were added to refs/heads/karaf-4.2.x by this push: new 7ab43cb [KARAF-6476]ClassLoader and Memory leak 7ab43cb is described below commit 7ab43cbf18373c0fb45df482555705bba33c61a0 Author: Freeman Fang AuthorDate: Wed Oct 23 20:22:43 2019 -0400 [KARAF-6476]ClassLoader and Memory leak (cherry picked from commit 02ba6142666e92e9505285c4af90653dfaa3f5df) --- .../osgi/secured/SecuredSessionFactoryImpl.java| 25 -- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/shell/core/src/main/java/org/apache/karaf/shell/impl/console/osgi/secured/SecuredSessionFactoryImpl.java b/shell/core/src/main/java/org/apache/karaf/shell/impl/console/osgi/secured/SecuredSessionFactoryImpl.java index 9b65826..4914047 100644 --- a/shell/core/src/main/java/org/apache/karaf/shell/impl/console/osgi/secured/SecuredSessionFactoryImpl.java +++ b/shell/core/src/main/java/org/apache/karaf/shell/impl/console/osgi/secured/SecuredSessionFactoryImpl.java @@ -26,10 +26,11 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Dictionary; import java.util.HashMap; -import java.util.HashSet; +import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; +import java.util.WeakHashMap; import javax.security.auth.Subject; @@ -70,6 +71,7 @@ public class SecuredSessionFactoryImpl extends SessionFactoryImpl implements Con private SingleServiceTracker configAdminTracker; private ServiceRegistration registration; private ThreadLocal> serviceVisibleMap = new ThreadLocal<>(); +private Map> serviceVisibleMapForAllThreads = new WeakHashMap<>(); public SecuredSessionFactoryImpl(BundleContext bundleContext, ThreadIO threadIO) throws InvalidSyntaxException { super(threadIO); @@ -106,6 +108,8 @@ public class SecuredSessionFactoryImpl extends SessionFactoryImpl implements Con protected boolean isVisible(Object service) { if (this.serviceVisibleMap.get() == null) { this.serviceVisibleMap.set(new HashMap<>()); +Thread cur = Thread.currentThread(); +this.serviceVisibleMapForAllThreads.put(cur, this.serviceVisibleMap.get()); } if (this.serviceVisibleMap.get().get(service) != null) { return this.serviceVisibleMap.get().get(service); @@ -168,7 +172,6 @@ public class SecuredSessionFactoryImpl extends SessionFactoryImpl implements Con private AliasCommand findAlias(String scope, String name) { if (session != null) { Set vars = ((Set) session.get(null)); -Set aliases = new HashSet<>(); String aliasScope = null; String aliasName = null; for (String var : vars) { @@ -320,6 +323,24 @@ public class SecuredSessionFactoryImpl extends SessionFactoryImpl implements Con LOGGER.error("Problem processing Configuration Event {}", event, e); } } + +@Override +public void unregister(Object service) { +synchronized (services) { +super.unregister(service); +removeUnregisteredSeriveForAllShell(service); +} +} + +private void removeUnregisteredSeriveForAllShell(Object service) { +synchronized (this.serviceVisibleMapForAllThreads) { +for (final Iterator> iterator = this.serviceVisibleMapForAllThreads.values().iterator(); +iterator.hasNext();) { +Map serviceMap = iterator.next(); +serviceMap.remove(service); +} +} +} private void addScopeConfig(Configuration config) { if (!config.getPid().startsWith(PROXY_COMMAND_ACL_PID_PREFIX)) {
[karaf] branch master updated: [KARAF-6476]ClassLoader and Memory leak
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 02ba614 [KARAF-6476]ClassLoader and Memory leak 02ba614 is described below commit 02ba6142666e92e9505285c4af90653dfaa3f5df Author: Freeman Fang AuthorDate: Wed Oct 23 20:22:43 2019 -0400 [KARAF-6476]ClassLoader and Memory leak --- .../osgi/secured/SecuredSessionFactoryImpl.java| 25 -- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/shell/core/src/main/java/org/apache/karaf/shell/impl/console/osgi/secured/SecuredSessionFactoryImpl.java b/shell/core/src/main/java/org/apache/karaf/shell/impl/console/osgi/secured/SecuredSessionFactoryImpl.java index b6b0c99..93efef4 100644 --- a/shell/core/src/main/java/org/apache/karaf/shell/impl/console/osgi/secured/SecuredSessionFactoryImpl.java +++ b/shell/core/src/main/java/org/apache/karaf/shell/impl/console/osgi/secured/SecuredSessionFactoryImpl.java @@ -26,10 +26,11 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Dictionary; import java.util.HashMap; -import java.util.HashSet; +import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; +import java.util.WeakHashMap; import javax.security.auth.Subject; @@ -69,6 +70,7 @@ public class SecuredSessionFactoryImpl extends SessionFactoryImpl implements Con private SingleServiceTracker configAdminTracker; private ServiceRegistration registration; private ThreadLocal> serviceVisibleMap = new ThreadLocal<>(); +private Map> serviceVisibleMapForAllThreads = new WeakHashMap<>(); public SecuredSessionFactoryImpl(BundleContext bundleContext, ThreadIO threadIO) throws InvalidSyntaxException { super(threadIO); @@ -105,6 +107,8 @@ public class SecuredSessionFactoryImpl extends SessionFactoryImpl implements Con protected boolean isVisible(Object service) { if (this.serviceVisibleMap.get() == null) { this.serviceVisibleMap.set(new HashMap<>()); +Thread cur = Thread.currentThread(); +this.serviceVisibleMapForAllThreads.put(cur, this.serviceVisibleMap.get()); } if (this.serviceVisibleMap.get().get(service) != null) { return this.serviceVisibleMap.get().get(service); @@ -167,7 +171,6 @@ public class SecuredSessionFactoryImpl extends SessionFactoryImpl implements Con private AliasCommand findAlias(String scope, String name) { if (session != null) { Set vars = ((Set) session.get(null)); -Set aliases = new HashSet<>(); String aliasScope = null; String aliasName = null; for (String var : vars) { @@ -319,6 +322,24 @@ public class SecuredSessionFactoryImpl extends SessionFactoryImpl implements Con LOGGER.error("Problem processing Configuration Event {}", event, e); } } + +@Override +public void unregister(Object service) { +synchronized (services) { +super.unregister(service); +removeUnregisteredSeriveForAllShell(service); +} +} + +private void removeUnregisteredSeriveForAllShell(Object service) { +synchronized (this.serviceVisibleMapForAllThreads) { +for (final Iterator> iterator = this.serviceVisibleMapForAllThreads.values().iterator(); +iterator.hasNext();) { +Map serviceMap = iterator.next(); +serviceMap.remove(service); +} +} +} private void addScopeConfig(Configuration config) { if (!config.getPid().startsWith(PROXY_COMMAND_ACL_PID_PREFIX)) {
[karaf] 02/02: [KARAF-6447]add MalformedURLException as IOException cause
This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch karaf-4.2.x in repository https://gitbox.apache.org/repos/asf/karaf.git commit 36e39d1cdb5502902fa4d10dbd4be0c628f924e1 Author: Freeman Fang AuthorDate: Thu Oct 10 16:40:27 2019 -0400 [KARAF-6447]add MalformedURLException as IOException cause (cherry picked from commit 1d83b303796aeea408870d4eb55e79e30b5ba978) --- .../apache/karaf/features/internal/service/FeatureConfigInstaller.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/core/src/main/java/org/apache/karaf/features/internal/service/FeatureConfigInstaller.java b/features/core/src/main/java/org/apache/karaf/features/internal/service/FeatureConfigInstaller.java index 8dfc983..cbb811b 100644 --- a/features/core/src/main/java/org/apache/karaf/features/internal/service/FeatureConfigInstaller.java +++ b/features/core/src/main/java/org/apache/karaf/features/internal/service/FeatureConfigInstaller.java @@ -106,7 +106,7 @@ public class FeatureConfigInstaller { try { props.load(new URL(val)); } catch (java.net.MalformedURLException e) { -throw new IOException("Failed to load config info from URL [" + val + "] for feature [" + feature.getName() + "/" + feature.getVersion() + "]."); +throw new IOException("Failed to load config info from URL [" + val + "] for feature [" + feature.getName() + "/" + feature.getVersion() + "].", e); } } else { props.load(new StringReader(val));
[karaf] 01/02: Added more information to the thrown exception for malformed url.
This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch karaf-4.2.x in repository https://gitbox.apache.org/repos/asf/karaf.git commit c565d59dd3fcd7df8c3f548610fcb61340fdecde Author: Miroslav Beranič AuthorDate: Sat Oct 5 22:25:27 2019 +0200 Added more information to the thrown exception for malformed url. (cherry picked from commit e14f6b531905dce29c2a49d83f2ba39ff061de5f) --- .../karaf/features/internal/service/FeatureConfigInstaller.java | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/features/core/src/main/java/org/apache/karaf/features/internal/service/FeatureConfigInstaller.java b/features/core/src/main/java/org/apache/karaf/features/internal/service/FeatureConfigInstaller.java index 84c8a5d..8dfc983 100644 --- a/features/core/src/main/java/org/apache/karaf/features/internal/service/FeatureConfigInstaller.java +++ b/features/core/src/main/java/org/apache/karaf/features/internal/service/FeatureConfigInstaller.java @@ -103,7 +103,11 @@ public class FeatureConfigInstaller { // trim lines String val = config.getValue(); if (config.isExternal()) { -props.load(new URL(val)); +try { +props.load(new URL(val)); +} catch (java.net.MalformedURLException e) { +throw new IOException("Failed to load config info from URL [" + val + "] for feature [" + feature.getName() + "/" + feature.getVersion() + "]."); +} } else { props.load(new StringReader(val)); }
[karaf] branch karaf-4.2.x updated (8118bea -> 36e39d1)
This is an automated email from the ASF dual-hosted git repository. ffang pushed a change to branch karaf-4.2.x in repository https://gitbox.apache.org/repos/asf/karaf.git. from 8118bea Some grammatical and spelling fixes for the manual new c565d59 Added more information to the thrown exception for malformed url. new 36e39d1 [KARAF-6447]add MalformedURLException as IOException cause The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../karaf/features/internal/service/FeatureConfigInstaller.java | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-)
[karaf] branch master updated: [KARAF-6447]add MalformedURLException as IOException cause
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 1d83b30 [KARAF-6447]add MalformedURLException as IOException cause 1d83b30 is described below commit 1d83b303796aeea408870d4eb55e79e30b5ba978 Author: Freeman Fang AuthorDate: Thu Oct 10 16:40:27 2019 -0400 [KARAF-6447]add MalformedURLException as IOException cause --- .../apache/karaf/features/internal/service/FeatureConfigInstaller.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/core/src/main/java/org/apache/karaf/features/internal/service/FeatureConfigInstaller.java b/features/core/src/main/java/org/apache/karaf/features/internal/service/FeatureConfigInstaller.java index 8dfc983..cbb811b 100644 --- a/features/core/src/main/java/org/apache/karaf/features/internal/service/FeatureConfigInstaller.java +++ b/features/core/src/main/java/org/apache/karaf/features/internal/service/FeatureConfigInstaller.java @@ -106,7 +106,7 @@ public class FeatureConfigInstaller { try { props.load(new URL(val)); } catch (java.net.MalformedURLException e) { -throw new IOException("Failed to load config info from URL [" + val + "] for feature [" + feature.getName() + "/" + feature.getVersion() + "]."); +throw new IOException("Failed to load config info from URL [" + val + "] for feature [" + feature.getName() + "/" + feature.getVersion() + "].", e); } } else { props.load(new StringReader(val));
[karaf] branch master updated: Added more information to the thrown exception for malformed url.
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 e14f6b5 Added more information to the thrown exception for malformed url. new 1d46102 Merge pull request #951 from mibesis/feature_config_installer_url e14f6b5 is described below commit e14f6b531905dce29c2a49d83f2ba39ff061de5f Author: Miroslav Beranič AuthorDate: Sat Oct 5 22:25:27 2019 +0200 Added more information to the thrown exception for malformed url. --- .../karaf/features/internal/service/FeatureConfigInstaller.java | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/features/core/src/main/java/org/apache/karaf/features/internal/service/FeatureConfigInstaller.java b/features/core/src/main/java/org/apache/karaf/features/internal/service/FeatureConfigInstaller.java index 84c8a5d..8dfc983 100644 --- a/features/core/src/main/java/org/apache/karaf/features/internal/service/FeatureConfigInstaller.java +++ b/features/core/src/main/java/org/apache/karaf/features/internal/service/FeatureConfigInstaller.java @@ -103,7 +103,11 @@ public class FeatureConfigInstaller { // trim lines String val = config.getValue(); if (config.isExternal()) { -props.load(new URL(val)); +try { +props.load(new URL(val)); +} catch (java.net.MalformedURLException e) { +throw new IOException("Failed to load config info from URL [" + val + "] for feature [" + feature.getName() + "/" + feature.getVersion() + "]."); +} } else { props.load(new StringReader(val)); }
[karaf] branch karaf-4.2.x updated: [KARAF-6445][karaf-maven-plugin] client goal: ensure commands in script file will be executed in expected order
This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch karaf-4.2.x in repository https://gitbox.apache.org/repos/asf/karaf.git The following commit(s) were added to refs/heads/karaf-4.2.x by this push: new ab5071b [KARAF-6445][karaf-maven-plugin] client goal: ensure commands in script file will be executed in expected order ab5071b is described below commit ab5071b65aec3a365230acb2eea17a0f2ee05071 Author: Freeman Fang AuthorDate: Thu Oct 3 11:28:42 2019 -0400 [KARAF-6445][karaf-maven-plugin] client goal: ensure commands in script file will be executed in expected order (cherry picked from commit 40509fade4266ec2f2362f12fb552d1771c4c970) --- .../src/main/java/org/apache/karaf/tooling/client/ClientMojo.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/client/ClientMojo.java b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/client/ClientMojo.java index 389e724..2a916a3 100644 --- a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/client/ClientMojo.java +++ b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/client/ClientMojo.java @@ -120,7 +120,7 @@ public class ClientMojo extends AbstractMojo { descriptor.setCommand(line); double rankSuffix = 0.5; for (int j = 0; j < lineIndex; j++) { -rankSuffix = rankSuffix * 0.1; +rankSuffix = rankSuffix + 0.1; } descriptor.setRank(script.getRank() + rankSuffix); lineIndex++;
[karaf] branch master updated: [KARAF-6445][karaf-maven-plugin] client goal: ensure commands in script file will be executed in expected order
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 40509fa [KARAF-6445][karaf-maven-plugin] client goal: ensure commands in script file will be executed in expected order 40509fa is described below commit 40509fade4266ec2f2362f12fb552d1771c4c970 Author: Freeman Fang AuthorDate: Thu Oct 3 11:28:42 2019 -0400 [KARAF-6445][karaf-maven-plugin] client goal: ensure commands in script file will be executed in expected order --- .../src/main/java/org/apache/karaf/tooling/client/ClientMojo.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/client/ClientMojo.java b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/client/ClientMojo.java index 5c9b9e0..d074167 100644 --- a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/client/ClientMojo.java +++ b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/client/ClientMojo.java @@ -117,7 +117,7 @@ public class ClientMojo extends AbstractMojo { descriptor.setCommand(line); double rankSuffix = 0.5; for (int j = 0; j < lineIndex; j++) { -rankSuffix = rankSuffix * 0.1; +rankSuffix = rankSuffix + 0.1; } descriptor.setRank(script.getRank() + rankSuffix); lineIndex++;
[karaf] branch master updated: [KARAF-6413]Windows Service fails to start initially
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 479f64d [KARAF-6413]Windows Service fails to start initially 479f64d is described below commit 479f64dd02521b45bd72eb067ec46392f98b6f19 Author: Freeman Fang AuthorDate: Tue Sep 10 14:43:04 2019 -0400 [KARAF-6413]Windows Service fails to start initially --- assemblies/features/base/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assemblies/features/base/pom.xml b/assemblies/features/base/pom.xml index 922b71d..14615d6 100644 --- a/assemblies/features/base/pom.xml +++ b/assemblies/features/base/pom.xml @@ -240,7 +240,7 @@ com.sun.winsw winsw ${winsw.version} -bin +net4 exe target/classes/resources/bin/contrib karaf-service-win.exe diff --git a/pom.xml b/pom.xml index c8e1f3c..1a01948 100644 --- a/pom.xml +++ b/pom.xml @@ -321,7 +321,7 @@ 1.4.7 1.1 -1.18 +2.3.0
[karaf] branch karaf-4.2.x updated: [KARAF-6413]Windows Service fails to start initially
This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch karaf-4.2.x in repository https://gitbox.apache.org/repos/asf/karaf.git The following commit(s) were added to refs/heads/karaf-4.2.x by this push: new f9cac7b [KARAF-6413]Windows Service fails to start initially f9cac7b is described below commit f9cac7bd85fa28081967af8a2a8ea3e45f09accd Author: Freeman Fang AuthorDate: Tue Sep 10 14:43:04 2019 -0400 [KARAF-6413]Windows Service fails to start initially (cherry picked from commit 479f64dd02521b45bd72eb067ec46392f98b6f19) --- assemblies/features/base/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assemblies/features/base/pom.xml b/assemblies/features/base/pom.xml index 0ed2f36..219313e 100644 --- a/assemblies/features/base/pom.xml +++ b/assemblies/features/base/pom.xml @@ -240,7 +240,7 @@ com.sun.winsw winsw ${winsw.version} -bin +net4 exe target/classes/resources/bin/contrib karaf-service-win.exe diff --git a/pom.xml b/pom.xml index d34c535..5fa9d9b 100644 --- a/pom.xml +++ b/pom.xml @@ -320,7 +320,7 @@ 1.4.7 1.1 -1.18 +2.3.0
[karaf] branch karaf-4.2.x updated: [KARAF-6362][karaf-maven-plugin] client goal:only one command in script file could be executed
This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch karaf-4.2.x in repository https://gitbox.apache.org/repos/asf/karaf.git The following commit(s) were added to refs/heads/karaf-4.2.x by this push: new ae9e600 [KARAF-6362][karaf-maven-plugin] client goal:only one command in script file could be executed ae9e600 is described below commit ae9e6006b9b4bff107017b395398fae4b1ce1736 Author: Freeman Fang AuthorDate: Mon Jul 22 15:07:17 2019 -0400 [KARAF-6362][karaf-maven-plugin] client goal:only one command in script file could be executed (cherry picked from commit 2f966c675cd478f4cd0a5b6b4cf938a9f0064b88) --- .../main/java/org/apache/karaf/tooling/client/ClientMojo.java | 10 -- .../org/apache/karaf/tooling/client/CommandDescriptor.java | 6 +++--- .../java/org/apache/karaf/tooling/client/SortedCommand.java| 2 +- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/client/ClientMojo.java b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/client/ClientMojo.java index 1d5cc1e..389e724 100644 --- a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/client/ClientMojo.java +++ b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/client/ClientMojo.java @@ -103,13 +103,14 @@ public class ClientMojo extends AbstractMojo { return; } // ranking the commands and scripts -Comparator comparator = Comparator.comparingInt(CommandDescriptor::getRank); +Comparator comparator = Comparator.comparingDouble(CommandDescriptor::getRank); SortedSet sortedCommands = new TreeSet<>(comparator); if (scripts != null) { for (ScriptDescriptor script : scripts) { File file = script.getScript(); try (BufferedReader br = new BufferedReader(new FileReader(file))) { String line; +int lineIndex = 0; while ((line = br.readLine()) != null) { line = line.trim(); if (line.isEmpty()) { @@ -117,7 +118,12 @@ public class ClientMojo extends AbstractMojo { } CommandDescriptor descriptor = new CommandDescriptor(); descriptor.setCommand(line); -descriptor.setRank(script.getRank()); +double rankSuffix = 0.5; +for (int j = 0; j < lineIndex; j++) { +rankSuffix = rankSuffix * 0.1; +} +descriptor.setRank(script.getRank() + rankSuffix); +lineIndex++; sortedCommands.add(descriptor); } } catch (Exception e) { diff --git a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/client/CommandDescriptor.java b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/client/CommandDescriptor.java index c532360..ed9e893 100644 --- a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/client/CommandDescriptor.java +++ b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/client/CommandDescriptor.java @@ -18,14 +18,14 @@ package org.apache.karaf.tooling.client; public class CommandDescriptor { -private int rank; +private double rank; private String command; -public int getRank() { +public double getRank() { return rank; } -public void setRank(int rank) { +public void setRank(double rank) { this.rank = rank; } diff --git a/tooling/karaf-maven-plugin/src/test/java/org/apache/karaf/tooling/client/SortedCommand.java b/tooling/karaf-maven-plugin/src/test/java/org/apache/karaf/tooling/client/SortedCommand.java index 6960cdc..8e881e9 100644 --- a/tooling/karaf-maven-plugin/src/test/java/org/apache/karaf/tooling/client/SortedCommand.java +++ b/tooling/karaf-maven-plugin/src/test/java/org/apache/karaf/tooling/client/SortedCommand.java @@ -39,7 +39,7 @@ public class SortedCommand { commands.add(command); // ranking the commands and scripts -Comparator comparator = Comparator.comparingInt(CommandDescriptor::getRank); +Comparator comparator = Comparator.comparingDouble(CommandDescriptor::getRank); SortedSet sortedCommands = new TreeSet<>(comparator); sortedCommands.addAll(commands);
[karaf] branch karaf-4.2.x updated: [KARAF-6361]jre.properties lists CORBA packages for jre-11
This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch karaf-4.2.x in repository https://gitbox.apache.org/repos/asf/karaf.git The following commit(s) were added to refs/heads/karaf-4.2.x by this push: new 267884a [KARAF-6361]jre.properties lists CORBA packages for jre-11 267884a is described below commit 267884a5d0d447eaabc093e2e5fef1b0abfccad0 Author: Freeman Fang AuthorDate: Mon Jul 22 10:06:04 2019 -0400 [KARAF-6361]jre.properties lists CORBA packages for jre-11 (cherry picked from commit 468a844b433ac35c22455dcb6f1dadc5be7b0602) --- .../resources/etc/jre.properties | 30 -- .../resources/test-karaf-home/etc/jre.properties | 30 -- 2 files changed, 60 deletions(-) diff --git a/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties b/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties index 487d046..82345dc 100644 --- a/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties +++ b/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties @@ -576,7 +576,6 @@ jre-9= \ javax.print.attribute.standard, \ javax.print.event, \ javax.rmi, \ - javax.rmi.CORBA, \ javax.rmi.ssl, \ javax.script, \ javax.security.auth, \ @@ -677,35 +676,6 @@ jre-9= \ javafx.util.converter, \ netscape.javascript, \ org.ietf.jgss, \ - org.omg.CORBA, \ - org.omg.CORBA_2_3, \ - org.omg.CORBA_2_3.portable, \ - org.omg.CORBA.DynAnyPackage, \ - org.omg.CORBA.ORBPackage, \ - org.omg.CORBA.portable, \ - org.omg.CORBA.TypeCodePackage, \ - org.omg.CosNaming, \ - org.omg.CosNaming.NamingContextExtPackage, \ - org.omg.CosNaming.NamingContextPackage, \ - org.omg.Dynamic, \ - org.omg.DynamicAny, \ - org.omg.DynamicAny.DynAnyFactoryPackage, \ - org.omg.DynamicAny.DynAnyPackage, \ - org.omg.IOP, \ - org.omg.IOP.CodecFactoryPackage, \ - org.omg.IOP.CodecPackage, \ - org.omg.Messaging, \ - org.omg.PortableInterceptor, \ - org.omg.PortableInterceptor.ORBInitInfoPackage, \ - org.omg.PortableServer, \ - org.omg.PortableServer.CurrentPackage, \ - org.omg.PortableServer.POAManagerPackage, \ - org.omg.PortableServer.POAPackage, \ - org.omg.PortableServer.portable, \ - org.omg.PortableServer.ServantLocatorPackage, \ - org.omg.SendingContext, \ - org.omg.stub.java.rmi, \ - org.omg.stub.javax.management.remote.rmi, \ org.w3c.dom, \ org.w3c.dom.bootstrap, \ org.w3c.dom.css, \ diff --git a/main/src/test/resources/test-karaf-home/etc/jre.properties b/main/src/test/resources/test-karaf-home/etc/jre.properties index 226674b..c0ec626 100644 --- a/main/src/test/resources/test-karaf-home/etc/jre.properties +++ b/main/src/test/resources/test-karaf-home/etc/jre.properties @@ -585,7 +585,6 @@ jre-9= \ javax.print.attribute.standard, \ javax.print.event, \ javax.rmi, \ - javax.rmi.CORBA, \ javax.rmi.ssl, \ javax.script, \ javax.security.auth, \ @@ -692,35 +691,6 @@ jre-9= \ javafx.util, \ javafx.util.converter, \ org.ietf.jgss, \ - org.omg.CORBA, \ - org.omg.CORBA_2_3, \ - org.omg.CORBA_2_3.portable, \ - org.omg.CORBA.DynAnyPackage, \ - org.omg.CORBA.ORBPackage, \ - org.omg.CORBA.portable, \ - org.omg.CORBA.TypeCodePackage, \ - org.omg.CosNaming, \ - org.omg.CosNaming.NamingContextExtPackage, \ - org.omg.CosNaming.NamingContextPackage, \ - org.omg.Dynamic, \ - org.omg.DynamicAny, \ - org.omg.DynamicAny.DynAnyFactoryPackage, \ - org.omg.DynamicAny.DynAnyPackage, \ - org.omg.IOP, \ - org.omg.IOP.CodecFactoryPackage, \ - org.omg.IOP.CodecPackage, \ - org.omg.Messaging, \ - org.omg.PortableInterceptor, \ - org.omg.PortableInterceptor.ORBInitInfoPackage, \ - org.omg.PortableServer, \ - org.omg.PortableServer.CurrentPackage, \ - org.omg.PortableServer.POAManagerPackage, \ - org.omg.PortableServer.POAPackage, \ - org.omg.PortableServer.portable, \ - org.omg.PortableServer.ServantLocatorPackage, \ - org.omg.SendingContext, \ - org.omg.stub.java.rmi, \ - org.omg.stub.javax.management.remote.rmi, \ org.w3c.dom, \ org.w3c.dom.bootstrap, \ org.w3c.dom.css, \
[karaf] branch master updated: [KARAF-6362][karaf-maven-plugin] client goal:only one command in script file could be executed
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 2f966c6 [KARAF-6362][karaf-maven-plugin] client goal:only one command in script file could be executed 2f966c6 is described below commit 2f966c675cd478f4cd0a5b6b4cf938a9f0064b88 Author: Freeman Fang AuthorDate: Mon Jul 22 15:07:17 2019 -0400 [KARAF-6362][karaf-maven-plugin] client goal:only one command in script file could be executed --- .../main/java/org/apache/karaf/tooling/client/ClientMojo.java | 10 -- .../org/apache/karaf/tooling/client/CommandDescriptor.java | 6 +++--- .../java/org/apache/karaf/tooling/client/SortedCommand.java| 2 +- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/client/ClientMojo.java b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/client/ClientMojo.java index 1d5cc1e..389e724 100644 --- a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/client/ClientMojo.java +++ b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/client/ClientMojo.java @@ -103,13 +103,14 @@ public class ClientMojo extends AbstractMojo { return; } // ranking the commands and scripts -Comparator comparator = Comparator.comparingInt(CommandDescriptor::getRank); +Comparator comparator = Comparator.comparingDouble(CommandDescriptor::getRank); SortedSet sortedCommands = new TreeSet<>(comparator); if (scripts != null) { for (ScriptDescriptor script : scripts) { File file = script.getScript(); try (BufferedReader br = new BufferedReader(new FileReader(file))) { String line; +int lineIndex = 0; while ((line = br.readLine()) != null) { line = line.trim(); if (line.isEmpty()) { @@ -117,7 +118,12 @@ public class ClientMojo extends AbstractMojo { } CommandDescriptor descriptor = new CommandDescriptor(); descriptor.setCommand(line); -descriptor.setRank(script.getRank()); +double rankSuffix = 0.5; +for (int j = 0; j < lineIndex; j++) { +rankSuffix = rankSuffix * 0.1; +} +descriptor.setRank(script.getRank() + rankSuffix); +lineIndex++; sortedCommands.add(descriptor); } } catch (Exception e) { diff --git a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/client/CommandDescriptor.java b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/client/CommandDescriptor.java index c532360..ed9e893 100644 --- a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/client/CommandDescriptor.java +++ b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/client/CommandDescriptor.java @@ -18,14 +18,14 @@ package org.apache.karaf.tooling.client; public class CommandDescriptor { -private int rank; +private double rank; private String command; -public int getRank() { +public double getRank() { return rank; } -public void setRank(int rank) { +public void setRank(double rank) { this.rank = rank; } diff --git a/tooling/karaf-maven-plugin/src/test/java/org/apache/karaf/tooling/client/SortedCommand.java b/tooling/karaf-maven-plugin/src/test/java/org/apache/karaf/tooling/client/SortedCommand.java index b50a8f1..98bad3b 100644 --- a/tooling/karaf-maven-plugin/src/test/java/org/apache/karaf/tooling/client/SortedCommand.java +++ b/tooling/karaf-maven-plugin/src/test/java/org/apache/karaf/tooling/client/SortedCommand.java @@ -39,7 +39,7 @@ public class SortedCommand { commands.add(command); // ranking the commands and scripts -Comparator comparator = Comparator.comparingInt(CommandDescriptor::getRank); +Comparator comparator = Comparator.comparingDouble(CommandDescriptor::getRank); SortedSet sortedCommands = new TreeSet<>(comparator); sortedCommands.addAll(commands);
[karaf] branch master updated: [KARAF-6361]jre.properties lists CORBA packages for jre-11
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 468a844 [KARAF-6361]jre.properties lists CORBA packages for jre-11 468a844 is described below commit 468a844b433ac35c22455dcb6f1dadc5be7b0602 Author: Freeman Fang AuthorDate: Mon Jul 22 10:06:04 2019 -0400 [KARAF-6361]jre.properties lists CORBA packages for jre-11 --- .../resources/etc/jre.properties | 30 -- .../resources/test-karaf-home/etc/jre.properties | 30 -- 2 files changed, 60 deletions(-) diff --git a/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties b/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties index 487d046..82345dc 100644 --- a/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties +++ b/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties @@ -576,7 +576,6 @@ jre-9= \ javax.print.attribute.standard, \ javax.print.event, \ javax.rmi, \ - javax.rmi.CORBA, \ javax.rmi.ssl, \ javax.script, \ javax.security.auth, \ @@ -677,35 +676,6 @@ jre-9= \ javafx.util.converter, \ netscape.javascript, \ org.ietf.jgss, \ - org.omg.CORBA, \ - org.omg.CORBA_2_3, \ - org.omg.CORBA_2_3.portable, \ - org.omg.CORBA.DynAnyPackage, \ - org.omg.CORBA.ORBPackage, \ - org.omg.CORBA.portable, \ - org.omg.CORBA.TypeCodePackage, \ - org.omg.CosNaming, \ - org.omg.CosNaming.NamingContextExtPackage, \ - org.omg.CosNaming.NamingContextPackage, \ - org.omg.Dynamic, \ - org.omg.DynamicAny, \ - org.omg.DynamicAny.DynAnyFactoryPackage, \ - org.omg.DynamicAny.DynAnyPackage, \ - org.omg.IOP, \ - org.omg.IOP.CodecFactoryPackage, \ - org.omg.IOP.CodecPackage, \ - org.omg.Messaging, \ - org.omg.PortableInterceptor, \ - org.omg.PortableInterceptor.ORBInitInfoPackage, \ - org.omg.PortableServer, \ - org.omg.PortableServer.CurrentPackage, \ - org.omg.PortableServer.POAManagerPackage, \ - org.omg.PortableServer.POAPackage, \ - org.omg.PortableServer.portable, \ - org.omg.PortableServer.ServantLocatorPackage, \ - org.omg.SendingContext, \ - org.omg.stub.java.rmi, \ - org.omg.stub.javax.management.remote.rmi, \ org.w3c.dom, \ org.w3c.dom.bootstrap, \ org.w3c.dom.css, \ diff --git a/main/src/test/resources/test-karaf-home/etc/jre.properties b/main/src/test/resources/test-karaf-home/etc/jre.properties index 226674b..c0ec626 100644 --- a/main/src/test/resources/test-karaf-home/etc/jre.properties +++ b/main/src/test/resources/test-karaf-home/etc/jre.properties @@ -585,7 +585,6 @@ jre-9= \ javax.print.attribute.standard, \ javax.print.event, \ javax.rmi, \ - javax.rmi.CORBA, \ javax.rmi.ssl, \ javax.script, \ javax.security.auth, \ @@ -692,35 +691,6 @@ jre-9= \ javafx.util, \ javafx.util.converter, \ org.ietf.jgss, \ - org.omg.CORBA, \ - org.omg.CORBA_2_3, \ - org.omg.CORBA_2_3.portable, \ - org.omg.CORBA.DynAnyPackage, \ - org.omg.CORBA.ORBPackage, \ - org.omg.CORBA.portable, \ - org.omg.CORBA.TypeCodePackage, \ - org.omg.CosNaming, \ - org.omg.CosNaming.NamingContextExtPackage, \ - org.omg.CosNaming.NamingContextPackage, \ - org.omg.Dynamic, \ - org.omg.DynamicAny, \ - org.omg.DynamicAny.DynAnyFactoryPackage, \ - org.omg.DynamicAny.DynAnyPackage, \ - org.omg.IOP, \ - org.omg.IOP.CodecFactoryPackage, \ - org.omg.IOP.CodecPackage, \ - org.omg.Messaging, \ - org.omg.PortableInterceptor, \ - org.omg.PortableInterceptor.ORBInitInfoPackage, \ - org.omg.PortableServer, \ - org.omg.PortableServer.CurrentPackage, \ - org.omg.PortableServer.POAManagerPackage, \ - org.omg.PortableServer.POAPackage, \ - org.omg.PortableServer.portable, \ - org.omg.PortableServer.ServantLocatorPackage, \ - org.omg.SendingContext, \ - org.omg.stub.java.rmi, \ - org.omg.stub.javax.management.remote.rmi, \ org.w3c.dom, \ org.w3c.dom.bootstrap, \ org.w3c.dom.css, \
[karaf] branch karaf-4.2.x updated: KARAF-6359 - Clients can log in with encrypted passwords
This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch karaf-4.2.x in repository https://gitbox.apache.org/repos/asf/karaf.git The following commit(s) were added to refs/heads/karaf-4.2.x by this push: new 9e2e127 KARAF-6359 - Clients can log in with encrypted passwords 9e2e127 is described below commit 9e2e1271b1ecbfa92af6fb240f52d79975f6fab9 Author: Colm O hEigeartaigh AuthorDate: Wed Jul 17 13:07:36 2019 +0100 KARAF-6359 - Clients can log in with encrypted passwords (cherry picked from commit 7434001dece25e467c61b68c191fb26a2f76b9b4) --- .../features/standard/src/main/feature/feature.xml | 2 +- .../resources/etc/org.apache.karaf.jaas.cfg| 4 ++-- .../src/test/filtered-resources/etc/feature.xml| 2 +- .../jaas/modules/AbstractKarafLoginModule.java | 17 +-- .../jaas/modules/encryption/EncryptionSupport.java | 24 +++--- manual/src/main/asciidoc/user-guide/security.adoc | 2 +- 6 files changed, 27 insertions(+), 24 deletions(-) diff --git a/assemblies/features/standard/src/main/feature/feature.xml b/assemblies/features/standard/src/main/feature/feature.xml index 8961dba..8bb69fa 100644 --- a/assemblies/features/standard/src/main/feature/feature.xml +++ b/assemblies/features/standard/src/main/feature/feature.xml @@ -662,7 +662,7 @@ encryption.enabled = false # a more powerful one named 'jasypt' is available # when installing the encryption feature # -encryption.name = +encryption.name = basic # # Encryption prefix diff --git a/instance/src/main/resources/org/apache/karaf/instance/resources/etc/org.apache.karaf.jaas.cfg b/instance/src/main/resources/org/apache/karaf/instance/resources/etc/org.apache.karaf.jaas.cfg index 8ac5af6..ace5fe4 100644 --- a/instance/src/main/resources/org/apache/karaf/instance/resources/etc/org.apache.karaf.jaas.cfg +++ b/instance/src/main/resources/org/apache/karaf/instance/resources/etc/org.apache.karaf.jaas.cfg @@ -28,7 +28,7 @@ encryption.enabled = false # a more powerful one named 'jasypt' is available # when installing the encryption feature # -encryption.name = +encryption.name = basic # # Encryption prefix @@ -58,4 +58,4 @@ encryption.algorithm = MD5 # hexadecimal # base64 # -encryption.encoding = hexadecimal \ No newline at end of file +encryption.encoding = hexadecimal diff --git a/itests/test/src/test/filtered-resources/etc/feature.xml b/itests/test/src/test/filtered-resources/etc/feature.xml index 9b19158..3197680 100644 --- a/itests/test/src/test/filtered-resources/etc/feature.xml +++ b/itests/test/src/test/filtered-resources/etc/feature.xml @@ -450,7 +450,7 @@ # a more powerful one named 'jasypt' is available # when installing the encryption feature # -encryption.name = +encryption.name = basic # # Encryption prefix diff --git a/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/AbstractKarafLoginModule.java b/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/AbstractKarafLoginModule.java index 0a07c47..6865580 100644 --- a/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/AbstractKarafLoginModule.java +++ b/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/AbstractKarafLoginModule.java @@ -2,9 +2,9 @@ * Licensed 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. @@ -43,7 +43,7 @@ public abstract class AbstractKarafLoginModule implements LoginModule { protected CallbackHandler callbackHandler; protected boolean debug; protected Map options; - + protected String rolePolicy; protected String roleDiscriminator; protected boolean detailedLoginExcepion; @@ -127,15 +127,8 @@ public abstract class AbstractKarafLoginModule implements LoginModule { encryptionSupport = new EncryptionSupport(options); } -public boolean checkPassword(String plain, String encrypted) { -String newEncrypted = encryptionSupport.encrypt(plain); -String prefix = encryptionSupport.getEncryptionPrefix(); -String suffix = encryptionSupport.getEncryptionSuffix(); -boolean isMatch = encryptionSupport.getEncryption() != null -? encryptionSupport.getEncryption().checkPassword(plain, -encrypted.substring(prefix.length(), encrypted.length() - suffix.length())) : false; -return encrypted.equals(newEncrypted) -|| isMatch;
[karaf] branch master updated: KARAF-6359 - Clients can log in with encrypted passwords
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 7434001 KARAF-6359 - Clients can log in with encrypted passwords new 03f9298 Merge pull request #902 from coheigea/KARAF-6359 7434001 is described below commit 7434001dece25e467c61b68c191fb26a2f76b9b4 Author: Colm O hEigeartaigh AuthorDate: Wed Jul 17 13:07:36 2019 +0100 KARAF-6359 - Clients can log in with encrypted passwords --- .../features/standard/src/main/feature/feature.xml | 2 +- .../resources/etc/org.apache.karaf.jaas.cfg| 4 ++-- .../src/test/filtered-resources/etc/feature.xml| 2 +- .../jaas/modules/AbstractKarafLoginModule.java | 17 +-- .../jaas/modules/encryption/EncryptionSupport.java | 24 +++--- manual/src/main/asciidoc/user-guide/security.adoc | 2 +- 6 files changed, 27 insertions(+), 24 deletions(-) diff --git a/assemblies/features/standard/src/main/feature/feature.xml b/assemblies/features/standard/src/main/feature/feature.xml index 8961dba..8bb69fa 100644 --- a/assemblies/features/standard/src/main/feature/feature.xml +++ b/assemblies/features/standard/src/main/feature/feature.xml @@ -662,7 +662,7 @@ encryption.enabled = false # a more powerful one named 'jasypt' is available # when installing the encryption feature # -encryption.name = +encryption.name = basic # # Encryption prefix diff --git a/instance/src/main/resources/org/apache/karaf/instance/resources/etc/org.apache.karaf.jaas.cfg b/instance/src/main/resources/org/apache/karaf/instance/resources/etc/org.apache.karaf.jaas.cfg index 8ac5af6..ace5fe4 100644 --- a/instance/src/main/resources/org/apache/karaf/instance/resources/etc/org.apache.karaf.jaas.cfg +++ b/instance/src/main/resources/org/apache/karaf/instance/resources/etc/org.apache.karaf.jaas.cfg @@ -28,7 +28,7 @@ encryption.enabled = false # a more powerful one named 'jasypt' is available # when installing the encryption feature # -encryption.name = +encryption.name = basic # # Encryption prefix @@ -58,4 +58,4 @@ encryption.algorithm = MD5 # hexadecimal # base64 # -encryption.encoding = hexadecimal \ No newline at end of file +encryption.encoding = hexadecimal diff --git a/itests/test/src/test/filtered-resources/etc/feature.xml b/itests/test/src/test/filtered-resources/etc/feature.xml index 9b19158..3197680 100644 --- a/itests/test/src/test/filtered-resources/etc/feature.xml +++ b/itests/test/src/test/filtered-resources/etc/feature.xml @@ -450,7 +450,7 @@ # a more powerful one named 'jasypt' is available # when installing the encryption feature # -encryption.name = +encryption.name = basic # # Encryption prefix diff --git a/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/AbstractKarafLoginModule.java b/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/AbstractKarafLoginModule.java index 0a07c47..6865580 100644 --- a/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/AbstractKarafLoginModule.java +++ b/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/AbstractKarafLoginModule.java @@ -2,9 +2,9 @@ * Licensed 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. @@ -43,7 +43,7 @@ public abstract class AbstractKarafLoginModule implements LoginModule { protected CallbackHandler callbackHandler; protected boolean debug; protected Map options; - + protected String rolePolicy; protected String roleDiscriminator; protected boolean detailedLoginExcepion; @@ -127,15 +127,8 @@ public abstract class AbstractKarafLoginModule implements LoginModule { encryptionSupport = new EncryptionSupport(options); } -public boolean checkPassword(String plain, String encrypted) { -String newEncrypted = encryptionSupport.encrypt(plain); -String prefix = encryptionSupport.getEncryptionPrefix(); -String suffix = encryptionSupport.getEncryptionSuffix(); -boolean isMatch = encryptionSupport.getEncryption() != null -? encryptionSupport.getEncryption().checkPassword(plain, -encrypted.substring(prefix.length(), encrypted.length() - suffix.length())) : false; -return encrypted.equals(newEncrypted) -|| isMatch; +public boolean ch
[karaf] branch karaf-4.2.x updated: [KARAF-6358]jre.properties exports javax.annotation packages as 1.0 vs 1.3(jdk11)
This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch karaf-4.2.x in repository https://gitbox.apache.org/repos/asf/karaf.git The following commit(s) were added to refs/heads/karaf-4.2.x by this push: new 181bda6 [KARAF-6358]jre.properties exports javax.annotation packages as 1.0 vs 1.3(jdk11) 181bda6 is described below commit 181bda628774f949faf77526d8e516da43a337a6 Author: Freeman Fang AuthorDate: Tue Jul 16 17:50:07 2019 -0400 [KARAF-6358]jre.properties exports javax.annotation packages as 1.0 vs 1.3(jdk11) (cherry picked from commit 8d1032e61ce7fee6dafc02a5790c96c4c26f9fe6) --- .../base/src/main/filtered-resources/resources/etc/jre.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties b/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties index 27a5c39..487d046 100644 --- a/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties +++ b/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties @@ -539,7 +539,7 @@ jre-1.8= \ jre-9= \ javax.accessibility, \ javax.activity, \ - javax.annotation;version="1.0", \ + javax.annotation;version="1.3", \ javax.annotation.processing;version="1.0", \ javax.crypto, \ javax.crypto.interfaces, \
[karaf] branch master updated: [KARAF-6358]jre.properties exports javax.annotation packages as 1.0 vs 1.3(jdk11)
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 8d1032e [KARAF-6358]jre.properties exports javax.annotation packages as 1.0 vs 1.3(jdk11) 8d1032e is described below commit 8d1032e61ce7fee6dafc02a5790c96c4c26f9fe6 Author: Freeman Fang AuthorDate: Tue Jul 16 17:50:07 2019 -0400 [KARAF-6358]jre.properties exports javax.annotation packages as 1.0 vs 1.3(jdk11) --- .../base/src/main/filtered-resources/resources/etc/jre.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties b/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties index 27a5c39..487d046 100644 --- a/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties +++ b/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties @@ -539,7 +539,7 @@ jre-1.8= \ jre-9= \ javax.accessibility, \ javax.activity, \ - javax.annotation;version="1.0", \ + javax.annotation;version="1.3", \ javax.annotation.processing;version="1.0", \ javax.crypto, \ javax.crypto.interfaces, \
[karaf] branch karaf-4.2.x updated: [KARAF-6346]Support FATAL level for log console commands
This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch karaf-4.2.x in repository https://gitbox.apache.org/repos/asf/karaf.git The following commit(s) were added to refs/heads/karaf-4.2.x by this push: new 4c26f33 [KARAF-6346]Support FATAL level for log console commands 4c26f33 is described below commit 4c26f330be981fd2073e65427c9d2e3106684966 Author: Freeman Fang AuthorDate: Thu Jun 27 15:26:47 2019 -0400 [KARAF-6346]Support FATAL level for log console commands (cherry picked from commit 10842cf0007c355e93c271e5c3e66d492c8c1d25) --- log/src/main/java/org/apache/karaf/log/command/SetLogLevel.java | 4 ++-- log/src/main/java/org/apache/karaf/log/core/Level.java | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/log/src/main/java/org/apache/karaf/log/command/SetLogLevel.java b/log/src/main/java/org/apache/karaf/log/command/SetLogLevel.java index 34326a6..80257ad 100644 --- a/log/src/main/java/org/apache/karaf/log/command/SetLogLevel.java +++ b/log/src/main/java/org/apache/karaf/log/command/SetLogLevel.java @@ -33,8 +33,8 @@ import org.apache.karaf.shell.support.completers.StringsCompleter; @Service public class SetLogLevel implements Action { -@Argument(index = 0, name = "level", description = "The log level to set (OFF, TRACE, DEBUG, INFO, WARN, ERROR) or DEFAULT to unset", required = true, multiValued = false) -@Completion(value = StringsCompleter.class, values = { "OFF", "TRACE", "DEBUG", "INFO", "WARN", "ERROR", "DEFAULT" }) +@Argument(index = 0, name = "level", description = "The log level to set (OFF, TRACE, DEBUG, INFO, WARN, ERROR, FATAL) or DEFAULT to unset", required = true, multiValued = false) +@Completion(value = StringsCompleter.class, values = { "OFF", "TRACE", "DEBUG", "INFO", "WARN", "ERROR", "FATAL", "DEFAULT" }) String level; @Argument(index = 1, name = "logger", description = "Logger name or ROOT (default)", required = false, multiValued = false) diff --git a/log/src/main/java/org/apache/karaf/log/core/Level.java b/log/src/main/java/org/apache/karaf/log/core/Level.java index fcde028..3f19aa4 100644 --- a/log/src/main/java/org/apache/karaf/log/core/Level.java +++ b/log/src/main/java/org/apache/karaf/log/core/Level.java @@ -27,6 +27,7 @@ public enum Level { INFO, WARN, ERROR, +FATAL, OFF, DEFAULT;
[karaf] branch master updated: [KARAF-6346]Support FATAL level for log console commands
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 10842cf [KARAF-6346]Support FATAL level for log console commands 10842cf is described below commit 10842cf0007c355e93c271e5c3e66d492c8c1d25 Author: Freeman Fang AuthorDate: Thu Jun 27 15:26:47 2019 -0400 [KARAF-6346]Support FATAL level for log console commands --- log/src/main/java/org/apache/karaf/log/command/SetLogLevel.java | 4 ++-- log/src/main/java/org/apache/karaf/log/core/Level.java | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/log/src/main/java/org/apache/karaf/log/command/SetLogLevel.java b/log/src/main/java/org/apache/karaf/log/command/SetLogLevel.java index 34326a6..80257ad 100644 --- a/log/src/main/java/org/apache/karaf/log/command/SetLogLevel.java +++ b/log/src/main/java/org/apache/karaf/log/command/SetLogLevel.java @@ -33,8 +33,8 @@ import org.apache.karaf.shell.support.completers.StringsCompleter; @Service public class SetLogLevel implements Action { -@Argument(index = 0, name = "level", description = "The log level to set (OFF, TRACE, DEBUG, INFO, WARN, ERROR) or DEFAULT to unset", required = true, multiValued = false) -@Completion(value = StringsCompleter.class, values = { "OFF", "TRACE", "DEBUG", "INFO", "WARN", "ERROR", "DEFAULT" }) +@Argument(index = 0, name = "level", description = "The log level to set (OFF, TRACE, DEBUG, INFO, WARN, ERROR, FATAL) or DEFAULT to unset", required = true, multiValued = false) +@Completion(value = StringsCompleter.class, values = { "OFF", "TRACE", "DEBUG", "INFO", "WARN", "ERROR", "FATAL", "DEFAULT" }) String level; @Argument(index = 1, name = "logger", description = "Logger name or ROOT (default)", required = false, multiValued = false) diff --git a/log/src/main/java/org/apache/karaf/log/core/Level.java b/log/src/main/java/org/apache/karaf/log/core/Level.java index fcde028..3f19aa4 100644 --- a/log/src/main/java/org/apache/karaf/log/core/Level.java +++ b/log/src/main/java/org/apache/karaf/log/core/Level.java @@ -27,6 +27,7 @@ public enum Level { INFO, WARN, ERROR, +FATAL, OFF, DEFAULT;
[karaf] branch master updated: use a specific jackson version instead of a range to avoid downloading so many versions(even snapshot)
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 6014f0b use a specific jackson version instead of a range to avoid downloading so many versions(even snapshot) 6014f0b is described below commit 6014f0b36c527649dbcc9ba56cd6325dcbb11ce7 Author: Freeman Fang AuthorDate: Mon Jun 3 16:13:24 2019 -0400 use a specific jackson version instead of a range to avoid downloading so many versions(even snapshot) --- docker/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/pom.xml b/docker/pom.xml index 38aa728..706dda7 100644 --- a/docker/pom.xml +++ b/docker/pom.xml @@ -51,7 +51,7 @@ com.fasterxml.jackson.core jackson-databind -[2,3) +2.9.9 org.apache.karaf
[karaf] 03/04: [KARAF-6298]fix XATest|JmsExampleTest|RestExampleTest with JDK11
This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch karaf-4.2.x in repository https://gitbox.apache.org/repos/asf/karaf.git commit 1444120f4ad1058246ca0009bd2ac7141277970f Author: Freeman Fang AuthorDate: Thu May 30 16:09:40 2019 -0400 [KARAF-6298]fix XATest|JmsExampleTest|RestExampleTest with JDK11 (cherry picked from commit 257c7381a75b2fe58e0d7d5d811d0822acc3c734) --- .../karaf-rest-example-features/src/main/feature/feature.xml | 2 ++ itests/test/src/test/java/org/apache/karaf/itests/XATest.java | 7 --- .../test/java/org/apache/karaf/itests/examples/JmsExampleTest.java | 7 --- 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/examples/karaf-rest-example/karaf-rest-example-features/src/main/feature/feature.xml b/examples/karaf-rest-example/karaf-rest-example-features/src/main/feature/feature.xml index 69dc099..bad7a67 100644 --- a/examples/karaf-rest-example/karaf-rest-example-features/src/main/feature/feature.xml +++ b/examples/karaf-rest-example/karaf-rest-example-features/src/main/feature/feature.xml @@ -54,6 +54,8 @@ http-whiteboard aries-jax-rs-whiteboard aries-jax-rs-whiteboard-jackson +mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxws-api-2.2/${servicemix-spec.version} +mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.saaj-api-1.3/${servicemix-spec.version} mvn:org.apache.karaf.examples/karaf-rest-example-whiteboard/${project.version} diff --git a/itests/test/src/test/java/org/apache/karaf/itests/XATest.java b/itests/test/src/test/java/org/apache/karaf/itests/XATest.java index 1c14c55..026a473 100644 --- a/itests/test/src/test/java/org/apache/karaf/itests/XATest.java +++ b/itests/test/src/test/java/org/apache/karaf/itests/XATest.java @@ -22,7 +22,6 @@ import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; import org.ops4j.pax.exam.Configuration; -import org.ops4j.pax.exam.karaf.container.internal.JavaVersionUtil; import org.ops4j.pax.exam.MavenUtils; import org.ops4j.pax.exam.Option; import org.ops4j.pax.exam.junit.PaxExam; @@ -64,12 +63,6 @@ public class XATest extends KarafTestSupport { result.add(replaceConfigurationFile("etc/org.ops4j.connectionfactory-artemis.cfg", getConfigFile("/org/apache/karaf/itests/features/org.ops4j.connectionfactory-artemis.cfg"))); result.add(replaceConfigurationFile("etc/org.ops4j.datasource-derby.cfg", getConfigFile("/org/apache/karaf/itests/features/org.ops4j.datasource-derby.cfg"))); result.add(replaceConfigurationFile("etc/xa-test-camel.xml", getConfigFile("/org/apache/karaf/itests/features/xa-test-camel.xml"))); -if (JavaVersionUtil.getMajorVersion() >= 9) { -//need asm 6.x which support java9plus to run this test - result.add(replaceConfigurationFile("system/org/apache/karaf/features/standard/" -+ version + "/standard-" + version + "-features.xml", -getConfigFile("/etc/feature.xml"))); -} return result.toArray(new Option[result.size()]); } diff --git a/itests/test/src/test/java/org/apache/karaf/itests/examples/JmsExampleTest.java b/itests/test/src/test/java/org/apache/karaf/itests/examples/JmsExampleTest.java index 38214ec..c4ca654 100644 --- a/itests/test/src/test/java/org/apache/karaf/itests/examples/JmsExampleTest.java +++ b/itests/test/src/test/java/org/apache/karaf/itests/examples/JmsExampleTest.java @@ -21,7 +21,6 @@ import org.ops4j.pax.exam.Configuration; import org.ops4j.pax.exam.MavenUtils; import org.ops4j.pax.exam.Option; import org.ops4j.pax.exam.junit.PaxExam; -import org.ops4j.pax.exam.karaf.container.internal.JavaVersionUtil; import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy; import org.ops4j.pax.exam.spi.reactors.PerClass; @@ -53,12 +52,6 @@ public class JmsExampleTest extends KarafTestSupport { result.add(editConfigurationFilePut("etc/org.apache.karaf.features.cfg", "featuresBoot", "instance,package,log,ssh,framework,system,eventadmin,feature,shell,management,service,jaas,deployer,diagnostic,wrap,bundle,config,kar,aries-blueprint,artemis,jms,pax-jms-artemis")); result.add(replaceConfigurationFile("etc/org.ops4j.connectionfactory-artemis.cfg", getConfigFile("/org/apache/karaf/itests/features/org.ops4j.connectionfactory-artemis.cfg"))); -if (JavaVersionUtil.getMajorVersion() >= 9) { -//need asm 6.x which support java9plus to run this test - result.add(replaceConfigurationFile("system/org/apache/karaf/features/standard/" -+ version + "/standard-" + version + "-features.xml", -getConfigFile("/etc/feature.xml"))); -} return result.toArray(new Option[result.size()]); }
[karaf] 02/04: [KARAF-6298]make SortedProperties working with both JDK8 and JDK11
This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch karaf-4.2.x in repository https://gitbox.apache.org/repos/asf/karaf.git commit fb92de7fb4c31fe49430e6da9afa07c73c565249 Author: Freeman Fang AuthorDate: Thu May 30 13:48:18 2019 -0400 [KARAF-6298]make SortedProperties working with both JDK8 and JDK11 (cherry picked from commit 1e49b3e00c25eefc1fef04f82d1cd33944f7d498) --- .../apache/karaf/tools/utils/SortedProperties.java | 22 +- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/tooling/utils/src/main/java/org/apache/karaf/tools/utils/SortedProperties.java b/tooling/utils/src/main/java/org/apache/karaf/tools/utils/SortedProperties.java index d1c171a..6658dc2 100644 --- a/tooling/utils/src/main/java/org/apache/karaf/tools/utils/SortedProperties.java +++ b/tooling/utils/src/main/java/org/apache/karaf/tools/utils/SortedProperties.java @@ -17,7 +17,10 @@ package org.apache.karaf.tools.utils; import java.util.Collections; +import java.util.Comparator; import java.util.Enumeration; +import java.util.Iterator; +import java.util.LinkedHashSet; import java.util.Map; import java.util.Properties; import java.util.Set; @@ -37,11 +40,28 @@ public class SortedProperties extends Properties { @Override public Set> entrySet() { -return Collections.unmodifiableSet(new TreeSet<>(super.entrySet())); +Set> origSet = super.entrySet(); +Set> sortedSet = new LinkedHashSet>(origSet.size()); + +Iterator> iterator = origSet.stream().sorted(new Comparator>() { + +@Override +public int compare(java.util.Map.Entry o1, java.util.Map.Entry o2) { +return o1.getKey().toString().compareTo(o2.getKey().toString()); +} +}).iterator(); + +while (iterator.hasNext()) +sortedSet.add(iterator.next()); + +return sortedSet; } @Override public synchronized Enumeration keys() { return Collections.enumeration(new TreeSet<>(super.keySet())); } + + + }
[karaf] branch karaf-4.2.x updated (175a8f1 -> 15d4983)
This is an automated email from the ASF dual-hosted git repository. ffang pushed a change to branch karaf-4.2.x in repository https://gitbox.apache.org/repos/asf/karaf.git. from 175a8f1 Merge pull request #855 from baptistedaroit/KARAF-6290 new 0305502 [KARAF-6298]remove unused CORBA class new fb92de7 [KARAF-6298]make SortedProperties working with both JDK8 and JDK11 new 1444120 [KARAF-6298]fix XATest|JmsExampleTest|RestExampleTest with JDK11 new 15d4983 [KARAF-6299]JDK11: don't expose javax.activation package from system bundle 0 The 4 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../resources/etc/jre.properties | 1 - .../src/main/feature/feature.xml | 2 ++ .../karaf/features/internal/service/Deployer.java | 1 - .../test/java/org/apache/karaf/itests/XATest.java | 7 --- .../karaf/itests/examples/JmsExampleTest.java | 7 --- .../resources/test-karaf-home/etc/jre.properties | 1 - .../apache/karaf/tools/utils/SortedProperties.java | 22 +- 7 files changed, 23 insertions(+), 18 deletions(-)
[karaf] 01/04: [KARAF-6298]remove unused CORBA class
This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch karaf-4.2.x in repository https://gitbox.apache.org/repos/asf/karaf.git commit 0305502095517485f34388dc1a55c4602202febe Author: Freeman Fang AuthorDate: Thu May 30 12:56:34 2019 -0400 [KARAF-6298]remove unused CORBA class (cherry picked from commit 4cb0ee47f4b576715f28a0ce326a6e3d38cad6d3) --- .../main/java/org/apache/karaf/features/internal/service/Deployer.java | 1 - 1 file changed, 1 deletion(-) diff --git a/features/core/src/main/java/org/apache/karaf/features/internal/service/Deployer.java b/features/core/src/main/java/org/apache/karaf/features/internal/service/Deployer.java index 13353a6..b78277d 100644 --- a/features/core/src/main/java/org/apache/karaf/features/internal/service/Deployer.java +++ b/features/core/src/main/java/org/apache/karaf/features/internal/service/Deployer.java @@ -63,7 +63,6 @@ import org.apache.karaf.features.internal.util.MapUtils; import org.apache.karaf.features.internal.util.MultiException; import org.eclipse.equinox.region.Region; import org.eclipse.equinox.region.RegionDigraph; -import org.omg.CORBA.DynAnyPackage.Invalid; import org.osgi.framework.Bundle; import org.osgi.framework.BundleException; import org.osgi.framework.Constants;
[karaf] 04/04: [KARAF-6299]JDK11: don't expose javax.activation package from system bundle 0
This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch karaf-4.2.x in repository https://gitbox.apache.org/repos/asf/karaf.git commit 15d4983cd2e57f7c6078c07e111c11a7ccc8db0d Author: Freeman Fang AuthorDate: Fri May 31 09:51:07 2019 -0400 [KARAF-6299]JDK11: don't expose javax.activation package from system bundle 0 (cherry picked from commit 7b934f44717829dda5cbf696f6ef14bc55c81474) --- .../base/src/main/filtered-resources/resources/etc/jre.properties| 1 - main/src/test/resources/test-karaf-home/etc/jre.properties | 1 - 2 files changed, 2 deletions(-) diff --git a/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties b/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties index 72ff9a7..27a5c39 100644 --- a/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties +++ b/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties @@ -538,7 +538,6 @@ jre-1.8= \ jre-9= \ javax.accessibility, \ - javax.activation;version="1.2", \ javax.activity, \ javax.annotation;version="1.0", \ javax.annotation.processing;version="1.0", \ diff --git a/main/src/test/resources/test-karaf-home/etc/jre.properties b/main/src/test/resources/test-karaf-home/etc/jre.properties index cb45280..226674b 100644 --- a/main/src/test/resources/test-karaf-home/etc/jre.properties +++ b/main/src/test/resources/test-karaf-home/etc/jre.properties @@ -545,7 +545,6 @@ jre-1.8= \ jre-9= \ javax.accessibility, \ - javax.activation;version="1.1", \ javax.activity, \ javax.annotation;version="1.0", \ javax.annotation.processing;version="1.0", \
[karaf] branch master updated: [KARAF-6299]JDK11: don't expose javax.activation package from system bundle 0
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 7b934f4 [KARAF-6299]JDK11: don't expose javax.activation package from system bundle 0 7b934f4 is described below commit 7b934f44717829dda5cbf696f6ef14bc55c81474 Author: Freeman Fang AuthorDate: Fri May 31 09:51:07 2019 -0400 [KARAF-6299]JDK11: don't expose javax.activation package from system bundle 0 --- .../base/src/main/filtered-resources/resources/etc/jre.properties| 1 - main/src/test/resources/test-karaf-home/etc/jre.properties | 1 - 2 files changed, 2 deletions(-) diff --git a/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties b/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties index 72ff9a7..27a5c39 100644 --- a/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties +++ b/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties @@ -538,7 +538,6 @@ jre-1.8= \ jre-9= \ javax.accessibility, \ - javax.activation;version="1.2", \ javax.activity, \ javax.annotation;version="1.0", \ javax.annotation.processing;version="1.0", \ diff --git a/main/src/test/resources/test-karaf-home/etc/jre.properties b/main/src/test/resources/test-karaf-home/etc/jre.properties index cb45280..226674b 100644 --- a/main/src/test/resources/test-karaf-home/etc/jre.properties +++ b/main/src/test/resources/test-karaf-home/etc/jre.properties @@ -545,7 +545,6 @@ jre-1.8= \ jre-9= \ javax.accessibility, \ - javax.activation;version="1.1", \ javax.activity, \ javax.annotation;version="1.0", \ javax.annotation.processing;version="1.0", \
[karaf] branch master updated: [KARAF-6298]fix XATest|JmsExampleTest|RestExampleTest with JDK11
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 257c738 [KARAF-6298]fix XATest|JmsExampleTest|RestExampleTest with JDK11 257c738 is described below commit 257c7381a75b2fe58e0d7d5d811d0822acc3c734 Author: Freeman Fang AuthorDate: Thu May 30 16:09:40 2019 -0400 [KARAF-6298]fix XATest|JmsExampleTest|RestExampleTest with JDK11 --- .../karaf-rest-example-features/src/main/feature/feature.xml | 2 ++ itests/test/src/test/java/org/apache/karaf/itests/XATest.java | 7 --- .../test/java/org/apache/karaf/itests/examples/JmsExampleTest.java | 7 --- 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/examples/karaf-rest-example/karaf-rest-example-features/src/main/feature/feature.xml b/examples/karaf-rest-example/karaf-rest-example-features/src/main/feature/feature.xml index 69dc099..bad7a67 100644 --- a/examples/karaf-rest-example/karaf-rest-example-features/src/main/feature/feature.xml +++ b/examples/karaf-rest-example/karaf-rest-example-features/src/main/feature/feature.xml @@ -54,6 +54,8 @@ http-whiteboard aries-jax-rs-whiteboard aries-jax-rs-whiteboard-jackson +mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxws-api-2.2/${servicemix-spec.version} +mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.saaj-api-1.3/${servicemix-spec.version} mvn:org.apache.karaf.examples/karaf-rest-example-whiteboard/${project.version} diff --git a/itests/test/src/test/java/org/apache/karaf/itests/XATest.java b/itests/test/src/test/java/org/apache/karaf/itests/XATest.java index 1c14c55..026a473 100644 --- a/itests/test/src/test/java/org/apache/karaf/itests/XATest.java +++ b/itests/test/src/test/java/org/apache/karaf/itests/XATest.java @@ -22,7 +22,6 @@ import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; import org.ops4j.pax.exam.Configuration; -import org.ops4j.pax.exam.karaf.container.internal.JavaVersionUtil; import org.ops4j.pax.exam.MavenUtils; import org.ops4j.pax.exam.Option; import org.ops4j.pax.exam.junit.PaxExam; @@ -64,12 +63,6 @@ public class XATest extends KarafTestSupport { result.add(replaceConfigurationFile("etc/org.ops4j.connectionfactory-artemis.cfg", getConfigFile("/org/apache/karaf/itests/features/org.ops4j.connectionfactory-artemis.cfg"))); result.add(replaceConfigurationFile("etc/org.ops4j.datasource-derby.cfg", getConfigFile("/org/apache/karaf/itests/features/org.ops4j.datasource-derby.cfg"))); result.add(replaceConfigurationFile("etc/xa-test-camel.xml", getConfigFile("/org/apache/karaf/itests/features/xa-test-camel.xml"))); -if (JavaVersionUtil.getMajorVersion() >= 9) { -//need asm 6.x which support java9plus to run this test - result.add(replaceConfigurationFile("system/org/apache/karaf/features/standard/" -+ version + "/standard-" + version + "-features.xml", -getConfigFile("/etc/feature.xml"))); -} return result.toArray(new Option[result.size()]); } diff --git a/itests/test/src/test/java/org/apache/karaf/itests/examples/JmsExampleTest.java b/itests/test/src/test/java/org/apache/karaf/itests/examples/JmsExampleTest.java index 38214ec..c4ca654 100644 --- a/itests/test/src/test/java/org/apache/karaf/itests/examples/JmsExampleTest.java +++ b/itests/test/src/test/java/org/apache/karaf/itests/examples/JmsExampleTest.java @@ -21,7 +21,6 @@ import org.ops4j.pax.exam.Configuration; import org.ops4j.pax.exam.MavenUtils; import org.ops4j.pax.exam.Option; import org.ops4j.pax.exam.junit.PaxExam; -import org.ops4j.pax.exam.karaf.container.internal.JavaVersionUtil; import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy; import org.ops4j.pax.exam.spi.reactors.PerClass; @@ -53,12 +52,6 @@ public class JmsExampleTest extends KarafTestSupport { result.add(editConfigurationFilePut("etc/org.apache.karaf.features.cfg", "featuresBoot", "instance,package,log,ssh,framework,system,eventadmin,feature,shell,management,service,jaas,deployer,diagnostic,wrap,bundle,config,kar,aries-blueprint,artemis,jms,pax-jms-artemis")); result.add(replaceConfigurationFile("etc/org.ops4j.connectionfactory-artemis.cfg", getConfigFile("/org/apache/karaf/itests/features/org.ops4j.connectionfactory-artemis.cfg"))); -if (JavaVersionUtil.getMajorVersion() >= 9) { -//need asm 6.x which support java9plus to run this test - result.add(replaceConfigurationFile("system/org/apache/karaf/features/standard/" -
[karaf] branch master updated: [KARAF-6298]make SortedProperties working with both JDK8 and JDK11
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 1e49b3e [KARAF-6298]make SortedProperties working with both JDK8 and JDK11 1e49b3e is described below commit 1e49b3e00c25eefc1fef04f82d1cd33944f7d498 Author: Freeman Fang AuthorDate: Thu May 30 13:48:18 2019 -0400 [KARAF-6298]make SortedProperties working with both JDK8 and JDK11 --- .../apache/karaf/tools/utils/SortedProperties.java | 22 +- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/tooling/utils/src/main/java/org/apache/karaf/tools/utils/SortedProperties.java b/tooling/utils/src/main/java/org/apache/karaf/tools/utils/SortedProperties.java index d1c171a..6658dc2 100644 --- a/tooling/utils/src/main/java/org/apache/karaf/tools/utils/SortedProperties.java +++ b/tooling/utils/src/main/java/org/apache/karaf/tools/utils/SortedProperties.java @@ -17,7 +17,10 @@ package org.apache.karaf.tools.utils; import java.util.Collections; +import java.util.Comparator; import java.util.Enumeration; +import java.util.Iterator; +import java.util.LinkedHashSet; import java.util.Map; import java.util.Properties; import java.util.Set; @@ -37,11 +40,28 @@ public class SortedProperties extends Properties { @Override public Set> entrySet() { -return Collections.unmodifiableSet(new TreeSet<>(super.entrySet())); +Set> origSet = super.entrySet(); +Set> sortedSet = new LinkedHashSet>(origSet.size()); + +Iterator> iterator = origSet.stream().sorted(new Comparator>() { + +@Override +public int compare(java.util.Map.Entry o1, java.util.Map.Entry o2) { +return o1.getKey().toString().compareTo(o2.getKey().toString()); +} +}).iterator(); + +while (iterator.hasNext()) +sortedSet.add(iterator.next()); + +return sortedSet; } @Override public synchronized Enumeration keys() { return Collections.enumeration(new TreeSet<>(super.keySet())); } + + + }
[karaf] branch master updated: [KARAF-6298]remove unused CORBA class
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 4cb0ee4 [KARAF-6298]remove unused CORBA class 4cb0ee4 is described below commit 4cb0ee47f4b576715f28a0ce326a6e3d38cad6d3 Author: Freeman Fang AuthorDate: Thu May 30 12:56:34 2019 -0400 [KARAF-6298]remove unused CORBA class --- .../main/java/org/apache/karaf/features/internal/service/Deployer.java | 1 - 1 file changed, 1 deletion(-) diff --git a/features/core/src/main/java/org/apache/karaf/features/internal/service/Deployer.java b/features/core/src/main/java/org/apache/karaf/features/internal/service/Deployer.java index 51b1d45..61a0ef9 100644 --- a/features/core/src/main/java/org/apache/karaf/features/internal/service/Deployer.java +++ b/features/core/src/main/java/org/apache/karaf/features/internal/service/Deployer.java @@ -63,7 +63,6 @@ import org.apache.karaf.features.internal.util.MapUtils; import org.apache.karaf.features.internal.util.MultiException; import org.eclipse.equinox.region.Region; import org.eclipse.equinox.region.RegionDigraph; -import org.omg.CORBA.DynAnyPackage.Invalid; import org.osgi.framework.Bundle; import org.osgi.framework.BundleException; import org.osgi.framework.Constants;
[karaf] branch karaf-4.2.x updated: [KARAF-6241]introduce new property EnabledProtocals for org.apache.karaf.management.cfg
This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch karaf-4.2.x in repository https://gitbox.apache.org/repos/asf/karaf.git The following commit(s) were added to refs/heads/karaf-4.2.x by this push: new 8292dd2 [KARAF-6241]introduce new property EnabledProtocals for org.apache.karaf.management.cfg 8292dd2 is described below commit 8292dd278fbc8ab064ff5c3e07fbcc13de3c064b Author: Freeman Fang AuthorDate: Tue Apr 16 12:38:15 2019 +0800 [KARAF-6241]introduce new property EnabledProtocals for org.apache.karaf.management.cfg (cherry picked from commit de0e531d7d3676756e83c80e2870d270d6bae880) --- .../karaf/management/ConnectorServerFactory.java| 21 +++-- .../apache/karaf/management/internal/Activator.java | 2 ++ 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/management/server/src/main/java/org/apache/karaf/management/ConnectorServerFactory.java b/management/server/src/main/java/org/apache/karaf/management/ConnectorServerFactory.java index e26f3e2..73fcb6b 100644 --- a/management/server/src/main/java/org/apache/karaf/management/ConnectorServerFactory.java +++ b/management/server/src/main/java/org/apache/karaf/management/ConnectorServerFactory.java @@ -69,6 +69,7 @@ public class ConnectorServerFactory { private KeystoreManager keystoreManager; private String algorithm; private String secureProtocol; +private String[] enabledProtocols; private String keyStore; private String trustStore; private String keyAlias; @@ -313,7 +314,7 @@ public class ConnectorServerFactory { private void setupSsl() throws GeneralSecurityException { SSLServerSocketFactory sssf = keystoreManager.createSSLServerFactory(null, secureProtocol, algorithm, keyStore, keyAlias, trustStore,keyStoreAvailabilityTimeout); -RMIServerSocketFactory rssf = new KarafSslRMIServerSocketFactory(sssf, isClientAuth(), getRmiServerHost()); +RMIServerSocketFactory rssf = new KarafSslRMIServerSocketFactory(sssf, isClientAuth(), getRmiServerHost(), getEnabledProtocols()); RMIClientSocketFactory rcsf = new SslRMIClientSocketFactory(); environment.put(RMIConnectorServer.RMI_SERVER_SOCKET_FACTORY_ATTRIBUTE, rssf); environment.put(RMIConnectorServer.RMI_CLIENT_SOCKET_FACTORY_ATTRIBUTE, rcsf); @@ -330,11 +331,13 @@ public class ConnectorServerFactory { private SSLServerSocketFactory sssf; private boolean clientAuth; private String rmiServerHost; +private String[] enabledProtocols; -public KarafSslRMIServerSocketFactory(SSLServerSocketFactory sssf, boolean clientAuth, String rmiServerHost) { +public KarafSslRMIServerSocketFactory(SSLServerSocketFactory sssf, boolean clientAuth, String rmiServerHost, String[] enabledProtocols) { this.sssf = sssf; this.clientAuth = clientAuth; this.rmiServerHost = rmiServerHost; +this.enabledProtocols = enabledProtocols; } public ServerSocket createServerSocket(int port) throws IOException { @@ -342,10 +345,16 @@ public class ConnectorServerFactory { if (host.isLoopbackAddress()) { final SSLServerSocket ss = (SSLServerSocket) sssf.createServerSocket(port, 50); ss.setNeedClientAuth(clientAuth); +if (this.enabledProtocols != null && this.enabledProtocols.length > 0) { +ss.setEnabledProtocols(this.enabledProtocols); +} return new LocalOnlySSLServerSocket(ss); } else { final SSLServerSocket ss = (SSLServerSocket) sssf.createServerSocket(port, 50, InetAddress.getByName(rmiServerHost)); ss.setNeedClientAuth(clientAuth); +if (this.enabledProtocols != null && this.enabledProtocols.length > 0) { +ss.setEnabledProtocols(this.enabledProtocols); +} return ss; } } @@ -662,4 +671,12 @@ public class ConnectorServerFactory { throw new IOException("Only connections from clients running on the host where the RMI remote objects have been exported are accepted."); } +public String[] getEnabledProtocols() { +return enabledProtocols; +} + +public void setEnabledProtocols(String[] enabledProtocols) { +this.enabledProtocols = enabledProtocols; +} + } diff --git a/management/server/src/main/java/org/apache/karaf/management/internal/Activator.java b/management/server/src/main/java/org/apache/karaf/management/internal/Activator.java index 4233d51..187d8a6 100644 --- a/management/server/src/main/java/org/apache/karaf/management/internal/Activator.java +++ b/management/server/src/main/java/org/apache/karaf/management/internal/Activator.java @@ -107,6 +107,7 @@ public class Activator
[karaf] branch master updated: [KARAF-6241]introduce new property EnabledProtocals for org.apache.karaf.management.cfg
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 de0e531 [KARAF-6241]introduce new property EnabledProtocals for org.apache.karaf.management.cfg de0e531 is described below commit de0e531d7d3676756e83c80e2870d270d6bae880 Author: Freeman Fang AuthorDate: Tue Apr 16 12:38:15 2019 +0800 [KARAF-6241]introduce new property EnabledProtocals for org.apache.karaf.management.cfg --- .../karaf/management/ConnectorServerFactory.java| 21 +++-- .../apache/karaf/management/internal/Activator.java | 2 ++ 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/management/server/src/main/java/org/apache/karaf/management/ConnectorServerFactory.java b/management/server/src/main/java/org/apache/karaf/management/ConnectorServerFactory.java index e26f3e2..73fcb6b 100644 --- a/management/server/src/main/java/org/apache/karaf/management/ConnectorServerFactory.java +++ b/management/server/src/main/java/org/apache/karaf/management/ConnectorServerFactory.java @@ -69,6 +69,7 @@ public class ConnectorServerFactory { private KeystoreManager keystoreManager; private String algorithm; private String secureProtocol; +private String[] enabledProtocols; private String keyStore; private String trustStore; private String keyAlias; @@ -313,7 +314,7 @@ public class ConnectorServerFactory { private void setupSsl() throws GeneralSecurityException { SSLServerSocketFactory sssf = keystoreManager.createSSLServerFactory(null, secureProtocol, algorithm, keyStore, keyAlias, trustStore,keyStoreAvailabilityTimeout); -RMIServerSocketFactory rssf = new KarafSslRMIServerSocketFactory(sssf, isClientAuth(), getRmiServerHost()); +RMIServerSocketFactory rssf = new KarafSslRMIServerSocketFactory(sssf, isClientAuth(), getRmiServerHost(), getEnabledProtocols()); RMIClientSocketFactory rcsf = new SslRMIClientSocketFactory(); environment.put(RMIConnectorServer.RMI_SERVER_SOCKET_FACTORY_ATTRIBUTE, rssf); environment.put(RMIConnectorServer.RMI_CLIENT_SOCKET_FACTORY_ATTRIBUTE, rcsf); @@ -330,11 +331,13 @@ public class ConnectorServerFactory { private SSLServerSocketFactory sssf; private boolean clientAuth; private String rmiServerHost; +private String[] enabledProtocols; -public KarafSslRMIServerSocketFactory(SSLServerSocketFactory sssf, boolean clientAuth, String rmiServerHost) { +public KarafSslRMIServerSocketFactory(SSLServerSocketFactory sssf, boolean clientAuth, String rmiServerHost, String[] enabledProtocols) { this.sssf = sssf; this.clientAuth = clientAuth; this.rmiServerHost = rmiServerHost; +this.enabledProtocols = enabledProtocols; } public ServerSocket createServerSocket(int port) throws IOException { @@ -342,10 +345,16 @@ public class ConnectorServerFactory { if (host.isLoopbackAddress()) { final SSLServerSocket ss = (SSLServerSocket) sssf.createServerSocket(port, 50); ss.setNeedClientAuth(clientAuth); +if (this.enabledProtocols != null && this.enabledProtocols.length > 0) { +ss.setEnabledProtocols(this.enabledProtocols); +} return new LocalOnlySSLServerSocket(ss); } else { final SSLServerSocket ss = (SSLServerSocket) sssf.createServerSocket(port, 50, InetAddress.getByName(rmiServerHost)); ss.setNeedClientAuth(clientAuth); +if (this.enabledProtocols != null && this.enabledProtocols.length > 0) { +ss.setEnabledProtocols(this.enabledProtocols); +} return ss; } } @@ -662,4 +671,12 @@ public class ConnectorServerFactory { throw new IOException("Only connections from clients running on the host where the RMI remote objects have been exported are accepted."); } +public String[] getEnabledProtocols() { +return enabledProtocols; +} + +public void setEnabledProtocols(String[] enabledProtocols) { +this.enabledProtocols = enabledProtocols; +} + } diff --git a/management/server/src/main/java/org/apache/karaf/management/internal/Activator.java b/management/server/src/main/java/org/apache/karaf/management/internal/Activator.java index 4233d51..187d8a6 100644 --- a/management/server/src/main/java/org/apache/karaf/management/internal/Activator.java +++ b/management/server/src/main/java/org/apache/karaf/management/internal/Activator.java @@ -107,6 +107,7 @@ public class Activator extends BaseActivator implements ManagedService { final boolean secur
[karaf] branch jdk13 updated: [KARAF-6221]ensure karaf can build and run with JDK13 EA-upgrade to CXF version can handle 13-ea
This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch jdk13 in repository https://gitbox.apache.org/repos/asf/karaf.git The following commit(s) were added to refs/heads/jdk13 by this push: new a423bd3 [KARAF-6221]ensure karaf can build and run with JDK13 EA-upgrade to CXF version can handle 13-ea a423bd3 is described below commit a423bd3989789d8a2e72383b7c810117b0483a9b Author: Freeman Fang AuthorDate: Thu Apr 4 16:32:38 2019 +0800 [KARAF-6221]ensure karaf can build and run with JDK13 EA-upgrade to CXF version can handle 13-ea --- examples/karaf-profile-example/karaf-profile-example-registry/pom.xml | 2 +- examples/karaf-rest-example/pom.xml | 2 +- examples/karaf-soap-example/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/karaf-profile-example/karaf-profile-example-registry/pom.xml b/examples/karaf-profile-example/karaf-profile-example-registry/pom.xml index f2bdffe..08b4030 100644 --- a/examples/karaf-profile-example/karaf-profile-example-registry/pom.xml +++ b/examples/karaf-profile-example/karaf-profile-example-registry/pom.xml @@ -34,7 +34,7 @@ 5.14.3 2.18.1 -3.2.6 +3.3.1 diff --git a/examples/karaf-rest-example/pom.xml b/examples/karaf-rest-example/pom.xml index 3c9c7d5..62c9e2a 100644 --- a/examples/karaf-rest-example/pom.xml +++ b/examples/karaf-rest-example/pom.xml @@ -41,7 +41,7 @@ -3.2.6 +3.3.1 2.9.4 diff --git a/examples/karaf-soap-example/pom.xml b/examples/karaf-soap-example/pom.xml index 075b991..05b2b07 100644 --- a/examples/karaf-soap-example/pom.xml +++ b/examples/karaf-soap-example/pom.xml @@ -40,7 +40,7 @@ -3.2.6 +3.3.1
[karaf] branch jdk13 created (now a33ad72)
This is an automated email from the ASF dual-hosted git repository. ffang pushed a change to branch jdk13 in repository https://gitbox.apache.org/repos/asf/karaf.git. at a33ad72 [KARAF-6221]ensure karaf can build and run with JDK13 EA-initial commit This branch includes the following new commits: new a33ad72 [KARAF-6221]ensure karaf can build and run with JDK13 EA-initial commit The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
[karaf] 01/01: [KARAF-6221]ensure karaf can build and run with JDK13 EA-initial commit
This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch jdk13 in repository https://gitbox.apache.org/repos/asf/karaf.git commit a33ad72844dbdcf111edcb1e651a2c8042c5402f Author: Freeman Fang AuthorDate: Mon Apr 1 15:25:21 2019 +0800 [KARAF-6221]ensure karaf can build and run with JDK13 EA-initial commit --- .../src/main/filtered-resources/resources/etc/config.properties | 6 ++ .../base/src/main/filtered-resources/resources/etc/jre.properties | 1 + .../org/apache/karaf/instance/resources/etc/config.properties | 6 ++ itests/test/src/test/filtered-resources/etc/config.properties | 6 ++ .../test/java/org/apache/karaf/itests/examples/RestExampleTest.java | 4 +++- main/src/test/resources/test-karaf-home/etc/config.properties | 6 ++ main/src/test/resources/test-karaf-home/etc/jre.properties | 1 + pom.xml | 6 +++--- 8 files changed, 32 insertions(+), 4 deletions(-) diff --git a/assemblies/features/base/src/main/filtered-resources/resources/etc/config.properties b/assemblies/features/base/src/main/filtered-resources/resources/etc/config.properties index 03a7c9a..7ae0f7d 100644 --- a/assemblies/features/base/src/main/filtered-resources/resources/etc/config.properties +++ b/assemblies/features/base/src/main/filtered-resources/resources/etc/config.properties @@ -123,6 +123,12 @@ equinox-capabilities= \ osgi.service;objectClass:List=org.eclipse.osgi.service.security.TrustEngine;osgi.signedcontent.trust.engine=org.eclipse.osgi, \ osgi.service;objectClass:List=org.eclipse.osgi.service.urlconversion.URLConverter;protocol:List="bundleentry,bundleresource" +eecap-13= osgi.ee; osgi.ee="OSGi/Minimum"; version:List="1.0,1.1,1.2", \ + osgi.ee; osgi.ee="JavaSE"; version:List="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,9.0,10.0,11.0,12.0,13.0", \ + osgi.ee; osgi.ee="JRE"; version:List="1.0,1.1", \ + osgi.ee; osgi.ee="JavaSE/compact1"; version:List="1.8,9.0,10.0,11.0,12.0,13.0", \ + osgi.ee; osgi.ee="JavaSE/compact2"; version:List="1.8,9.0,10.0,11.0,12.0,13.0", \ + osgi.ee; osgi.ee="JavaSE/compact3"; version:List="1.8,9.0,10.0,11.0,12.0,13.0" eecap-12= osgi.ee; osgi.ee="OSGi/Minimum"; version:List="1.0,1.1,1.2", \ osgi.ee; osgi.ee="JavaSE"; version:List="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,9.0,10.0,11.0,12.0", \ osgi.ee; osgi.ee="JRE"; version:List="1.0,1.1", \ diff --git a/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties b/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties index 16b38be..c479a7d 100644 --- a/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties +++ b/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties @@ -725,3 +725,4 @@ jre-9= \ jre-10 = ${jre-9} jre-11 = ${jre-10} jre-12 = ${jre-11} +jre-13 = ${jre-12} diff --git a/instance/src/main/resources/org/apache/karaf/instance/resources/etc/config.properties b/instance/src/main/resources/org/apache/karaf/instance/resources/etc/config.properties index ff926f6..05c597d 100644 --- a/instance/src/main/resources/org/apache/karaf/instance/resources/etc/config.properties +++ b/instance/src/main/resources/org/apache/karaf/instance/resources/etc/config.properties @@ -127,6 +127,12 @@ equinox-capabilities= \ osgi.service;objectClass:List=org.eclipse.osgi.service.security.TrustEngine;osgi.signedcontent.trust.engine=org.eclipse.osgi, \ osgi.service;objectClass:List=org.eclipse.osgi.service.urlconversion.URLConverter;protocol:List="bundleentry,bundleresource" +eecap-13= osgi.ee; osgi.ee="OSGi/Minimum"; version:List="1.0,1.1,1.2", \ + osgi.ee; osgi.ee="JavaSE"; version:List="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,9.0,10.0,11.0,12.0,13.0", \ + osgi.ee; osgi.ee="JRE"; version:List="1.0,1.1", \ + osgi.ee; osgi.ee="JavaSE/compact1"; version:List="1.8,9.0,10.0,11.0,12.0,13.0", \ + osgi.ee; osgi.ee="JavaSE/compact2"; version:List="1.8,9.0,10.0,11.0,12.0,13.0", \ + osgi.ee; osgi.ee="JavaSE/compact3"; version:List="1.8,9.0,10.0,11.0,12.0,13.0" eecap-12= osgi.ee; osgi.ee="OSGi/Minimum"; version:List="1.0,1.1,1.2", \ osgi.ee; osgi.ee="JavaSE"; version:List="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,9.0,10.0,11.0,12.0", \ osgi.ee; osgi.ee="JRE"; version:List="1.0,1.1", \ diff --git a/itests/test/src/test/filtered-resources/etc/config.properties b/itests/test/src/test/filtered-resources/etc/config.properties index f2d7c95..acc5f73 100644 --- a/itests/test/src/test/filtere
[karaf] branch jdk12 updated: [KARAF-6203]ensure karaf can build and run with JDK12-fix RestExampleTest
This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch jdk12 in repository https://gitbox.apache.org/repos/asf/karaf.git The following commit(s) were added to refs/heads/jdk12 by this push: new eab60e8 [KARAF-6203]ensure karaf can build and run with JDK12-fix RestExampleTest eab60e8 is described below commit eab60e8163c4ca01d54d64dea96ee4e053bdcc67 Author: Freeman Fang AuthorDate: Wed Mar 27 14:05:22 2019 +0800 [KARAF-6203]ensure karaf can build and run with JDK12-fix RestExampleTest --- .../karaf-rest-example-features/src/main/feature/feature.xml| 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/karaf-rest-example/karaf-rest-example-features/src/main/feature/feature.xml b/examples/karaf-rest-example/karaf-rest-example-features/src/main/feature/feature.xml index 69dc099..bad7a67 100644 --- a/examples/karaf-rest-example/karaf-rest-example-features/src/main/feature/feature.xml +++ b/examples/karaf-rest-example/karaf-rest-example-features/src/main/feature/feature.xml @@ -54,6 +54,8 @@ http-whiteboard aries-jax-rs-whiteboard aries-jax-rs-whiteboard-jackson +mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxws-api-2.2/${servicemix-spec.version} +mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.saaj-api-1.3/${servicemix-spec.version} mvn:org.apache.karaf.examples/karaf-rest-example-whiteboard/${project.version}
[karaf] branch jdk12 updated: [KARAF-6203]ensure karaf can build and run with JDK12-fix JpaExampleTest
This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch jdk12 in repository https://gitbox.apache.org/repos/asf/karaf.git The following commit(s) were added to refs/heads/jdk12 by this push: new f35b382 [KARAF-6203]ensure karaf can build and run with JDK12-fix JpaExampleTest f35b382 is described below commit f35b3826ee29d479d614174ceee3e67468048d3e Author: Freeman Fang AuthorDate: Wed Mar 27 13:53:58 2019 +0800 [KARAF-6203]ensure karaf can build and run with JDK12-fix JpaExampleTest --- .../main/java/org/apache/karaf/itests/KarafTestSupport.java | 1 + .../src/test/resources/etc/org.apache.karaf.features.xml | 12 2 files changed, 13 insertions(+) diff --git a/itests/common/src/main/java/org/apache/karaf/itests/KarafTestSupport.java b/itests/common/src/main/java/org/apache/karaf/itests/KarafTestSupport.java index 83f316d..b92cd55 100644 --- a/itests/common/src/main/java/org/apache/karaf/itests/KarafTestSupport.java +++ b/itests/common/src/main/java/org/apache/karaf/itests/KarafTestSupport.java @@ -197,6 +197,7 @@ public class KarafTestSupport { CoreOptions.mavenBundle().groupId("javax.annotation").artifactId("javax.annotation-api").versionAsInProject(), KarafDistributionOption.replaceConfigurationFile("etc/org.ops4j.pax.logging.cfg", getConfigFile("/etc/org.ops4j.pax.logging.cfg")), //replaceConfigurationFile("etc/host.key", getConfigFile("/etc/host.key")), + KarafDistributionOption.replaceConfigurationFile("etc/org.apache.karaf.features.xml", getConfigFile("/etc/org.apache.karaf.features.xml")), KarafDistributionOption.editConfigurationFilePut("etc/org.apache.karaf.features.cfg", "updateSnapshots", "none"), KarafDistributionOption.editConfigurationFilePut("etc/org.ops4j.pax.web.cfg", "org.osgi.service.http.port", httpPort), KarafDistributionOption.editConfigurationFilePut("etc/org.apache.karaf.management.cfg", "rmiRegistryPort", rmiRegistryPort), diff --git a/itests/test/src/test/resources/etc/org.apache.karaf.features.xml b/itests/test/src/test/resources/etc/org.apache.karaf.features.xml new file mode 100644 index 000..0fcbf11 --- /dev/null +++ b/itests/test/src/test/resources/etc/org.apache.karaf.features.xml @@ -0,0 +1,12 @@ + + +http://karaf.apache.org/xmlns/features-processing/v1.0.0"; xmlns:f="http://karaf.apache.org/xmlns/features/v1.5.0";> + + + + + + +
[karaf] branch jdk12 updated: [KARAF-6203]ensure karaf can build and run with JDK12-fix MavenResolverRegisteredBeforeConfigAdminTest
This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch jdk12 in repository https://gitbox.apache.org/repos/asf/karaf.git The following commit(s) were added to refs/heads/jdk12 by this push: new 63f046f [KARAF-6203]ensure karaf can build and run with JDK12-fix MavenResolverRegisteredBeforeConfigAdminTest 63f046f is described below commit 63f046fb703bfcabae7d246e29a6822a1be37656 Author: Freeman Fang AuthorDate: Wed Mar 27 11:33:34 2019 +0800 [KARAF-6203]ensure karaf can build and run with JDK12-fix MavenResolverRegisteredBeforeConfigAdminTest --- itests/test/src/test/filtered-resources/etc/config.properties | 6 ++ 1 file changed, 6 insertions(+) diff --git a/itests/test/src/test/filtered-resources/etc/config.properties b/itests/test/src/test/filtered-resources/etc/config.properties index a563ca5..f2d7c95 100644 --- a/itests/test/src/test/filtered-resources/etc/config.properties +++ b/itests/test/src/test/filtered-resources/etc/config.properties @@ -99,6 +99,12 @@ org.osgi.framework.system.capabilities= \ osgi.service;effective:=active;objectClass=org.osgi.service.resolver.Resolver, \ osgi.service;effective:=active;objectClass=org.osgi.service.startlevel.StartLevel, \ osgi.service;effective:=active;objectClass=org.osgi.service.url.URLHandlers +eecap-12= osgi.ee; osgi.ee="OSGi/Minimum"; version:List="1.0,1.1,1.2", \ + osgi.ee; osgi.ee="JavaSE"; version:List="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,9.0,10.0,11.0,12.0", \ + osgi.ee; osgi.ee="JRE"; version:List="1.0,1.1", \ + osgi.ee; osgi.ee="JavaSE/compact1"; version:List="1.8,9.0,10.0,11.0,12.0", \ + osgi.ee; osgi.ee="JavaSE/compact2"; version:List="1.8,9.0,10.0,11.0,12.0", \ + osgi.ee; osgi.ee="JavaSE/compact3"; version:List="1.8,9.0,10.0,11.0,12.0" eecap-11= osgi.ee; osgi.ee="OSGi/Minimum"; version:List="1.0,1.1,1.2", \ osgi.ee; osgi.ee="JavaSE"; version:List="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,9.0,10.0,11.0", \ osgi.ee; osgi.ee="JRE"; version:List="1.0,1.1", \
[karaf] branch jdk12 updated: [KARAF-6203]ensure karaf can build and run with JDK12-fix InstanceTest
This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch jdk12 in repository https://gitbox.apache.org/repos/asf/karaf.git The following commit(s) were added to refs/heads/jdk12 by this push: new 5842db7 [KARAF-6203]ensure karaf can build and run with JDK12-fix InstanceTest 5842db7 is described below commit 5842db73d6e40129cce16c25abcb244564edb2ce Author: Freeman Fang AuthorDate: Wed Mar 27 11:23:44 2019 +0800 [KARAF-6203]ensure karaf can build and run with JDK12-fix InstanceTest --- .../instance/core/internal/InstanceServiceImpl.java | 19 ++- .../karaf/instance/resources/etc/config.properties| 6 ++ 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/instance/src/main/java/org/apache/karaf/instance/core/internal/InstanceServiceImpl.java b/instance/src/main/java/org/apache/karaf/instance/core/internal/InstanceServiceImpl.java index 3ac2df3..8b23768 100644 --- a/instance/src/main/java/org/apache/karaf/instance/core/internal/InstanceServiceImpl.java +++ b/instance/src/main/java/org/apache/karaf/instance/core/internal/InstanceServiceImpl.java @@ -513,7 +513,16 @@ public class InstanceServiceImpl implements InstanceService { String jdkOpts; if (!System.getProperty("java.version").startsWith("1.")) { -jdkOpts = " --add-opens java.base/java.security=ALL-UNNAMED" + +File jdk9LibDir = new File(libDir, "jdk9plus"); +File endorsedLibDir = new File(libDir, "endorsed"); +StringBuilder jdk9plusClasspath = classpathFromLibDir(jdk9LibDir); +classpath.append(System.getProperty("path.separator")); +classpath.append(jdk9plusClasspath); +jdkOpts = " --add-reads=java.xml=java.logging" + + " --add-exports=java.base/org.apache.karaf.specs.locator=java.xml,ALL-UNNAMED" + + " --patch-module java.base=" + endorsedLibDir.getAbsolutePath() + "/org.apache.karaf.specs.locator-4.3.0-SNAPSHOT.jar" + + " --patch-module java.xml=" + endorsedLibDir.getAbsolutePath() + "/org.apache.karaf.specs.java.xml-4.3.0-SNAPSHOT.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" + " --add-opens java.base/java.util=ALL-UNNAMED" + @@ -522,10 +531,10 @@ public class InstanceServiceImpl implements InstanceService { " --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"; + " --add-exports=java.base/sun.net.www.protocol.file=ALL-UNNAMED" + + " --add-exports=java.base/sun.net.www.protocol.ftp=ALL-UNNAMED" + + " --add-exports=jdk.xml.dom/org.w3c.dom.html=ALL-UNNAMED"; + } else { jdkOpts = " -Djava.endorsed.dirs=\"" + new File(new File(new File(System.getProperty("java.home"), "jre"), "lib"), "endorsed") + System.getProperty("path.separator") + new File(new File(System.getProperty("java.home"), "lib"), "endorsed") + System.getProperty("path.separator") + new File(libDir, "endorsed").getCanonicalPath() + "\"" + " -Djava.ext.dirs=\"" + new File(new File(new File(System.getProperty("java.home"), "jre"), "lib"), "ext") + System.getProperty("path.separator") + new File(new File(System.getProperty("java.home"), "lib"), "ext") + System.getProperty("path.separator") + new File(libDir, "ext").getCanonicalPath() + "\""; diff --git a/instance/src/main/resources/org/apache/karaf/instance/resources/etc/config.properties b/instance/src/main/resources/org/apache/karaf/instance/resources/etc/config.properties index 0495f45..ff926f6 100644 --- a/instanc
[karaf] branch jdk12 updated: [KARAF-6203]ensure karaf can build and run with JDK12-fix Krb5LoginModuleTest
This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch jdk12 in repository https://gitbox.apache.org/repos/asf/karaf.git The following commit(s) were added to refs/heads/jdk12 by this push: new 6355199 [KARAF-6203]ensure karaf can build and run with JDK12-fix Krb5LoginModuleTest 6355199 is described below commit 6355199ee2d7992339552cdf36d5def5b695d61b Author: Freeman Fang AuthorDate: Tue Mar 26 13:33:21 2019 +0800 [KARAF-6203]ensure karaf can build and run with JDK12-fix Krb5LoginModuleTest --- .../apache/karaf/jaas/modules/krb5/Krb5LoginModuleTest.java| 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/jaas/modules/src/test/java/org/apache/karaf/jaas/modules/krb5/Krb5LoginModuleTest.java b/jaas/modules/src/test/java/org/apache/karaf/jaas/modules/krb5/Krb5LoginModuleTest.java index 59293e8..b60df15 100644 --- a/jaas/modules/src/test/java/org/apache/karaf/jaas/modules/krb5/Krb5LoginModuleTest.java +++ b/jaas/modules/src/test/java/org/apache/karaf/jaas/modules/krb5/Krb5LoginModuleTest.java @@ -52,7 +52,6 @@ import org.apache.karaf.jaas.modules.NamePasswordCallbackHandler; import org.junit.After; import org.junit.Assert; import org.junit.Before; -import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; @@ -134,10 +133,11 @@ public class Krb5LoginModuleTest extends KarafKerberosITest { super.setUp(); // Set up a partition for EXAMPLE.COM and add user and service principals to test authentication with. +setupEnv(TcpTransport.class, + EncryptionType.AES128_CTS_HMAC_SHA1_96, ChecksumType.HMAC_SHA1_96_AES128); KerberosTestUtils.fixServicePrincipalName( "ldap/" + KerberosTestUtils.getHostName() + "@EXAMPLE.COM", null, getLdapServer()); -setupEnv(TcpTransport.class, -EncryptionType.AES128_CTS_HMAC_SHA1_96, ChecksumType.HMAC_SHA1_96_AES128); + kdcServer.getConfig().setPaEncTimestampRequired(false); // Use our custom configuration to avoid reliance on external config @@ -149,7 +149,7 @@ public class Krb5LoginModuleTest extends KarafKerberosITest { super.tearDown(); } -@Ignore +@Test public void testKeytabSuccess() throws Exception { Map props = new HashMap<>(); props.put("debug", "true"); @@ -202,7 +202,7 @@ public class Krb5LoginModuleTest extends KarafKerberosITest { } -@Ignore +@Test public void testLoginSuccess() throws Exception { Subject subject = new Subject(); Krb5LoginModule module = new Krb5LoginModule();
[karaf] branch jdk12 updated: [KARAF-6203]ensure karaf can build and run with JDK12-remove WARNING: Illegal reflective access-2nd try
This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch jdk12 in repository https://gitbox.apache.org/repos/asf/karaf.git The following commit(s) were added to refs/heads/jdk12 by this push: new c0e421c [KARAF-6203]ensure karaf can build and run with JDK12-remove WARNING: Illegal reflective access-2nd try c0e421c is described below commit c0e421c35dadce2ee729c31e6fff63454506fcfa Author: Freeman Fang AuthorDate: Thu Mar 21 12:46:28 2019 +0800 [KARAF-6203]ensure karaf can build and run with JDK12-remove WARNING: Illegal reflective access-2nd try --- .../src/test/java/org/apache/karaf/examples/itests/ExampleITest.java| 2 ++ .../common/src/main/java/org/apache/karaf/itests/KarafTestSupport.java | 2 ++ .../karaf/itests/mavenresolver/KarafMinimalMonitoredTestSupport.java| 2 ++ 3 files changed, 6 insertions(+) diff --git a/examples/karaf-itest-example/src/test/java/org/apache/karaf/examples/itests/ExampleITest.java b/examples/karaf-itest-example/src/test/java/org/apache/karaf/examples/itests/ExampleITest.java index 2daf378..f59acd8 100644 --- a/examples/karaf-itest-example/src/test/java/org/apache/karaf/examples/itests/ExampleITest.java +++ b/examples/karaf-itest-example/src/test/java/org/apache/karaf/examples/itests/ExampleITest.java @@ -94,6 +94,8 @@ public class ExampleITest extends KarafTestSupport { new VMOption("--add-exports=java.base/sun.net.www.protocol.http=ALL-UNNAMED"), new VMOption("--add-exports=java.base/sun.net.www.protocol.https=ALL-UNNAMED"), new VMOption("--add-exports=java.base/sun.net.www.protocol.jar=ALL-UNNAMED"), +new VMOption("--add-exports=java.base/sun.net.www.protocol.file=ALL-UNNAMED"), +new VMOption("--add-exports=java.base/sun.net.www.protocol.ftp=ALL-UNNAMED"), new VMOption("--add-exports=jdk.naming.rmi/com.sun.jndi.url.rmi=ALL-UNNAMED"), new VMOption("-classpath"), new VMOption("lib/jdk9plus/*" + File.pathSeparator + "lib/boot/*") diff --git a/itests/common/src/main/java/org/apache/karaf/itests/KarafTestSupport.java b/itests/common/src/main/java/org/apache/karaf/itests/KarafTestSupport.java index b432e84..83f316d 100644 --- a/itests/common/src/main/java/org/apache/karaf/itests/KarafTestSupport.java +++ b/itests/common/src/main/java/org/apache/karaf/itests/KarafTestSupport.java @@ -239,6 +239,8 @@ public class KarafTestSupport { new VMOption("--add-exports=java.base/sun.net.www.protocol.http=ALL-UNNAMED"), new VMOption("--add-exports=java.base/sun.net.www.protocol.https=ALL-UNNAMED"), new VMOption("--add-exports=java.base/sun.net.www.protocol.jar=ALL-UNNAMED"), +new VMOption("--add-exports=java.base/sun.net.www.protocol.file=ALL-UNNAMED"), +new VMOption("--add-exports=java.base/sun.net.www.protocol.ftp=ALL-UNNAMED"), new VMOption("--add-exports=jdk.naming.rmi/com.sun.jndi.url.rmi=ALL-UNNAMED"), new VMOption("-classpath"), new VMOption("lib/jdk9plus/*" + File.pathSeparator + "lib/boot/*") diff --git a/itests/test/src/test/java/org/apache/karaf/itests/mavenresolver/KarafMinimalMonitoredTestSupport.java b/itests/test/src/test/java/org/apache/karaf/itests/mavenresolver/KarafMinimalMonitoredTestSupport.java index b81ac79..c5120aa 100644 --- a/itests/test/src/test/java/org/apache/karaf/itests/mavenresolver/KarafMinimalMonitoredTestSupport.java +++ b/itests/test/src/test/java/org/apache/karaf/itests/mavenresolver/KarafMinimalMonitoredTestSupport.java @@ -116,6 +116,8 @@ public abstract class KarafMinimalMonitoredTestSupport { new VMOption("--add-exports=java.base/sun.net.www.protocol.http=ALL-UNNAMED"), new VMOption("--add-exports=java.base/sun.net.www.protocol.https=ALL-UNNAMED"), new VMOption("--add-exports=java.base/sun.net.www.protocol.jar=ALL-UNNAMED"), +new VMOption("--add-exports=java.base/sun.net.www.protocol.file=ALL-UNNAMED"), +new VMOption("--add-exports=java.base/sun.net.www.protocol.ftp=ALL-UNNAMED"), new VMOption("--add-exports=jdk.naming.rmi/com.sun.jndi.url.rmi=ALL-UNNAMED"), new VMOption("-classpath"), new VMOption("lib/jdk9plus/*" + File.pathSeparator + "lib/boot/*")
[karaf] branch jdk12 updated: [KARAF-6203]ensure karaf can build and run with JDK12-remove WARNING: Illegal reflective access
This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch jdk12 in repository https://gitbox.apache.org/repos/asf/karaf.git The following commit(s) were added to refs/heads/jdk12 by this push: new 6926ab9 [KARAF-6203]ensure karaf can build and run with JDK12-remove WARNING: Illegal reflective access 6926ab9 is described below commit 6926ab916d83603b5ef9a9952159d151f19719e5 Author: Freeman Fang AuthorDate: Thu Mar 21 12:26:29 2019 +0800 [KARAF-6203]ensure karaf can build and run with JDK12-remove WARNING: Illegal reflective access --- .../features/base/src/main/filtered-resources/resources/bin/karaf | 2 ++ .../features/base/src/main/filtered-resources/resources/bin/karaf.bat | 2 ++ 2 files changed, 4 insertions(+) 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 1ed6ad1..07f632e 100644 --- a/assemblies/features/base/src/main/filtered-resources/resources/bin/karaf +++ b/assemblies/features/base/src/main/filtered-resources/resources/bin/karaf @@ -310,6 +310,8 @@ 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.base/sun.net.www.protocol.ftp=ALL-UNNAMED \ + --add-exports=java.base/sun.net.www.protocol.file=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 \ -Dkaraf.instances="${KARAF_HOME}/instances" \ 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 037cd02..03c4f94 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 @@ -439,6 +439,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.base/sun.net.www.protocol.file=ALL-UNNAMED ^ +--add-exports=java.base/sun.net.www.protocol.ftp=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 ^ -classpath "%CLASSPATH%" ^
[karaf] branch jdk12 updated: [KARAF-6203]ensure karaf can build and run with JDK12-fix XATest and JmsExampleTest
This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch jdk12 in repository https://gitbox.apache.org/repos/asf/karaf.git The following commit(s) were added to refs/heads/jdk12 by this push: new b9e2936 [KARAF-6203]ensure karaf can build and run with JDK12-fix XATest and JmsExampleTest b9e2936 is described below commit b9e2936a8fabcd00291f8a0557212c46d5320c45 Author: Freeman Fang AuthorDate: Thu Mar 21 11:51:23 2019 +0800 [KARAF-6203]ensure karaf can build and run with JDK12-fix XATest and JmsExampleTest --- itests/test/src/test/java/org/apache/karaf/itests/XATest.java | 7 --- .../test/java/org/apache/karaf/itests/examples/JmsExampleTest.java | 7 --- 2 files changed, 14 deletions(-) diff --git a/itests/test/src/test/java/org/apache/karaf/itests/XATest.java b/itests/test/src/test/java/org/apache/karaf/itests/XATest.java index 1c14c55..026a473 100644 --- a/itests/test/src/test/java/org/apache/karaf/itests/XATest.java +++ b/itests/test/src/test/java/org/apache/karaf/itests/XATest.java @@ -22,7 +22,6 @@ import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; import org.ops4j.pax.exam.Configuration; -import org.ops4j.pax.exam.karaf.container.internal.JavaVersionUtil; import org.ops4j.pax.exam.MavenUtils; import org.ops4j.pax.exam.Option; import org.ops4j.pax.exam.junit.PaxExam; @@ -64,12 +63,6 @@ public class XATest extends KarafTestSupport { result.add(replaceConfigurationFile("etc/org.ops4j.connectionfactory-artemis.cfg", getConfigFile("/org/apache/karaf/itests/features/org.ops4j.connectionfactory-artemis.cfg"))); result.add(replaceConfigurationFile("etc/org.ops4j.datasource-derby.cfg", getConfigFile("/org/apache/karaf/itests/features/org.ops4j.datasource-derby.cfg"))); result.add(replaceConfigurationFile("etc/xa-test-camel.xml", getConfigFile("/org/apache/karaf/itests/features/xa-test-camel.xml"))); -if (JavaVersionUtil.getMajorVersion() >= 9) { -//need asm 6.x which support java9plus to run this test - result.add(replaceConfigurationFile("system/org/apache/karaf/features/standard/" -+ version + "/standard-" + version + "-features.xml", -getConfigFile("/etc/feature.xml"))); -} return result.toArray(new Option[result.size()]); } diff --git a/itests/test/src/test/java/org/apache/karaf/itests/examples/JmsExampleTest.java b/itests/test/src/test/java/org/apache/karaf/itests/examples/JmsExampleTest.java index 38214ec..c4ca654 100644 --- a/itests/test/src/test/java/org/apache/karaf/itests/examples/JmsExampleTest.java +++ b/itests/test/src/test/java/org/apache/karaf/itests/examples/JmsExampleTest.java @@ -21,7 +21,6 @@ import org.ops4j.pax.exam.Configuration; import org.ops4j.pax.exam.MavenUtils; import org.ops4j.pax.exam.Option; import org.ops4j.pax.exam.junit.PaxExam; -import org.ops4j.pax.exam.karaf.container.internal.JavaVersionUtil; import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy; import org.ops4j.pax.exam.spi.reactors.PerClass; @@ -53,12 +52,6 @@ public class JmsExampleTest extends KarafTestSupport { result.add(editConfigurationFilePut("etc/org.apache.karaf.features.cfg", "featuresBoot", "instance,package,log,ssh,framework,system,eventadmin,feature,shell,management,service,jaas,deployer,diagnostic,wrap,bundle,config,kar,aries-blueprint,artemis,jms,pax-jms-artemis")); result.add(replaceConfigurationFile("etc/org.ops4j.connectionfactory-artemis.cfg", getConfigFile("/org/apache/karaf/itests/features/org.ops4j.connectionfactory-artemis.cfg"))); -if (JavaVersionUtil.getMajorVersion() >= 9) { -//need asm 6.x which support java9plus to run this test - result.add(replaceConfigurationFile("system/org/apache/karaf/features/standard/" -+ version + "/standard-" + version + "-features.xml", -getConfigFile("/etc/feature.xml"))); -} return result.toArray(new Option[result.size()]); }
[karaf] branch jdk12 created (now c1b7989)
This is an automated email from the ASF dual-hosted git repository. ffang pushed a change to branch jdk12 in repository https://gitbox.apache.org/repos/asf/karaf.git. at c1b7989 [KARAF-6203]ensure karaf can build and run with JDK12-initial commit This branch includes the following new commits: new c1b7989 [KARAF-6203]ensure karaf can build and run with JDK12-initial commit The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
[karaf] 01/01: [KARAF-6203]ensure karaf can build and run with JDK12-initial commit
This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch jdk12 in repository https://gitbox.apache.org/repos/asf/karaf.git commit c1b7989c2409d8879e2b16556b84b20102f15e86 Author: Freeman Fang AuthorDate: Thu Mar 21 11:27:25 2019 +0800 [KARAF-6203]ensure karaf can build and run with JDK12-initial commit --- .../src/main/filtered-resources/resources/etc/config.properties | 6 ++ .../base/src/main/filtered-resources/resources/etc/jre.properties | 1 + docker/pom.xml | 2 +- .../karaf-rest-example-client/karaf-rest-example-client-cxf/pom.xml | 4 ++-- .../org/apache/karaf/jaas/modules/krb5/Krb5LoginModuleTest.java | 5 +++-- main/src/test/resources/test-karaf-home/etc/config.properties | 6 ++ main/src/test/resources/test-karaf-home/etc/jre.properties | 2 ++ pom.xml | 2 +- 8 files changed, 22 insertions(+), 6 deletions(-) diff --git a/assemblies/features/base/src/main/filtered-resources/resources/etc/config.properties b/assemblies/features/base/src/main/filtered-resources/resources/etc/config.properties index fe30b1a..03a7c9a 100644 --- a/assemblies/features/base/src/main/filtered-resources/resources/etc/config.properties +++ b/assemblies/features/base/src/main/filtered-resources/resources/etc/config.properties @@ -123,6 +123,12 @@ equinox-capabilities= \ osgi.service;objectClass:List=org.eclipse.osgi.service.security.TrustEngine;osgi.signedcontent.trust.engine=org.eclipse.osgi, \ osgi.service;objectClass:List=org.eclipse.osgi.service.urlconversion.URLConverter;protocol:List="bundleentry,bundleresource" +eecap-12= osgi.ee; osgi.ee="OSGi/Minimum"; version:List="1.0,1.1,1.2", \ + osgi.ee; osgi.ee="JavaSE"; version:List="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,9.0,10.0,11.0,12.0", \ + osgi.ee; osgi.ee="JRE"; version:List="1.0,1.1", \ + osgi.ee; osgi.ee="JavaSE/compact1"; version:List="1.8,9.0,10.0,11.0,12.0", \ + osgi.ee; osgi.ee="JavaSE/compact2"; version:List="1.8,9.0,10.0,11.0,12.0", \ + osgi.ee; osgi.ee="JavaSE/compact3"; version:List="1.8,9.0,10.0,11.0,12.0" eecap-11= osgi.ee; osgi.ee="OSGi/Minimum"; version:List="1.0,1.1,1.2", \ osgi.ee; osgi.ee="JavaSE"; version:List="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,9.0,10.0,11.0", \ osgi.ee; osgi.ee="JRE"; version:List="1.0,1.1", \ diff --git a/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties b/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties index 72ff9a7..16b38be 100644 --- a/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties +++ b/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties @@ -724,3 +724,4 @@ jre-9= \ jre-10 = ${jre-9} jre-11 = ${jre-10} +jre-12 = ${jre-11} diff --git a/docker/pom.xml b/docker/pom.xml index 38aa728..e0f8069 100644 --- a/docker/pom.xml +++ b/docker/pom.xml @@ -51,7 +51,7 @@ com.fasterxml.jackson.core jackson-databind -[2,3) +2.9.8 org.apache.karaf diff --git a/examples/karaf-rest-example/karaf-rest-example-client/karaf-rest-example-client-cxf/pom.xml b/examples/karaf-rest-example/karaf-rest-example-client/karaf-rest-example-client-cxf/pom.xml index 3eedf4b..021c6a5 100644 --- a/examples/karaf-rest-example/karaf-rest-example-client/karaf-rest-example-client-cxf/pom.xml +++ b/examples/karaf-rest-example/karaf-rest-example-client/karaf-rest-example-client-cxf/pom.xml @@ -44,7 +44,7 @@ com.fasterxml.jackson.jaxrs jackson-jaxrs-json-provider - [2.9,3) + 2.9.8 org.apache.karaf.shell @@ -73,4 +73,4 @@ - \ No newline at end of file + diff --git a/jaas/modules/src/test/java/org/apache/karaf/jaas/modules/krb5/Krb5LoginModuleTest.java b/jaas/modules/src/test/java/org/apache/karaf/jaas/modules/krb5/Krb5LoginModuleTest.java index d88955d..59293e8 100644 --- a/jaas/modules/src/test/java/org/apache/karaf/jaas/modules/krb5/Krb5LoginModuleTest.java +++ b/jaas/modules/src/test/java/org/apache/karaf/jaas/modules/krb5/Krb5LoginModuleTest.java @@ -52,6 +52,7 @@ import org.apache.karaf.jaas.modules.NamePasswordCallbackHandler; import org.junit.After; import org.junit.Assert; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; @@ -148,7 +149,7 @@ public class Krb5LoginModuleTest extends KarafKerberosITest { super.tearDown(); } -@Test +@Ignore
[karaf] branch karaf-4.2.x updated: [KARAF-6119]karaf-maven-plugin assembly goal doesn't handle timestamp snapshots
This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch karaf-4.2.x in repository https://gitbox.apache.org/repos/asf/karaf.git The following commit(s) were added to refs/heads/karaf-4.2.x by this push: new ab78741 [KARAF-6119]karaf-maven-plugin assembly goal doesn't handle timestamp snapshots ab78741 is described below commit ab787412baa16f64800aced5934565ccac2881e1 Author: Freeman Fang AuthorDate: Mon Mar 11 19:09:00 2019 +0800 [KARAF-6119]karaf-maven-plugin assembly goal doesn't handle timestamp snapshots (cherry picked from commit 11bda060bfc7fa7dd7893618a407ab87431a24f5) --- .../internal/download/impl/MavenDownloadTask.java | 8 ++- .../java/org/apache/karaf/util/maven/Parser.java | 28 +- 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/features/core/src/main/java/org/apache/karaf/features/internal/download/impl/MavenDownloadTask.java b/features/core/src/main/java/org/apache/karaf/features/internal/download/impl/MavenDownloadTask.java index 7e878df..8465a7e 100644 --- a/features/core/src/main/java/org/apache/karaf/features/internal/download/impl/MavenDownloadTask.java +++ b/features/core/src/main/java/org/apache/karaf/features/internal/download/impl/MavenDownloadTask.java @@ -44,7 +44,13 @@ public class MavenDownloadTask extends AbstractRetryableDownloadTask { @Override protected File download(Exception previousException) throws Exception { -return resolver.resolve(url, previousException); + +try { +return resolver.resolve(url, previousException); +} catch (Exception ex) { +//try again with removing timestamp from snapshot +return resolver.resolve(Parser.pathToMaven(Parser.pathFromMaven(url)), previousException); +} } /** diff --git a/util/src/main/java/org/apache/karaf/util/maven/Parser.java b/util/src/main/java/org/apache/karaf/util/maven/Parser.java index b39d856..814458f 100644 --- a/util/src/main/java/org/apache/karaf/util/maven/Parser.java +++ b/util/src/main/java/org/apache/karaf/util/maven/Parser.java @@ -20,6 +20,8 @@ package org.apache.karaf.util.maven; import java.net.MalformedURLException; import java.util.Map; +import java.util.regex.Matcher; +import java.util.regex.Pattern; /** * Parser for mvn: protocol. @@ -32,6 +34,7 @@ import java.util.Map; public class Parser { +private static final Pattern VERSION_FILE_PATTERN = Pattern.compile( "^(.*)-([0-9]{8}\\.[0-9]{6})-([0-9]+)$" ); /** * Default version if none present in the url. */ @@ -418,7 +421,29 @@ public class Parser */ public String getArtifactPath( final String version ) { -return new StringBuilder() + +Matcher m = VERSION_FILE_PATTERN.matcher(version); + +if ( m.matches() ) +{ +this.m_version = m.group( 1 ) + "-" + "SNAPSHOT"; +String ret = new StringBuilder() +.append( m_group.replaceAll( GROUP_SEPARATOR, FILE_SEPARATOR ) ) +.append( FILE_SEPARATOR ) +.append( m_artifact ) +.append( FILE_SEPARATOR ) +.append( m_version ) +.append( FILE_SEPARATOR ) +.append( m_artifact ) +.append( VERSION_SEPARATOR ) +.append( m_version ) +.append( m_fullClassifier ) +.append( TYPE_SEPARATOR ) +.append( m_type ) +.toString(); +return ret; +} else { +return new StringBuilder() .append( m_group.replaceAll( GROUP_SEPARATOR, FILE_SEPARATOR ) ) .append( FILE_SEPARATOR ) .append( m_artifact ) @@ -432,6 +457,7 @@ public class Parser .append( TYPE_SEPARATOR ) .append( m_type ) .toString(); +} } /**
[karaf] branch master updated: [KARAF-6119]karaf-maven-plugin assembly goal doesn't handle timestamp snapshots
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 11bda06 [KARAF-6119]karaf-maven-plugin assembly goal doesn't handle timestamp snapshots 11bda06 is described below commit 11bda060bfc7fa7dd7893618a407ab87431a24f5 Author: Freeman Fang AuthorDate: Mon Mar 11 19:09:00 2019 +0800 [KARAF-6119]karaf-maven-plugin assembly goal doesn't handle timestamp snapshots --- .../internal/download/impl/MavenDownloadTask.java | 8 ++- .../java/org/apache/karaf/util/maven/Parser.java | 28 +- 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/features/core/src/main/java/org/apache/karaf/features/internal/download/impl/MavenDownloadTask.java b/features/core/src/main/java/org/apache/karaf/features/internal/download/impl/MavenDownloadTask.java index 7e878df..8465a7e 100644 --- a/features/core/src/main/java/org/apache/karaf/features/internal/download/impl/MavenDownloadTask.java +++ b/features/core/src/main/java/org/apache/karaf/features/internal/download/impl/MavenDownloadTask.java @@ -44,7 +44,13 @@ public class MavenDownloadTask extends AbstractRetryableDownloadTask { @Override protected File download(Exception previousException) throws Exception { -return resolver.resolve(url, previousException); + +try { +return resolver.resolve(url, previousException); +} catch (Exception ex) { +//try again with removing timestamp from snapshot +return resolver.resolve(Parser.pathToMaven(Parser.pathFromMaven(url)), previousException); +} } /** diff --git a/util/src/main/java/org/apache/karaf/util/maven/Parser.java b/util/src/main/java/org/apache/karaf/util/maven/Parser.java index b39d856..814458f 100644 --- a/util/src/main/java/org/apache/karaf/util/maven/Parser.java +++ b/util/src/main/java/org/apache/karaf/util/maven/Parser.java @@ -20,6 +20,8 @@ package org.apache.karaf.util.maven; import java.net.MalformedURLException; import java.util.Map; +import java.util.regex.Matcher; +import java.util.regex.Pattern; /** * Parser for mvn: protocol. @@ -32,6 +34,7 @@ import java.util.Map; public class Parser { +private static final Pattern VERSION_FILE_PATTERN = Pattern.compile( "^(.*)-([0-9]{8}\\.[0-9]{6})-([0-9]+)$" ); /** * Default version if none present in the url. */ @@ -418,7 +421,29 @@ public class Parser */ public String getArtifactPath( final String version ) { -return new StringBuilder() + +Matcher m = VERSION_FILE_PATTERN.matcher(version); + +if ( m.matches() ) +{ +this.m_version = m.group( 1 ) + "-" + "SNAPSHOT"; +String ret = new StringBuilder() +.append( m_group.replaceAll( GROUP_SEPARATOR, FILE_SEPARATOR ) ) +.append( FILE_SEPARATOR ) +.append( m_artifact ) +.append( FILE_SEPARATOR ) +.append( m_version ) +.append( FILE_SEPARATOR ) +.append( m_artifact ) +.append( VERSION_SEPARATOR ) +.append( m_version ) +.append( m_fullClassifier ) +.append( TYPE_SEPARATOR ) +.append( m_type ) +.toString(); +return ret; +} else { +return new StringBuilder() .append( m_group.replaceAll( GROUP_SEPARATOR, FILE_SEPARATOR ) ) .append( FILE_SEPARATOR ) .append( m_artifact ) @@ -432,6 +457,7 @@ public class Parser .append( TYPE_SEPARATOR ) .append( m_type ) .toString(); +} } /**
[karaf] branch karaf-4.2.x updated: [KARAF-6085]karaf-maven-plugin verify mojo builds invalid repository URL on Windows
This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch karaf-4.2.x in repository https://gitbox.apache.org/repos/asf/karaf.git The following commit(s) were added to refs/heads/karaf-4.2.x by this push: new 626b7fa [KARAF-6085]karaf-maven-plugin verify mojo builds invalid repository URL on Windows 626b7fa is described below commit 626b7fa15212c95862d4fc9b143bd4748614107f Author: Freeman Fang AuthorDate: Mon Mar 11 11:53:56 2019 +0800 [KARAF-6085]karaf-maven-plugin verify mojo builds invalid repository URL on Windows (cherry picked from commit 235ec97a2036ebc33abf0b72c9ae8ef9f853b27c) --- .../src/main/java/org/apache/karaf/tooling/VerifyMojo.java| 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/VerifyMojo.java b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/VerifyMojo.java index 5ffc224..cd31bb1 100644 --- a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/VerifyMojo.java +++ b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/VerifyMojo.java @@ -266,7 +266,16 @@ public class VerifyMojo extends MojoSupport { if (framework.contains("framework")) { allDescriptors.add("mvn:org.apache.karaf.features/framework/" + getVersion("org.apache.karaf.features:framework") + "/xml/features"); } -allDescriptors.add("file:" + project.getBuild().getDirectory() + "/feature/feature.xml"); +String filePrefix = null; +if (System.getProperty("os.name").contains("Windows")) { +filePrefix = "file:/"; +} else { +filePrefix = "file:"; +} +allDescriptors.add(filePrefix + project.getBuild().getDirectory() + File.separator + + "feature" + + File.separator + + "feature.xml"); } else { allDescriptors.addAll(descriptors); if (framework != null && framework.contains("framework")) {
[karaf] branch master updated: [KARAF-6085]karaf-maven-plugin verify mojo builds invalid repository URL on Windows
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 235ec97 [KARAF-6085]karaf-maven-plugin verify mojo builds invalid repository URL on Windows 235ec97 is described below commit 235ec97a2036ebc33abf0b72c9ae8ef9f853b27c Author: Freeman Fang AuthorDate: Mon Mar 11 11:53:56 2019 +0800 [KARAF-6085]karaf-maven-plugin verify mojo builds invalid repository URL on Windows --- .../src/main/java/org/apache/karaf/tooling/VerifyMojo.java| 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/VerifyMojo.java b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/VerifyMojo.java index 5ffc224..cd31bb1 100644 --- a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/VerifyMojo.java +++ b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/VerifyMojo.java @@ -266,7 +266,16 @@ public class VerifyMojo extends MojoSupport { if (framework.contains("framework")) { allDescriptors.add("mvn:org.apache.karaf.features/framework/" + getVersion("org.apache.karaf.features:framework") + "/xml/features"); } -allDescriptors.add("file:" + project.getBuild().getDirectory() + "/feature/feature.xml"); +String filePrefix = null; +if (System.getProperty("os.name").contains("Windows")) { +filePrefix = "file:/"; +} else { +filePrefix = "file:"; +} +allDescriptors.add(filePrefix + project.getBuild().getDirectory() + File.separator + + "feature" + + File.separator + + "feature.xml"); } else { allDescriptors.addAll(descriptors); if (framework != null && framework.contains("framework")) {
[karaf] branch karaf-4.2.x updated: [KARAF-6177]another place to fix
This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch karaf-4.2.x in repository https://gitbox.apache.org/repos/asf/karaf.git The following commit(s) were added to refs/heads/karaf-4.2.x by this push: new 22eec0f [KARAF-6177]another place to fix 22eec0f is described below commit 22eec0f1e56490dffd7112e83ce2dbab9bf65159 Author: Freeman Fang AuthorDate: Thu Mar 7 18:28:10 2019 +0800 [KARAF-6177]another place to fix (cherry picked from commit 386940d9f3ae59d153c9d4b4875fe52b0eb98212) --- .../java/org/apache/karaf/shell/impl/console/commands/ExitCommand.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/core/src/main/java/org/apache/karaf/shell/impl/console/commands/ExitCommand.java b/shell/core/src/main/java/org/apache/karaf/shell/impl/console/commands/ExitCommand.java index 147d403..442009c 100644 --- a/shell/core/src/main/java/org/apache/karaf/shell/impl/console/commands/ExitCommand.java +++ b/shell/core/src/main/java/org/apache/karaf/shell/impl/console/commands/ExitCommand.java @@ -29,7 +29,7 @@ public class ExitCommand extends TopLevelCommand { @Override public String getDescription() { -return "Exit from the current shell"; +return "Exit from the current subshell"; } @Override
[karaf] branch master updated: [KARAF-6177]another place to fix
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 386940d [KARAF-6177]another place to fix 386940d is described below commit 386940d9f3ae59d153c9d4b4875fe52b0eb98212 Author: Freeman Fang AuthorDate: Thu Mar 7 18:28:10 2019 +0800 [KARAF-6177]another place to fix --- .../java/org/apache/karaf/shell/impl/console/commands/ExitCommand.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/core/src/main/java/org/apache/karaf/shell/impl/console/commands/ExitCommand.java b/shell/core/src/main/java/org/apache/karaf/shell/impl/console/commands/ExitCommand.java index 147d403..442009c 100644 --- a/shell/core/src/main/java/org/apache/karaf/shell/impl/console/commands/ExitCommand.java +++ b/shell/core/src/main/java/org/apache/karaf/shell/impl/console/commands/ExitCommand.java @@ -29,7 +29,7 @@ public class ExitCommand extends TopLevelCommand { @Override public String getDescription() { -return "Exit from the current shell"; +return "Exit from the current subshell"; } @Override
[karaf] branch karaf-4.2.x updated: [KARAF-6177]improve shell:exit help message
This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch karaf-4.2.x in repository https://gitbox.apache.org/repos/asf/karaf.git The following commit(s) were added to refs/heads/karaf-4.2.x by this push: new a40f9b5 [KARAF-6177]improve shell:exit help message a40f9b5 is described below commit a40f9b5b43af91deadb52eab6bf583594b99b7b2 Author: Freeman Fang AuthorDate: Thu Feb 28 11:12:22 2019 +0800 [KARAF-6177]improve shell:exit help message (cherry picked from commit db4ef21f509689c2cdf3770192f4f7963cd1e136) --- .../src/main/java/org/apache/karaf/shell/console/ExitAction.java| 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/console/src/main/java/org/apache/karaf/shell/console/ExitAction.java b/shell/console/src/main/java/org/apache/karaf/shell/console/ExitAction.java index d50cc91..f5e3220 100644 --- a/shell/console/src/main/java/org/apache/karaf/shell/console/ExitAction.java +++ b/shell/console/src/main/java/org/apache/karaf/shell/console/ExitAction.java @@ -23,7 +23,7 @@ import org.apache.karaf.shell.commands.Command; /** * Exit from the current sub-shell and get back to the previous one. */ -@Command(scope = "*", name = "exit", description = "Exit from the current shell") +@Command(scope = "*", name = "exit", description = "Exit from the current subshell") @Deprecated public class ExitAction extends AbstractAction {
[karaf] branch master updated: [KARAF-6177]improve shell:exit help message
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 db4ef21 [KARAF-6177]improve shell:exit help message new beda373 Merge branch 'master' of github.com:apache/karaf db4ef21 is described below commit db4ef21f509689c2cdf3770192f4f7963cd1e136 Author: Freeman Fang AuthorDate: Thu Feb 28 11:12:22 2019 +0800 [KARAF-6177]improve shell:exit help message --- .../src/main/java/org/apache/karaf/shell/console/ExitAction.java| 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/console/src/main/java/org/apache/karaf/shell/console/ExitAction.java b/shell/console/src/main/java/org/apache/karaf/shell/console/ExitAction.java index d50cc91..f5e3220 100644 --- a/shell/console/src/main/java/org/apache/karaf/shell/console/ExitAction.java +++ b/shell/console/src/main/java/org/apache/karaf/shell/console/ExitAction.java @@ -23,7 +23,7 @@ import org.apache.karaf.shell.commands.Command; /** * Exit from the current sub-shell and get back to the previous one. */ -@Command(scope = "*", name = "exit", description = "Exit from the current shell") +@Command(scope = "*", name = "exit", description = "Exit from the current subshell") @Deprecated public class ExitAction extends AbstractAction {
[karaf] branch karaf-4.2.x updated: [KARAF-6157]ensure karaf-maven-plugin can honor start-level for bootBundles
This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch karaf-4.2.x in repository https://gitbox.apache.org/repos/asf/karaf.git The following commit(s) were added to refs/heads/karaf-4.2.x by this push: new 58eae75 [KARAF-6157]ensure karaf-maven-plugin can honor start-level for bootBundles 58eae75 is described below commit 58eae75a40061e3ffb1606e5b0ac2c0b0b65346a Author: Freeman Fang AuthorDate: Thu Feb 14 16:46:45 2019 +0800 [KARAF-6157]ensure karaf-maven-plugin can honor start-level for bootBundles (cherry picked from commit b531a0dac6b85e7f559979db5d5b975d319462b4) --- .../java/org/apache/karaf/profile/assembly/Builder.java | 17 + 1 file changed, 17 insertions(+) diff --git a/profile/src/main/java/org/apache/karaf/profile/assembly/Builder.java b/profile/src/main/java/org/apache/karaf/profile/assembly/Builder.java index 00bbc0a..a48da2d 100644 --- a/profile/src/main/java/org/apache/karaf/profile/assembly/Builder.java +++ b/profile/src/main/java/org/apache/karaf/profile/assembly/Builder.java @@ -129,6 +129,7 @@ public class Builder { private static final String LIBRARY_CLAUSE_TYPE = "type"; private static final String LIBRARY_CLAUSE_EXPORT = "export"; private static final String LIBRARY_CLAUSE_DELEGATE = "delegate"; +private static final String START_LEVEL = "start-level"; public static final String ORG_OPS4J_PAX_URL_MVN_PID = "org.ops4j.pax.url.mvn"; @@ -1720,7 +1721,23 @@ public class Builder { // Add bundles for (String location : bootEffective.getBundles()) { location = location.replace("profile:", "file:etc/"); +int intLevel = -100; +if (location.contains(START_LEVEL)) { +//extract start-level for this bundle +String level = location.substring(location.indexOf(START_LEVEL)); +level = level.substring(START_LEVEL.length() + 1); +if (level.startsWith("\"")) { +level = level.substring(1, level.length() - 1); +} +intLevel = Integer.valueOf(level); +LOGGER.debug("bundle start-level: " + level); +location = location.substring(0, location.indexOf(START_LEVEL) - 1); +LOGGER.debug("new bundle location after strip start-level: " + location); +} Bundle bun = new Bundle(); +if (intLevel > 0) { +bun.setStartLevel(intLevel); +} bun.setLocation(location); generated.getBundle().add(bun); }
[karaf] branch master updated: [KARAF-6157]ensure karaf-maven-plugin can honor start-level for bootBundles
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 b531a0d [KARAF-6157]ensure karaf-maven-plugin can honor start-level for bootBundles b531a0d is described below commit b531a0dac6b85e7f559979db5d5b975d319462b4 Author: Freeman Fang AuthorDate: Thu Feb 14 16:46:45 2019 +0800 [KARAF-6157]ensure karaf-maven-plugin can honor start-level for bootBundles --- .../java/org/apache/karaf/profile/assembly/Builder.java | 17 + 1 file changed, 17 insertions(+) diff --git a/profile/src/main/java/org/apache/karaf/profile/assembly/Builder.java b/profile/src/main/java/org/apache/karaf/profile/assembly/Builder.java index 00bbc0a..a48da2d 100644 --- a/profile/src/main/java/org/apache/karaf/profile/assembly/Builder.java +++ b/profile/src/main/java/org/apache/karaf/profile/assembly/Builder.java @@ -129,6 +129,7 @@ public class Builder { private static final String LIBRARY_CLAUSE_TYPE = "type"; private static final String LIBRARY_CLAUSE_EXPORT = "export"; private static final String LIBRARY_CLAUSE_DELEGATE = "delegate"; +private static final String START_LEVEL = "start-level"; public static final String ORG_OPS4J_PAX_URL_MVN_PID = "org.ops4j.pax.url.mvn"; @@ -1720,7 +1721,23 @@ public class Builder { // Add bundles for (String location : bootEffective.getBundles()) { location = location.replace("profile:", "file:etc/"); +int intLevel = -100; +if (location.contains(START_LEVEL)) { +//extract start-level for this bundle +String level = location.substring(location.indexOf(START_LEVEL)); +level = level.substring(START_LEVEL.length() + 1); +if (level.startsWith("\"")) { +level = level.substring(1, level.length() - 1); +} +intLevel = Integer.valueOf(level); +LOGGER.debug("bundle start-level: " + level); +location = location.substring(0, location.indexOf(START_LEVEL) - 1); +LOGGER.debug("new bundle location after strip start-level: " + location); +} Bundle bun = new Bundle(); +if (intLevel > 0) { +bun.setStartLevel(intLevel); +} bun.setLocation(location); generated.getBundle().add(bun); }
svn commit: r1852090 - /karaf/site/production/download.html
Author: ffang Date: Fri Jan 25 03:57:18 2019 New Revision: 1852090 URL: http://svn.apache.org/viewvc?rev=1852090&view=rev Log: update java version we supported Modified: karaf/site/production/download.html Modified: karaf/site/production/download.html URL: http://svn.apache.org/viewvc/karaf/site/production/download.html?rev=1852090&r1=1852089&r2=1852090&view=diff == --- karaf/site/production/download.html (original) +++ karaf/site/production/download.html Fri Jan 25 03:57:18 2019 @@ -176,7 +176,7 @@ 4.2.x 6 - 8 / 9 / 10 + 8 / 9 / 10 / 11 Stable 4.2.2 4.2.3 @@ -602,4 +602,4 @@ - \ No newline at end of file +
[karaf] branch master updated: [KARAF-6091]upgrade to jaxb 2.3.2
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 97f662b [KARAF-6091]upgrade to jaxb 2.3.2 97f662b is described below commit 97f662ba588af70f58520b59d84e2d72b26e8d54 Author: Freeman Fang AuthorDate: Tue Jan 15 15:01:52 2019 +0800 [KARAF-6091]upgrade to jaxb 2.3.2 --- assemblies/features/base/pom.xml | 12 assemblies/features/enterprise-legacy/pom.xml | 24 features/core/pom.xml | 21 ++--- jaas/modules/pom.xml | 20 +--- pom.xml | 25 - scheduler/pom.xml | 20 +--- specs/java.xml.ws/pom.xml | 19 --- tooling/karaf-maven-plugin/pom.xml| 5 ++--- 8 files changed, 62 insertions(+), 84 deletions(-) diff --git a/assemblies/features/base/pom.xml b/assemblies/features/base/pom.xml index 4b719a6..3ec42f0 100644 --- a/assemblies/features/base/pom.xml +++ b/assemblies/features/base/pom.xml @@ -38,9 +38,8 @@ -javax.xml.bind -jaxb-api -2.3.0 +jakarta.xml.bind +jakarta.xml.bind-api javax.annotation @@ -55,17 +54,14 @@ org.glassfish.jaxb jaxb-runtime -2.3.1 org.glassfish.jaxb txw2 -2.3.1 com.sun.istack istack-commons-runtime -3.0.7 org.apache.karaf.specs @@ -180,8 +176,8 @@ target/classes/resources/lib/endorsed -javax.xml.bind -jaxb-api +jakarta.xml.bind + jakarta.xml.bind-api target/classes/resources/lib/jdk9plus diff --git a/assemblies/features/enterprise-legacy/pom.xml b/assemblies/features/enterprise-legacy/pom.xml index 70dd527..950646f 100644 --- a/assemblies/features/enterprise-legacy/pom.xml +++ b/assemblies/features/enterprise-legacy/pom.xml @@ -208,30 +208,6 @@ -org.apache.karaf.tooling -karaf-maven-plugin - - -verify -process-resources - -verify - - - - mvn:org.apache.karaf.features/framework/${project.version}/xml/features - file:${project.build.directory}/feature/feature.xml - - org.apache.karaf.features:framework -9 - -framework - - - - - - org.codehaus.mojo build-helper-maven-plugin diff --git a/features/core/pom.xml b/features/core/pom.xml index 5f68d76..0379e77 100644 --- a/features/core/pom.xml +++ b/features/core/pom.xml @@ -118,6 +118,15 @@ 1.3 test + + +jakarta.xml.bind +jakarta.xml.bind-api + + +org.glassfish.jaxb +jaxb-runtime + @@ -193,24 +202,14 @@ java9-plus 3.1.0 - --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.xml.bind/com.sun.xml.internal.bind.v2.runtime=ALL-UNNAMED --add-exports=jdk.xml.dom/org.w3c.dom.html=ALL-UNNAMED -Djava.io.tmpdir=${project.build.directory} + --add-exports=java.base/sun.net.www.protocol.http=ALL-UNNAMED --add-exports=java.base/sun.net.www.protocol.https=ALL-UNNAMED --add-exports=jdk.xml.dom/org.w3c.dom.html=ALL-UNNAMED -Djava.io.tmpdir=${project.build.directory
[karaf] branch master updated: give more time to let artemis server up, avoid jms related itests failure
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 e246522 give more time to let artemis server up, avoid jms related itests failure e246522 is described below commit e2465229ea937f2d2bea0112c7b17fd623cac053 Author: Freeman Fang AuthorDate: Tue Jan 15 14:58:57 2019 +0800 give more time to let artemis server up, avoid jms related itests failure --- itests/test/src/test/java/org/apache/karaf/itests/XATest.java| 1 + .../src/test/java/org/apache/karaf/itests/examples/JmsExampleTest.java | 1 + 2 files changed, 2 insertions(+) diff --git a/itests/test/src/test/java/org/apache/karaf/itests/XATest.java b/itests/test/src/test/java/org/apache/karaf/itests/XATest.java index c929c92..4854ab1 100644 --- a/itests/test/src/test/java/org/apache/karaf/itests/XATest.java +++ b/itests/test/src/test/java/org/apache/karaf/itests/XATest.java @@ -73,6 +73,7 @@ public class XATest extends KarafTestSupport { @Test public void test() throws Exception { +Thread.sleep(1);//wait and until artemis server up System.out.println(executeCommand("jms:info artemis")); System.out.println("== Installing Derby"); diff --git a/itests/test/src/test/java/org/apache/karaf/itests/examples/JmsExampleTest.java b/itests/test/src/test/java/org/apache/karaf/itests/examples/JmsExampleTest.java index f26d5d5..38214ec 100644 --- a/itests/test/src/test/java/org/apache/karaf/itests/examples/JmsExampleTest.java +++ b/itests/test/src/test/java/org/apache/karaf/itests/examples/JmsExampleTest.java @@ -64,6 +64,7 @@ public class JmsExampleTest extends KarafTestSupport { @Test public void test() throws Exception { +Thread.sleep(1);//wait until artemis up String output = executeCommand("jms:info artemis"); System.out.println(output); assertContains("ActiveMQ", output);
[karaf] branch master updated: KARAF-6084 Add Java 11 and 11 to the list of supported versions
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 9a9eb41 KARAF-6084 Add Java 11 and 11 to the list of supported versions 9a9eb41 is described below commit 9a9eb410b28cff8a20cbf5834bfa6864cc32d189 Author: Martin Krüger AuthorDate: Thu Jan 10 09:52:57 2019 +0100 KARAF-6084 Add Java 11 and 11 to the list of supported versions Signed-off-by: Freeman Fang --- .../org/apache/karaf/profile/assembly/Builder.java | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/profile/src/main/java/org/apache/karaf/profile/assembly/Builder.java b/profile/src/main/java/org/apache/karaf/profile/assembly/Builder.java index a73a95c..0d95034 100644 --- a/profile/src/main/java/org/apache/karaf/profile/assembly/Builder.java +++ b/profile/src/main/java/org/apache/karaf/profile/assembly/Builder.java @@ -46,7 +46,6 @@ import java.util.LinkedHashSet; import java.util.LinkedList; import java.util.List; import java.util.Map; -import java.util.Optional; import java.util.Set; import java.util.TreeMap; import java.util.TreeSet; @@ -60,7 +59,6 @@ import java.util.regex.Pattern; import java.util.stream.Collectors; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; - import org.apache.felix.resolver.ResolverImpl; import org.apache.felix.utils.manifest.Clause; import org.apache.felix.utils.properties.Properties; @@ -188,7 +186,12 @@ public class Builder { * supported versions are defined. */ public enum JavaVersion { -Java16("1.6", 1), Java17("1.7", 2), Java18("1.8", 3), Java9("9", 4); +Java16("1.6", 1), +Java17("1.7", 2), +Java18("1.8", 3), +Java9("9", 4), +Java10("10", 5), +Java11("11", 6); private String version; private int ordinal; @@ -199,14 +202,12 @@ public class Builder { } public static JavaVersion from(String version) { -Optional v = Arrays.stream(values()) -.filter(jv -> jv.version.equals(version)) -.findFirst(); - -if (!v.isPresent()) { -throw new IllegalArgumentException("Java version \"" + version + "\" is not supported"); +for (JavaVersion value : values()) { +if (value.version.equals(version)) { +return value; +} } -return v.get(); +throw new IllegalArgumentException("Java version \"" + version + "\" is not supported"); } public boolean supportsEndorsedAndExtLibraries() {
[karaf] branch master updated: [KARAF-6062]CLASSPATH error when using KARAF with JDK11 on windows
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 3a279c6 [KARAF-6062]CLASSPATH error when using KARAF with JDK11 on windows 3a279c6 is described below commit 3a279c663436a8c4a8cb993df0ff3e9cc3e63213 Author: Freeman Fang AuthorDate: Wed Dec 26 15:07:09 2018 +0800 [KARAF-6062]CLASSPATH error when using KARAF with JDK11 on windows --- .../base/src/main/filtered-resources/resources/bin/karaf.bat | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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 3f2938f..037cd02 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 @@ -229,6 +229,12 @@ for /f tokens^=2-5^ delims^=.-_+^" %%j in ('"%JAVA%" -fullversion 2^>^&1') do ( if %%j==1 (set JAVA_VERSION=%%k) else (set JAVA_VERSION=%%j) ) +if %JAVA_VERSION% GTR 8 ( + pushd "%KARAF_HOME%\lib\jdk9plus" + for %%G in (*.jar) do call:APPEND_TO_JDK9PLUS_CLASSPATH %%G + popd +) + :CheckRootInstance set ROOT_INSTANCE_RUNNING=false if exist "%KARAF_HOME%\instances\instance.properties" ( @@ -419,9 +425,6 @@ if "%KARAF_PROFILER%" == "" goto :RUN rem If major version is greater than 1 (meaning Java 9 or 10), we don't use endorsed lib but module rem If major version is 1 (meaning Java 1.6, 1.7, 1.8), we use endorsed lib if %JAVA_VERSION% GTR 8 ( -pushd "%KARAF_HOME%\lib\jdk9plus" -for %%G in (*.jar) do call:APPEND_TO_JDK9PLUS_CLASSPATH %%G -popd "%JAVA%" %JAVA_OPTS% %OPTS% ^ --add-reads=java.xml=java.logging ^ --add-exports=java.base/org.apache.karaf.specs.locator=java.xml,ALL-UNNAMED ^
[karaf] branch master updated: [KARAF-6050]package org.apache.karaf.specs.locator not in java.base
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 59f500f [KARAF-6050]package org.apache.karaf.specs.locator not in java.base 59f500f is described below commit 59f500fc29940113b43ae64cee5d533110dd5784 Author: Freeman Fang AuthorDate: Mon Dec 17 21:13:56 2018 +0800 [KARAF-6050]package org.apache.karaf.specs.locator not in java.base --- .../main/java/org/apache/karaf/itests/KarafTestSupport.java | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/itests/common/src/main/java/org/apache/karaf/itests/KarafTestSupport.java b/itests/common/src/main/java/org/apache/karaf/itests/KarafTestSupport.java index 2df5e3d..1e1294f 100644 --- a/itests/common/src/main/java/org/apache/karaf/itests/KarafTestSupport.java +++ b/itests/common/src/main/java/org/apache/karaf/itests/KarafTestSupport.java @@ -80,7 +80,7 @@ public class KarafTestSupport { private static final EnumSet NO_AUTO_REFRESH = EnumSet.of(FeaturesService.Option.NoAutoRefreshBundles); public static final String MIN_RMI_SERVER_PORT = "4"; -public static final String MAX_RMI_SERVER_PORT = "6"; +public static final String MAX_RMI_SERVER_PORT = "65534"; public static final String MIN_HTTP_PORT = "9080"; public static final String MAX_HTTP_PORT = ""; public static final String MIN_RMI_REG_PORT = "1099"; @@ -172,6 +172,7 @@ public class KarafTestSupport { @Configuration public Option[] config() { +String karafVersion = MavenUtils.getArtifactVersion("org.apache.karaf", "apache-karaf"); MavenArtifactUrlReference karafUrl = CoreOptions.maven().groupId("org.apache.karaf").artifactId("apache-karaf").versionAsInProject().type("tar.gz"); String httpPort = Integer.toString(getAvailablePort(Integer.parseInt(MIN_HTTP_PORT), Integer.parseInt(MAX_HTTP_PORT))); String rmiRegistryPort = Integer.toString(getAvailablePort(Integer.parseInt(MIN_RMI_REG_PORT), Integer.parseInt(MAX_RMI_REG_PORT))); @@ -220,11 +221,10 @@ public class KarafTestSupport { new VMOption("--add-reads=java.xml=java.logging"), new VMOption("--add-exports=java.base/org.apache.karaf.specs.locator=java.xml,ALL-UNNAMED"), new VMOption("--patch-module"), -new VMOption("java.base=lib/endorsed/org.apache.karaf.specs.locator-" -+ System.getProperty("karaf.version", "4.2.2-SNAPSHOT") + ".jar"), -new VMOption("--patch-module"), -new VMOption("java.xml=lib/endorsed/org.apache.karaf.specs.java.xml-" -+ System.getProperty("karaf.version", "4.2.2-SNAPSHOT") + ".jar"), +new VMOption("java.base=lib/endorsed/org.apache.karaf.specs.locator-" ++ System.getProperty("karaf.version", karafVersion) + ".jar"), +new VMOption("--patch-module"), new VMOption("java.xml=lib/endorsed/org.apache.karaf.specs.java.xml-" ++ System.getProperty("karaf.version", karafVersion) + ".jar"), new VMOption("--add-opens"), new VMOption("java.base/java.security=ALL-UNNAMED"), new VMOption("--add-opens"),
[karaf] branch master updated: [KARAF-6023]upgrade to pax-exam 4.13.0
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 e7d8dc1 [KARAF-6023]upgrade to pax-exam 4.13.0 e7d8dc1 is described below commit e7d8dc19dd74326485b6d2bf59f6f06aa9d10a25 Author: Freeman Fang AuthorDate: Fri Nov 30 13:20:15 2018 +0800 [KARAF-6023]upgrade to pax-exam 4.13.0 --- pom.xml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index ab79353..81f8d40 100644 --- a/pom.xml +++ b/pom.xml @@ -276,7 +276,7 @@ 5.0.0 1.0.0 -4.12.0 +4.13.0 1.10.1 1.5.0 1.8.3 @@ -2374,8 +2374,6 @@ --add-opens java.naming/javax.naming.spi=ALL-UNNAMED --add-opens java.rmi/sun.rmi.transport.tcp=ALL-UNNAMED - -4.13.0-SNAPSHOT [9,)
[karaf] branch master updated: [KARAF-6018]use org.glassfish.jaxb instead of com.sun.xml.bind
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 7fc4dd1 [KARAF-6018]use org.glassfish.jaxb instead of com.sun.xml.bind new ac9724f Merge branch 'master' of github.com:apache/karaf 7fc4dd1 is described below commit 7fc4dd1655112a7939eda41308588d7a79c577be Author: Freeman Fang AuthorDate: Thu Nov 22 18:51:58 2018 +0800 [KARAF-6018]use org.glassfish.jaxb instead of com.sun.xml.bind --- assemblies/features/base/pom.xml | 64 +--- features/core/pom.xml| 43 ++- jaas/modules/pom.xml | 43 ++- scheduler/pom.xml| 43 ++- 4 files changed, 29 insertions(+), 164 deletions(-) diff --git a/assemblies/features/base/pom.xml b/assemblies/features/base/pom.xml index 4849e4b..3d07058 100644 --- a/assemblies/features/base/pom.xml +++ b/assemblies/features/base/pom.xml @@ -53,48 +53,20 @@ 1.2.0 -com.sun.xml.bind -jaxb-core -${jaxb.version} - - -org.glassfish.jaxb -jaxb-core - - -org.glassfish.jaxb -txw2 - - +org.glassfish.jaxb +jaxb-runtime +2.3.1 -com.sun.xml.bind -jaxb-impl -${jaxb.version} - - -javax.xml.bind -jsr173_api - - -javax.xml -jsr173 - - -javax.activation -activation - - -javax.xml.bind -activation - - -javax.xml.bind -jaxb-api - - +org.glassfish.jaxb +txw2 +2.3.1 + + +com.sun.istack +istack-commons-runtime +3.0.7 - org.apache.karaf.specs org.apache.karaf.specs.locator @@ -223,16 +195,20 @@ target/classes/resources/lib/jdk9plus -com.sun.xml.bind -jaxb-core +org.glassfish.jaxb +jaxb-runtime + target/classes/resources/lib/jdk9plus + + +org.glassfish.jaxb +txw2 target/classes/resources/lib/jdk9plus -com.sun.xml.bind -jaxb-impl + com.sun.istack + istack-commons-runtime target/classes/resources/lib/jdk9plus - org.apache.karaf org.apache.karaf.main diff --git a/features/core/pom.xml b/features/core/pom.xml index 7f7d0f6..fb25140 100644 --- a/features/core/pom.xml +++ b/features/core/pom.xml @@ -207,46 +207,9 @@ 1.1.1 -com.sun.xml.bind -jaxb-core -${jaxb.version} - - -org.glassfish.jaxb -
[karaf] branch master updated: use com.sun.activation:javax.activation which has both api and impl
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 367b96c use com.sun.activation:javax.activation which has both api and impl 367b96c is described below commit 367b96c4e8e63320ed8a7aac7cfaf74b3c9a2a43 Author: Freeman Fang AuthorDate: Thu Nov 15 14:27:34 2018 +0800 use com.sun.activation:javax.activation which has both api and impl --- assemblies/features/base/pom.xml | 10 -- 1 file changed, 10 deletions(-) diff --git a/assemblies/features/base/pom.xml b/assemblies/features/base/pom.xml index cb74dde..4849e4b 100644 --- a/assemblies/features/base/pom.xml +++ b/assemblies/features/base/pom.xml @@ -43,11 +43,6 @@ 2.3.0 -javax.activation -javax.activation-api -1.2.0 - - javax.annotation javax.annotation-api ${javax.annotation.version} @@ -223,11 +218,6 @@ target/classes/resources/lib/jdk9plus -javax.activation - javax.activation-api - target/classes/resources/lib/jdk9plus - - com.sun.activation javax.activation target/classes/resources/lib/jdk9plus
[karaf] branch master updated: add NPE guard for proxyService
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 ab4c9e8 add NPE guard for proxyService ab4c9e8 is described below commit ab4c9e857c5b5a0938622efc6a457b145644bfe8 Author: Freeman Fang AuthorDate: Thu Nov 15 10:02:58 2018 +0800 add NPE guard for proxyService --- .../main/java/org/apache/karaf/http/core/internal/osgi/Activator.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/http/src/main/java/org/apache/karaf/http/core/internal/osgi/Activator.java b/http/src/main/java/org/apache/karaf/http/core/internal/osgi/Activator.java index 05eb9c2..6be368b 100644 --- a/http/src/main/java/org/apache/karaf/http/core/internal/osgi/Activator.java +++ b/http/src/main/java/org/apache/karaf/http/core/internal/osgi/Activator.java @@ -98,6 +98,8 @@ public class Activator extends BaseActivator implements ManagedService { @Override public void updated(Dictionary properties) { -proxyService.initProxies(); +if (proxyService != null) { +proxyService.initProxies(); +} } }
[karaf] branch master updated: [KARAF-5988]add missing package for jdk11
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 cc06aeb [KARAF-5988]add missing package for jdk11 cc06aeb is described below commit cc06aeb296a1866727692280a6907ef563ce8e42 Author: Freeman Fang AuthorDate: Wed Nov 14 08:43:41 2018 +0800 [KARAF-5988]add missing package for jdk11 --- .../base/src/main/filtered-resources/resources/etc/jre.properties| 1 + 1 file changed, 1 insertion(+) diff --git a/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties b/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties index a27f9c7..c45b197 100644 --- a/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties +++ b/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties @@ -541,6 +541,7 @@ jre-9= \ javax.accessibility, \ javax.activation;version="1.2", \ javax.activity, \ + javax.annotation;version="1.0", \ javax.annotation.processing;version="1.0", \ javax.crypto, \ javax.crypto.interfaces, \
[karaf] branch master updated: [KARAF-5991]fix build broken with JDK11
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 8013de7 [KARAF-5991]fix build broken with JDK11 8013de7 is described below commit 8013de7f4a3eedec072e34beb4e2e1ada6b4f416 Author: Freeman Fang AuthorDate: Fri Nov 2 09:11:29 2018 +0800 [KARAF-5991]fix build broken with JDK11 --- specs/java.xml.ws/pom.xml | 16 1 file changed, 16 insertions(+) diff --git a/specs/java.xml.ws/pom.xml b/specs/java.xml.ws/pom.xml index 100b246..69c8226 100644 --- a/specs/java.xml.ws/pom.xml +++ b/specs/java.xml.ws/pom.xml @@ -63,4 +63,20 @@ org.apache.karaf.specs.locator + + + java9-plus + + +javax.xml.bind +jaxb-api + ${jaxb.version} + + + + [9,) + + + +
[karaf] branch master updated: [KARAF-5995]ensure there is a way to quit bin/client cmd
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 d6d503d [KARAF-5995]ensure there is a way to quit bin/client cmd d6d503d is described below commit d6d503d2a59304115e23922bde6f72611dd054f0 Author: Freeman Fang AuthorDate: Wed Oct 31 15:24:36 2018 +0800 [KARAF-5995]ensure there is a way to quit bin/client cmd --- client/src/main/java/org/apache/karaf/client/Main.java | 17 + 1 file changed, 17 insertions(+) diff --git a/client/src/main/java/org/apache/karaf/client/Main.java b/client/src/main/java/org/apache/karaf/client/Main.java index 22cd50b..e9e6336 100644 --- a/client/src/main/java/org/apache/karaf/client/Main.java +++ b/client/src/main/java/org/apache/karaf/client/Main.java @@ -191,6 +191,22 @@ public class Main { if (config.getCommand().length() > 0) { ChannelExec channel = session.createExecChannel(config.getCommand() + "\n"); channel.setIn(new ByteArrayInputStream(new byte[0])); +new Thread() { +public void run() { +while (true) { +try { +int a = System.in.read(); +if (a == -1) { +channel.close(true); +break; +} +Thread.sleep(1000); +} catch (Exception e) { +//ignore +} +} +} +}.start(); channel.setAgentForwarding(true); NoCloseOutputStream output = new NoCloseOutputStream(terminal.output()); channel.setOut(output); @@ -200,6 +216,7 @@ public class Main { if (channel.getExitStatus() != null) { exitStatus = channel.getExitStatus(); } + } else { ChannelShell channel = session.createShellChannel(); Attributes attributes = terminal.enterRawMode();
[karaf] branch master updated: [KARAF-5989]Error while sending email because of javax.activation
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 50ccdc9 [KARAF-5989]Error while sending email because of javax.activation 50ccdc9 is described below commit 50ccdc93a1ff1e619f808e13f38fbacbb26213c0 Author: Freeman Fang AuthorDate: Mon Oct 29 20:47:21 2018 +0800 [KARAF-5989]Error while sending email because of javax.activation --- .../base/src/main/filtered-resources/resources/etc/jre.properties | 1 - assemblies/features/enterprise-legacy/pom.xml | 2 +- assemblies/features/standard/pom.xml| 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties b/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties index b15f428..a27f9c7 100644 --- a/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties +++ b/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties @@ -342,7 +342,6 @@ jre-1.7= \ jre-1.8= \ javax.accessibility, \ - javax.activation;version="1.1", \ javax.activity, \ javax.annotation;version="1.0", \ javax.annotation.processing;version="1.0", \ diff --git a/assemblies/features/enterprise-legacy/pom.xml b/assemblies/features/enterprise-legacy/pom.xml index 52758ac..e7748a0 100644 --- a/assemblies/features/enterprise-legacy/pom.xml +++ b/assemblies/features/enterprise-legacy/pom.xml @@ -223,7 +223,7 @@ file:${project.build.directory}/feature/feature.xml org.apache.karaf.features:framework -1.8 +9 framework diff --git a/assemblies/features/standard/pom.xml b/assemblies/features/standard/pom.xml index 937ff91..ededa13 100644 --- a/assemblies/features/standard/pom.xml +++ b/assemblies/features/standard/pom.xml @@ -426,7 +426,7 @@ file:${project.build.directory}/feature/feature.xml org.apache.karaf.features:framework -1.8 +9 framework
[karaf] branch master updated: [KARAF-5991]add jaxb api into Karaf specs
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 da7ae8f [KARAF-5991]add jaxb api into Karaf specs da7ae8f is described below commit da7ae8f76f2db1347200ff6bb4760e4ecbb1b454 Author: Freeman Fang AuthorDate: Mon Oct 29 17:30:08 2018 +0800 [KARAF-5991]add jaxb api into Karaf specs --- .../main/java/javax/xml/bind/ContextFinder.java| 520 + 1 file changed, 520 insertions(+) diff --git a/specs/java.xml.ws/src/main/java/javax/xml/bind/ContextFinder.java b/specs/java.xml.ws/src/main/java/javax/xml/bind/ContextFinder.java new file mode 100644 index 000..09b324d --- /dev/null +++ b/specs/java.xml.ws/src/main/java/javax/xml/bind/ContextFinder.java @@ -0,0 +1,520 @@ +/** + * 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. + */ +package javax.xml.bind; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.UnsupportedEncodingException; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.net.URL; +import java.util.Map; +import java.util.Properties; +import java.util.StringTokenizer; +import java.util.logging.ConsoleHandler; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.security.AccessController; +import java.security.PrivilegedAction; + +import static javax.xml.bind.JAXBContext.JAXB_CONTEXT_FACTORY; + +//import java.lang.reflect.InvocationTargetException; + +/** + * This class is package private and therefore is not exposed as part of the + * JAXB API. + * + * This code is designed to implement the JAXB 1.0 spec pluggability feature + * + * @author Ryan Shoemaker, Sun Microsystems, Inc. + * @see JAXBContext + */ +class ContextFinder { +private static final Logger logger; +static { +logger = Logger.getLogger("javax.xml.bind"); +try { +if (AccessController.doPrivileged(new GetPropertyAction("jaxb.debug")) != null) { +// disconnect the logger from a bigger framework (if any) +// and take the matters into our own hands +logger.setUseParentHandlers(false); +logger.setLevel(Level.ALL); +ConsoleHandler handler = new ConsoleHandler(); +handler.setLevel(Level.ALL); +logger.addHandler(handler); +} else { +// don't change the setting of this logger +// to honor what other frameworks +// have done on configurations. +} +} catch(Throwable t) { +// just to be extra safe. in particular System.getProperty may throw +// SecurityException. +} +} + +/** + * If the {@link InvocationTargetException} wraps an exception that shouldn't be wrapped, + * throw the wrapped exception. + */ +private static void handleInvocationTargetException(InvocationTargetException x) throws JAXBException { +Throwable t = x.getTargetException(); +if( t != null ) { +if( t instanceof JAXBException ) +// one of our exceptions, just re-throw +throw (JAXBException)t; +if( t instanceof RuntimeException ) +// avoid wrapping exceptions unnecessarily +throw (RuntimeException)t; +if( t instanceof Error ) +throw (Error)t; +} +} + + +/** + * Determine if two types (JAXBContext in this case) will generate a ClassCastException. + * + * For example, (targetType)originalType + * + * @param originalType + * The Class object of the type being cast + * @param targetType + * The Class object of the type that is being cast to + * @return JAXBException to be thrown. + */ +private static JAXBException handleClassCastException(Class originalType, Class targetType) { +final URL targetT
[karaf] branch master updated: [KARAF-5987]add a missed file
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 c4704bb [KARAF-5987]add a missed file c4704bb is described below commit c4704bb26bb77b46e1bd30f60c9740ef6ded0d6b Author: Freeman Fang AuthorDate: Thu Oct 25 16:28:26 2018 +0800 [KARAF-5987]add a missed file --- .../apache/karaf/jaas/boot/principal/Group.java| 64 ++ 1 file changed, 64 insertions(+) diff --git a/jaas/boot/src/main/java/org/apache/karaf/jaas/boot/principal/Group.java b/jaas/boot/src/main/java/org/apache/karaf/jaas/boot/principal/Group.java new file mode 100644 index 000..3152115 --- /dev/null +++ b/jaas/boot/src/main/java/org/apache/karaf/jaas/boot/principal/Group.java @@ -0,0 +1,64 @@ +/* + * Licensed 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. + * under the License. + */ +package org.apache.karaf.jaas.boot.principal; + +import java.security.Principal; +import java.util.Enumeration; + +public interface Group extends Principal { + +/** + * Adds the specified member to the group. + * + * @param user the principal to add to this group. + * + * @return true if the member was successfully added, + * false if the principal was already a member. + */ +boolean addMember(Principal user); + +/** + * Removes the specified member from the group. + * + * @param user the principal to remove from this group. + * + * @return true if the principal was removed, or + * false if the principal was not a member. + */ +boolean removeMember(Principal user); + +/** + * Returns true if the passed principal is a member of the group. + * This method does a recursive search, so if a principal belongs to a + * group which is a member of this group, true is returned. + * + * @param member the principal whose membership is to be checked. + * + * @return true if the principal is a member of this group, + * false otherwise. + */ +boolean isMember(Principal member); + + +/** + * Returns an enumeration of the members in the group. + * The returned objects can be instances of either Principal + * or Group (which is a subclass of Principal). + * + * @return an enumeration of the group members. + */ +Enumeration members(); + +}