incubator-tamaya-sandbox git commit: TAMAYA-297: Added tests using mocks instead of PAX.
Repository: incubator-tamaya-sandbox Updated Branches: refs/heads/java8 a8029f4ee -> d0e9a65ff TAMAYA-297: Added tests using mocks instead of PAX. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/commit/d0e9a65f Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/tree/d0e9a65f Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/diff/d0e9a65f Branch: refs/heads/java8 Commit: d0e9a65ff9c6eabf9d5106ad75498a6e596e932d Parents: a8029f4 Author: anatole Authored: Thu Sep 28 11:21:47 2017 +0200 Committer: anatole Committed: Thu Sep 28 11:21:47 2017 +0200 -- osgi/common/bnd.bnd | 3 +- osgi/common/pom.xml | 65 ++ .../apache/tamaya/osgi/commands/StringUtil.java | 2 +- .../apache/tamaya/osgi/AbstractOSGITest.java| 89 + .../org/apache/tamaya/osgi/OSGIBasicTests.java | 84 .../java/org/apache/tamaya/osgi/OSGITest.java | 127 --- .../tamaya/osgi/TamayaConfigPluginTest.java | 116 +++-- osgi/common/src/test/resources/arquillian.xml | 27 osgi/common/src/test/resources/felix.properties | 23 osgi/pom.xml| 53 +--- 10 files changed, 297 insertions(+), 292 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/d0e9a65f/osgi/common/bnd.bnd -- diff --git a/osgi/common/bnd.bnd b/osgi/common/bnd.bnd index af8e245..4731c08 100644 --- a/osgi/common/bnd.bnd +++ b/osgi/common/bnd.bnd @@ -30,5 +30,4 @@ Import-Package: \ org.apache.tamaya.spi,\ org.apache.tamaya.functions,\ org.apache.tamaya.spisupport -Export-Service: org.osgi.service.cm.ConfigurationPlugin,\ -org.apache.tamaya.osgi.TamayaConfigPlugin +Export-Service: org.apache.tamaya.osgi.TamayaConfigPlugin http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/d0e9a65f/osgi/common/pom.xml -- diff --git a/osgi/common/pom.xml b/osgi/common/pom.xml index fdcb7f3..fd4d8db 100644 --- a/osgi/common/pom.xml +++ b/osgi/common/pom.xml @@ -32,21 +32,29 @@ Apache Tamaya :: OSGi :: ConfigurationPlugin Tamaya Based OSGI ConfigurationPlugin Implementation + +1.5.0 +1.5.1 + +4.9.2 +2.5.2 +1.6.6 +1.9.5 +1.0 + + org.osgi org.osgi.core -provided org.osgi org.osgi.compendium -provided org.osgi org.osgi.util.tracker -provided @@ -83,53 +91,66 @@ junit junit + +org.mockito +mockito-core + - + org.ops4j.pax.exam -pax-exam-container-forked +pax-exam-container-karaf +${pax.exam.version} +test org.ops4j.pax.exam pax-exam-junit4 +${pax.exam.version} +test org.ops4j.pax.exam pax-exam-link-mvn +${pax.exam.version} +test org.ops4j.pax.url pax-url-aether +${pax.url.version} +test + + +org.ops4j.pax.tinybundles +tinybundles +2.1.1 +test org.apache.felix org.apache.felix.framework +5.6.8 +provided + + +org.apache.felix +org.apache.felix.configadmin +1.8.16 +provided ch.qos.logback logback-core +1.2.3 +test ch.qos.logback logback-classic +1.2.3 +test - -org.ops4j.pax.exam -pax-exam - - -org.ops4j.pax.exam -pax-exam-junit4 - - -org.ops4j.pax.url -pax-url-wrap - - -org.ops4j.pax.url -pax-url-reference - - http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/d0e9a65f/osgi/common/src/main/java/org/apache/tamaya/osgi/commands/StringUtil.java -- diff --git a/osgi/common/src/main/java/org/apache/tamaya/osgi/commands/String
[10/12] incubator-tamaya git commit: TAMAYA-304 - If no services came back, use the class's class loader to discover services.
TAMAYA-304 - If no services came back, use the class's class loader to discover services. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/commit/fe4302a2 Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/tree/fe4302a2 Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/diff/fe4302a2 Branch: refs/heads/master Commit: fe4302a2f715cddf5bcb6bf56775c12e9773ba6f Parents: ec4079d Author: John D. Ament Authored: Wed Sep 20 23:01:16 2017 -0400 Committer: Anatole Tresch Committed: Thu Sep 28 22:01:27 2017 +0200 -- .../org/apache/tamaya/core/internal/DefaultServiceContext.java | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/fe4302a2/code/core/src/main/java/org/apache/tamaya/core/internal/DefaultServiceContext.java -- diff --git a/code/core/src/main/java/org/apache/tamaya/core/internal/DefaultServiceContext.java b/code/core/src/main/java/org/apache/tamaya/core/internal/DefaultServiceContext.java index b4a059c..7146ccf 100644 --- a/code/core/src/main/java/org/apache/tamaya/core/internal/DefaultServiceContext.java +++ b/code/core/src/main/java/org/apache/tamaya/core/internal/DefaultServiceContext.java @@ -20,7 +20,6 @@ package org.apache.tamaya.core.internal; import org.apache.tamaya.ConfigException; import org.apache.tamaya.spi.ServiceContext; -import org.osgi.service.component.annotations.Component; import javax.annotation.Priority; import java.io.IOException; @@ -96,6 +95,11 @@ public final class DefaultServiceContext implements ServiceContext { for (T t : ServiceLoader.load(serviceType)) { services.add(t); } +if(services.isEmpty()) { +for (T t : ServiceLoader.load(serviceType, serviceType.getClassLoader())) { +services.add(t); +} +} Collections.sort(services, PriorityServiceComparator.getInstance()); services = Collections.unmodifiableList(services); } catch (ServiceConfigurationError e) {
[12/12] incubator-tamaya git commit: TAMAYA-311: Removed logging for loaded SPI.
TAMAYA-311: Removed logging for loaded SPI. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/commit/7d2b5a87 Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/tree/7d2b5a87 Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/diff/7d2b5a87 Branch: refs/heads/master Commit: 7d2b5a8731e744a9c07fc84387f4a61c8638c16b Parents: cdc74d7 Author: anatole Authored: Sun Sep 24 21:29:40 2017 +0200 Committer: Anatole Tresch Committed: Thu Sep 28 22:01:29 2017 +0200 -- .../src/main/java/org/apache/tamaya/ConfigurationProvider.java| 3 --- 1 file changed, 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/7d2b5a87/code/api/src/main/java/org/apache/tamaya/ConfigurationProvider.java -- diff --git a/code/api/src/main/java/org/apache/tamaya/ConfigurationProvider.java b/code/api/src/main/java/org/apache/tamaya/ConfigurationProvider.java index 38af74e..564d5a1 100644 --- a/code/api/src/main/java/org/apache/tamaya/ConfigurationProvider.java +++ b/code/api/src/main/java/org/apache/tamaya/ConfigurationProvider.java @@ -38,7 +38,6 @@ public final class ConfigurationProvider { if(spi==null){ throw new IllegalStateException("ConfigurationProviderSpi not available."); } -LOG.info("TAMAYA Loaded ConfigurationProviderSpi: " + spi.getClass().getName()); return spi; } @@ -62,7 +61,6 @@ public final class ConfigurationProvider { * @return a new Configuration instance, never {@code null}. */ public static Configuration createConfiguration(ConfigurationContext context) { -// todo obf if (1==1) throw new RuntimeException("No tests written."); return spi().createConfiguration(context); } @@ -106,7 +104,6 @@ public final class ConfigurationProvider { * applying a new Configuration. */ public static void setConfiguration(Configuration config) { -// todo obf if (1==1) throw new RuntimeException("No tests written."); LOG.info("TAMAYA Applying new Configuration: " + config); spi().setConfiguration(config); }
[09/12] incubator-tamaya git commit: TAMAYA-274: Fixed basic service loading in OSGI. Added missing requirements.
TAMAYA-274: Fixed basic service loading in OSGI. Added missing requirements. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/commit/ec4079dc Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/tree/ec4079dc Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/diff/ec4079dc Branch: refs/heads/master Commit: ec4079dc3205c3825e6287be8d17013b91ade8e0 Parents: 48af147 Author: anatole Authored: Sun Sep 17 01:51:20 2017 +0200 Committer: Anatole Tresch Committed: Thu Sep 28 22:01:27 2017 +0200 -- .../tamaya/core/internal/OSGIServiceLoader.java | 96 +--- .../examples/minimal/TestConfigProvider.java| 49 ++ 2 files changed, 110 insertions(+), 35 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/ec4079dc/code/core/src/main/java/org/apache/tamaya/core/internal/OSGIServiceLoader.java -- diff --git a/code/core/src/main/java/org/apache/tamaya/core/internal/OSGIServiceLoader.java b/code/core/src/main/java/org/apache/tamaya/core/internal/OSGIServiceLoader.java index 4c12df9..0854b0d 100644 --- a/code/core/src/main/java/org/apache/tamaya/core/internal/OSGIServiceLoader.java +++ b/code/core/src/main/java/org/apache/tamaya/core/internal/OSGIServiceLoader.java @@ -48,6 +48,13 @@ public class OSGIServiceLoader implements BundleListener { public OSGIServiceLoader(BundleContext context){ this.context = Objects.requireNonNull(context); +// Check for matching bundles already installed... +for(Bundle bundle:context.getBundles()){ +switch(bundle.getState()){ +case Bundle.ACTIVE: +checkAndLoadBundle(bundle); +} +} } public BundleContext getBundleContext(){ @@ -62,38 +69,46 @@ public class OSGIServiceLoader implements BundleListener { @Override public void bundleChanged(BundleEvent bundleEvent) { -// Parse and create metadata on STARTING -if (bundleEvent.getType() == BundleEvent.STARTING) { +// Parse and create metadata when installed +if (bundleEvent.getType() == BundleEvent.STARTED) { Bundle bundle = bundleEvent.getBundle(); -if (bundle.getEntry(META_INF_SERVICES) == null) { -return; -} -synchronized (resourceBundles){ -resourceBundles.add(bundle); -log.info("Registered ServiceLoader bundle: " + bundle.getSymbolicName()); -} -Enumeration entryPaths = bundle.getEntryPaths("META-INF/services/"); -while (entryPaths.hasMoreElements()) { -String entryPath = entryPaths.nextElement(); -if(!entryPath.endsWith("/")) { -processEntryPath(bundle, entryPath); -} -} -} else if (bundleEvent.getType() == BundleEvent.STOPPING) { +checkAndLoadBundle(bundle); +} else if (bundleEvent.getType() == BundleEvent.STOPPED) { Bundle bundle = bundleEvent.getBundle(); -if (bundle.getEntry(META_INF_SERVICES) == null) { -return; -} -synchronized (resourceBundles) { -resourceBundles.remove(bundle); -log.finest("Unregistered ServiceLoader bundle: " + bundle.getSymbolicName()); +checkAndUnloadBundle(bundle); +} +} + +private void checkAndUnloadBundle(Bundle bundle) { +if (bundle.getEntry(META_INF_SERVICES) == null) { +return; +} +synchronized (resourceBundles) { +resourceBundles.remove(bundle); +log.fine("Unregistered ServiceLoader bundle: " + bundle.getSymbolicName()); +} +Enumeration entryPaths = bundle.getEntryPaths("META-INF/services/"); +while (entryPaths.hasMoreElements()) { +String entryPath = entryPaths.nextElement(); +if(!entryPath.endsWith("/")) { +removeEntryPath(bundle, entryPath); } -Enumeration entryPaths = bundle.getEntryPaths("META-INF/services/"); -while (entryPaths.hasMoreElements()) { -String entryPath = entryPaths.nextElement(); -if(!entryPath.endsWith("/")) { -removeEntryPath(bundle, entryPath); -} +} +} + +private void checkAndLoadBundle(Bundle bundle) { +if (bundle.getEntry(META_INF_SERVICES) == null) { +return; +} +synchronized (resourceBundles){ +resourceBundles.add(bundle); +log.info("Registered ServiceLoader bundle: " + bundle.getSymbolicName()); +
[06/12] incubator-tamaya git commit: TAMAYA-260: Added on/off on Boolean conversion. Fixed minor issue in value evaluation.
TAMAYA-260: Added on/off on Boolean conversion. Fixed minor issue in value evaluation. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/commit/3bcb1696 Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/tree/3bcb1696 Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/diff/3bcb1696 Branch: refs/heads/master Commit: 3bcb1696cfac5e00d53de5d6f256fe0272ec9c77 Parents: e8a6386 Author: anatole Authored: Mon Aug 14 01:39:43 2017 +0200 Committer: Anatole Tresch Committed: Thu Sep 28 21:52:14 2017 +0200 -- .../apache/tamaya/core/internal/DefaultConfigValueEvaluator.java | 2 +- .../java/org/apache/tamaya/core/internal/DefaultConfiguration.java | 2 +- .../apache/tamaya/core/internal/converters/BooleanConverter.java | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/3bcb1696/code/core/src/main/java/org/apache/tamaya/core/internal/DefaultConfigValueEvaluator.java -- diff --git a/code/core/src/main/java/org/apache/tamaya/core/internal/DefaultConfigValueEvaluator.java b/code/core/src/main/java/org/apache/tamaya/core/internal/DefaultConfigValueEvaluator.java index f3b30a3..332df89 100644 --- a/code/core/src/main/java/org/apache/tamaya/core/internal/DefaultConfigValueEvaluator.java +++ b/code/core/src/main/java/org/apache/tamaya/core/internal/DefaultConfigValueEvaluator.java @@ -42,7 +42,7 @@ public class DefaultConfigValueEvaluator implements ConfigValueEvaluator{ collect(unfilteredValue, key, propertySource); } if(unfilteredValue==null || unfilteredValue.getValue()==null){ -return unfilteredValue; +return null; } return unfilteredValue; } http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/3bcb1696/code/core/src/main/java/org/apache/tamaya/core/internal/DefaultConfiguration.java -- diff --git a/code/core/src/main/java/org/apache/tamaya/core/internal/DefaultConfiguration.java b/code/core/src/main/java/org/apache/tamaya/core/internal/DefaultConfiguration.java index 54cd186..c768a4c 100644 --- a/code/core/src/main/java/org/apache/tamaya/core/internal/DefaultConfiguration.java +++ b/code/core/src/main/java/org/apache/tamaya/core/internal/DefaultConfiguration.java @@ -81,7 +81,7 @@ public class DefaultConfiguration implements Configuration { Objects.requireNonNull(key, "Key must not be null."); PropertyValue value = configEvaluator.evaluteRawValue(key, configurationContext); -if(value==null || value.getValue()==null){ +if(value==null){ return null; } value = PropertyFiltering.applyFilter(value, configurationContext); http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/3bcb1696/code/core/src/main/java/org/apache/tamaya/core/internal/converters/BooleanConverter.java -- diff --git a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/BooleanConverter.java b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/BooleanConverter.java index 61c182b..0d14fc1 100644 --- a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/BooleanConverter.java +++ b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/BooleanConverter.java @@ -44,12 +44,14 @@ public class BooleanConverter implements PropertyConverter { case "y": case "true": case "t": +case "on": return Boolean.TRUE; case "no": case "n": case "false": case "f": case "0": +case "off": return Boolean.FALSE; default: LOG.finest("Unknown boolean value encountered: " + value);
[02/12] incubator-tamaya git commit: TAMAYA-274: Simplified compiler settings, set version to 0.4-incubating-SNAPSHOT
TAMAYA-274: Simplified compiler settings, set version to 0.4-incubating-SNAPSHOT Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/commit/2c4ecc32 Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/tree/2c4ecc32 Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/diff/2c4ecc32 Branch: refs/heads/master Commit: 2c4ecc329757207f14e0bdaaa4af1bd5a8a99dfb Parents: 2278346 Author: anatole Authored: Wed Aug 9 00:22:29 2017 +0200 Committer: Anatole Tresch Committed: Thu Sep 28 21:52:11 2017 +0200 -- examples/11-distributed/pom.xml | 5 ++--- pom.xml | 11 +-- 2 files changed, 7 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/2c4ecc32/examples/11-distributed/pom.xml -- diff --git a/examples/11-distributed/pom.xml b/examples/11-distributed/pom.xml index 72e5ac1..0f0bfe9 100644 --- a/examples/11-distributed/pom.xml +++ b/examples/11-distributed/pom.xml @@ -31,9 +31,8 @@ jar -1.8 -${jdkVersion} -${jdkVersion} +1.8 +1.8 false true 0.3-incubating-SNAPSHOT http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/2c4ecc32/pom.xml -- diff --git a/pom.xml b/pom.xml index affc2d5..cd8eda3 100644 --- a/pom.xml +++ b/pom.xml @@ -35,11 +35,10 @@ 2.5 false -1.8 5.0.0 ${osgi.version} -${jdkVersion} -${jdkVersion} +1.8 +1.8 false true false @@ -423,9 +422,9 @@ 3.6.0 true -${maven.compile.optimize} ${maven.compile.sourceLevel} ${maven.compile.targetLevel} +${maven.compile.optimize} ${project.build.sourceEncoding} ${maven.compile.deprecation} @@ -722,8 +721,8 @@ org.apache.maven.plugins maven-compiler-plugin -1.7 -1.7 +${maven.compile.sourceLevel} +${maven.compile.targetLevel}
[08/12] incubator-tamaya git commit: TAMAYA-274: Added default implementations for deprecated methods.
TAMAYA-274: Added default implementations for deprecated methods. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/commit/48af147a Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/tree/48af147a Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/diff/48af147a Branch: refs/heads/master Commit: 48af147a8decac2a2988cdb4d29388c26ef625dc Parents: 4872a50 Author: anatole Authored: Sun Sep 10 22:29:45 2017 +0200 Committer: Anatole Tresch Committed: Thu Sep 28 22:01:26 2017 +0200 -- .../org/apache/tamaya/spi/ConfigurationProviderSpi.java | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/48af147a/code/api/src/main/java/org/apache/tamaya/spi/ConfigurationProviderSpi.java -- diff --git a/code/api/src/main/java/org/apache/tamaya/spi/ConfigurationProviderSpi.java b/code/api/src/main/java/org/apache/tamaya/spi/ConfigurationProviderSpi.java index 63f09e9..b69bef6 100644 --- a/code/api/src/main/java/org/apache/tamaya/spi/ConfigurationProviderSpi.java +++ b/code/api/src/main/java/org/apache/tamaya/spi/ConfigurationProviderSpi.java @@ -79,7 +79,9 @@ public interface ConfigurationProviderSpi { * @deprecated Will be removed in favour of {@link Configuration#getContext()}. */ @Deprecated -ConfigurationContext getConfigurationContext(); +default ConfigurationContext getConfigurationContext(){ +return getConfiguration().getContext(); +} /** * This method allows to replace the current {@link org.apache.tamaya.spi.ConfigurationContext} with a new @@ -93,7 +95,9 @@ public interface ConfigurationProviderSpi { * @deprecated use {@link #setConfiguration(Configuration)} */ @Deprecated -void setConfigurationContext(ConfigurationContext context); +default void setConfigurationContext(ConfigurationContext context){ +setConfiguration(createConfiguration(context)); +} /** * Method that allows to determine if a new {@link org.apache.tamaya.spi.ConfigurationContext} can be applied @@ -105,7 +109,9 @@ public interface ConfigurationProviderSpi { * @deprecated use {@link #isConfigurationSettable()} */ @Deprecated -boolean isConfigurationContextSettable(); +default boolean isConfigurationContextSettable(){ +return isConfigurationSettable(); +} }
[05/12] incubator-tamaya git commit: TAMAYA-260: Fixed CDI issues regarding MP integration.
TAMAYA-260: Fixed CDI issues regarding MP integration. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/commit/e8a6386b Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/tree/e8a6386b Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/diff/e8a6386b Branch: refs/heads/master Commit: e8a6386b2d3265f1cd8c0efb17e70fbc52a20f28 Parents: aea69a7 Author: anatole Authored: Sun Aug 13 01:27:48 2017 +0200 Committer: Anatole Tresch Committed: Thu Sep 28 21:52:13 2017 +0200 -- .../tamaya/core/internal/converters/OptionalConverter.java| 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/e8a6386b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/OptionalConverter.java -- diff --git a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/OptionalConverter.java b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/OptionalConverter.java index 69595ac..e05e645 100644 --- a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/OptionalConverter.java +++ b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/OptionalConverter.java @@ -23,6 +23,7 @@ import org.apache.tamaya.core.internal.PropertyConverterManager; import org.apache.tamaya.spi.ConversionContext; import org.apache.tamaya.spi.PropertyConverter; +import java.lang.reflect.Type; import java.util.Locale; import java.util.Objects; import java.util.Optional; @@ -39,8 +40,12 @@ public class OptionalConverter implements PropertyConverter { public Optional convert(String value, ConversionContext context) { TypeLiteral target = (TypeLiteral)context.getTargetType(); Object result = null; +Type targetType = TypeLiteral.getTypeParameters(target.getType())[0]; +if(String.class.equals(targetType)){ +result = value; +} for(PropertyConverter pv:context.getConfigurationContext().getPropertyConverters( -TypeLiteral.of(target.getType({ +TypeLiteral.of(targetType))){ result = pv.convert(value, context); if(result!=null){ return Optional.of(result);
[04/12] incubator-tamaya git commit: TAMAYA-274: Moved to Java 8, added missing converters.
TAMAYA-274: Moved to Java 8, added missing converters. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/commit/aea69a75 Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/tree/aea69a75 Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/diff/aea69a75 Branch: refs/heads/master Commit: aea69a75ec5303ee1eddda69e68fc75f012d584d Parents: 2c4ecc3 Author: anatole Authored: Wed Aug 9 00:22:59 2017 +0200 Committer: Anatole Tresch Committed: Thu Sep 28 21:52:12 2017 +0200 -- .../internal/converters/BooleanConverter.java | 4 +- .../internal/converters/InstantConverter.java | 49 .../internal/converters/OptionalConverter.java | 61 .../org.apache.tamaya.spi.PropertyConverter | 2 + 4 files changed, 115 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/aea69a75/code/core/src/main/java/org/apache/tamaya/core/internal/converters/BooleanConverter.java -- diff --git a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/BooleanConverter.java b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/BooleanConverter.java index d926b14..61c182b 100644 --- a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/BooleanConverter.java +++ b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/BooleanConverter.java @@ -34,11 +34,12 @@ public class BooleanConverter implements PropertyConverter { @Override public Boolean convert(String value, ConversionContext context) { -context.addSupportedFormats(getClass(), "yes (ignore case)", "y (ignore case)", "true (ignore case)", "t (ignore case)", "no (ignore case)", "n (ignore case)", "false (ignore case)", "f (ignore case)"); +context.addSupportedFormats(getClass(), "yes (ignore case)", "y (ignore case)", "true (ignore case)", "t (ignore case)", "1", "no (ignore case)", "n (ignore case)", "false (ignore case)", "f (ignore case)", "0"); String ignoreCaseValue = Objects.requireNonNull(value) .trim() .toLowerCase(Locale.ENGLISH); switch(ignoreCaseValue) { +case "1": case "yes": case "y": case "true": @@ -48,6 +49,7 @@ public class BooleanConverter implements PropertyConverter { case "n": case "false": case "f": +case "0": return Boolean.FALSE; default: LOG.finest("Unknown boolean value encountered: " + value); http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/aea69a75/code/core/src/main/java/org/apache/tamaya/core/internal/converters/InstantConverter.java -- diff --git a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/InstantConverter.java b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/InstantConverter.java new file mode 100644 index 000..c0f2bf0 --- /dev/null +++ b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/InstantConverter.java @@ -0,0 +1,49 @@ +/* + * 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.tamaya.core.internal.converters; + +import org.apache.tamaya.spi.ConversionContext; +import org.apache.tamaya.spi.PropertyConverter; + +import java.time.Instant; +import java.util.logging.Logger; + +/** + * Converter, converting from String to Boolean. + */ +public class InstantConverter implements PropertyConverter { + +private final Logger LOG = Logger.getLogger(getClass().getName()); + +@Override +public Instant convert(String value, ConversionContext context) { +context.addSupportedFormats(getClass(), Instant.now().toString()); +return Instant.parse(value); +} + +@Override +public boole
[01/12] incubator-tamaya git commit: TAMAYA-274: Moved to Java 8, set version to 0.4-incubating-SNAPSHOT
Repository: incubator-tamaya Updated Branches: refs/heads/master 0852f7fe5 -> 7d2b5a873 TAMAYA-274: Moved to Java 8, set version to 0.4-incubating-SNAPSHOT Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/commit/bbfee921 Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/tree/bbfee921 Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/diff/bbfee921 Branch: refs/heads/master Commit: bbfee921054c574e6e3d8c41cef6c48cc986e7e6 Parents: 0852f7f Author: anatole Authored: Tue Aug 8 21:44:51 2017 +0200 Committer: Anatole Tresch Committed: Thu Sep 28 21:52:10 2017 +0200 -- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/bbfee921/pom.xml -- diff --git a/pom.xml b/pom.xml index 9d18024..affc2d5 100644 --- a/pom.xml +++ b/pom.xml @@ -35,7 +35,7 @@ 2.5 false -1.7 +1.8 5.0.0 ${osgi.version} ${jdkVersion}
[11/12] incubator-tamaya git commit: TAMAYA-297: Removed unused ServiceTracker.
TAMAYA-297: Removed unused ServiceTracker. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/commit/cdc74d72 Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/tree/cdc74d72 Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/diff/cdc74d72 Branch: refs/heads/master Commit: cdc74d72877fa5a8012160e7fe6d47a0d7cc2cee Parents: fe4302a Author: anatole Authored: Tue Sep 19 22:07:01 2017 +0200 Committer: Anatole Tresch Committed: Thu Sep 28 22:01:28 2017 +0200 -- .../java/org/apache/tamaya/core/internal/OSGIServiceLoader.java| 2 -- 1 file changed, 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cdc74d72/code/core/src/main/java/org/apache/tamaya/core/internal/OSGIServiceLoader.java -- diff --git a/code/core/src/main/java/org/apache/tamaya/core/internal/OSGIServiceLoader.java b/code/core/src/main/java/org/apache/tamaya/core/internal/OSGIServiceLoader.java index 0854b0d..dae7bea 100644 --- a/code/core/src/main/java/org/apache/tamaya/core/internal/OSGIServiceLoader.java +++ b/code/core/src/main/java/org/apache/tamaya/core/internal/OSGIServiceLoader.java @@ -42,8 +42,6 @@ public class OSGIServiceLoader implements BundleListener { private BundleContext context; -private Map> services = new ConcurrentHashMap<>(); - private Set resourceBundles = Collections.synchronizedSet(new HashSet()); public OSGIServiceLoader(BundleContext context){
[07/12] incubator-tamaya git commit: Merged conflicts.
Merged conflicts. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/commit/4872a508 Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/tree/4872a508 Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/diff/4872a508 Branch: refs/heads/master Commit: 4872a5082806eedfefdc57c984e5f75d6999cff6 Parents: 3bcb169 Author: Anatole Tresch Authored: Thu Sep 28 22:01:18 2017 +0200 Committer: Anatole Tresch Committed: Thu Sep 28 22:01:18 2017 +0200 -- code/api/bnd.bnd| 22 +- code/api/pom.xml| 7 +++ .../java/org/apache/tamaya/package-info.java| 24 ++ .../org/apache/tamaya/spi/package-info.java | 24 ++ code/core/bnd.bnd | 40 +++-- code/core/pom.xml | 8 +++- .../org/apache/tamaya/core/OSGIActivator.java | 4 +- .../internal/DefaultConfigValueEvaluator.java | 2 + .../core/internal/DefaultConfiguration.java | 2 + .../DefaultConfigurationContextBuilder.java | 2 + .../internal/DefaultConfigurationProvider.java | 2 + .../core/internal/DefaultServiceContext.java| 1 + .../core/internal/OSGIServiceContext.java | 13 -- .../tamaya/core/internal/OSGIServiceLoader.java | 37 +--- .../converters/BigDecimalConverter.java | 5 ++- .../converters/BigIntegerConverter.java | 2 + .../internal/converters/BooleanConverter.java | 2 + .../core/internal/converters/ByteConverter.java | 2 + .../core/internal/converters/CharConverter.java | 2 + .../internal/converters/ClassConverter.java | 2 + .../internal/converters/CurrencyConverter.java | 2 + .../internal/converters/DoubleConverter.java| 2 + .../internal/converters/DurationConverter.java | 2 + .../core/internal/converters/EnumConverter.java | 2 + .../core/internal/converters/FileConverter.java | 2 + .../internal/converters/FloatConverter.java | 2 + .../internal/converters/InstantConverter.java | 2 + .../internal/converters/IntegerConverter.java | 2 + .../internal/converters/LocalDateConverter.java | 2 + .../converters/LocalDateTimeConverter.java | 2 + .../internal/converters/LocalTimeConverter.java | 2 + .../core/internal/converters/LongConverter.java | 2 + .../internal/converters/NumberConverter.java| 2 + .../converters/OffsetDateTimeConverter.java | 2 + .../converters/OffsetTimeConverter.java | 2 + .../internal/converters/OptionalConverter.java | 2 + .../core/internal/converters/PathConverter.java | 2 + .../internal/converters/ShortConverter.java | 2 + .../core/internal/converters/URIConverter.java | 2 + .../core/internal/converters/URLConverter.java | 2 + .../core/internal/converters/package-info.java | 23 ++ .../tamaya/core/internal/package-info.java | 25 +++ .../org/apache/tamaya/core/package-info.java| 24 ++ .../core/propertysource/CLIPropertySource.java | 5 ++- .../EnvironmentPropertySource.java | 2 + .../JavaConfigurationPropertySource.java| 2 + .../propertysource/SystemPropertySource.java| 3 ++ .../core/propertysource/package-info.java | 23 ++ pom.xml | 46 +++- 49 files changed, 355 insertions(+), 41 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/4872a508/code/api/bnd.bnd -- diff --git a/code/api/bnd.bnd b/code/api/bnd.bnd index 7ca7687..b606a72 100644 --- a/code/api/bnd.bnd +++ b/code/api/bnd.bnd @@ -1,4 +1,24 @@ +-buildpath: \ + osgi.annotation; version=6.0.0,\ + osgi.core; version=6.0,\ + osgi.cmpn; version=6.0 + +-testpath: \ + ${junit} + +javac.source: 1.8 +javac.target: 1.8 + +Bundle-Version: ${version}.${tstamp} +Bundle-SymbolicName: org.apache.tamaya +Bundle-Name: Apache Tamaya - API +Bundle-Description: Apacha Tamaya Configuration Java API +Bundle-Category: API +Bundle-Copyright: (C) Apache Foundation +Bundle-License: Apache Licence version 2 +Bundle-Vendor: Apache Software Foundation +Bundle-ContactAddress: dev-tam...@incubator.apache.org +Bundle-DocURL: http://tamaya.apache.org Export-Package: \ org.apache.tamaya,\ org.apache.tamaya.spi -Bundle-SymbolicName: org.apache.tamaya \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/4872a508/code/api/pom.xml -- diff --git a/code/api/pom.xml b/code/api/pom.xml index d37ba4a..cccaae2 100644 --- a/code/api/pom.xml +++ b/code/api/pom.xml @@ -33,6 +33,7 @@ under the License.
[03/12] incubator-tamaya git commit: TAMAYA-274: Moved to Java 8, added @FunctionalInterface annotations and java.time converters.
TAMAYA-274: Moved to Java 8, added @FunctionalInterface annotations and java.time converters. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/commit/2278346a Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/tree/2278346a Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/diff/2278346a Branch: refs/heads/master Commit: 2278346a684cf6ef8dd12c8d4edef7631d45feaf Parents: bbfee92 Author: anatole Authored: Tue Aug 8 21:45:49 2017 +0200 Committer: Anatole Tresch Committed: Thu Sep 28 21:52:11 2017 +0200 -- .../java/org/apache/tamaya/ConfigOperator.java | 1 + .../java/org/apache/tamaya/ConfigQuery.java | 1 + .../apache/tamaya/spi/PropertyConverter.java| 3 ++ .../org/apache/tamaya/spi/PropertyFilter.java | 1 + .../tamaya/spi/PropertySourceProvider.java | 1 + .../org/apache/tamaya/spi/PropertyValue.java| 3 +- .../org/apache/tamaya/spi/ServiceContext.java | 3 +- .../DefaultConfigurationContextBuilder.java | 1 + .../core/internal/PropertySourceComparator.java | 2 +- .../internal/converters/DurationConverter.java | 51 .../internal/converters/LocalDateConverter.java | 49 +++ .../converters/LocalDateTimeConverter.java | 49 +++ .../internal/converters/LocalTimeConverter.java | 49 +++ .../converters/OffsetDateTimeConverter.java | 50 +++ .../converters/OffsetTimeConverter.java | 50 +++ .../org.apache.tamaya.spi.PropertyConverter | 6 +++ 16 files changed, 316 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/2278346a/code/api/src/main/java/org/apache/tamaya/ConfigOperator.java -- diff --git a/code/api/src/main/java/org/apache/tamaya/ConfigOperator.java b/code/api/src/main/java/org/apache/tamaya/ConfigOperator.java index 2144218..b14c155 100644 --- a/code/api/src/main/java/org/apache/tamaya/ConfigOperator.java +++ b/code/api/src/main/java/org/apache/tamaya/ConfigOperator.java @@ -23,6 +23,7 @@ package org.apache.tamaya; * to modell additional functionality and applying it to a given {@link org.apache.tamaya.Configuration} instance by calling * the {@link org.apache.tamaya.Configuration#with(org.apache.tamaya.ConfigOperator)} method. */ +@FunctionalInterface public interface ConfigOperator { /** http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/2278346a/code/api/src/main/java/org/apache/tamaya/ConfigQuery.java -- diff --git a/code/api/src/main/java/org/apache/tamaya/ConfigQuery.java b/code/api/src/main/java/org/apache/tamaya/ConfigQuery.java index 60e87bb..28b8b93 100644 --- a/code/api/src/main/java/org/apache/tamaya/ConfigQuery.java +++ b/code/api/src/main/java/org/apache/tamaya/ConfigQuery.java @@ -23,6 +23,7 @@ package org.apache.tamaya; * to model additional functionality and applying it to a given {@link Configuration} instance by * calling the {@link Configuration#query(ConfigQuery)} method. */ +@FunctionalInterface public interface ConfigQuery { /** http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/2278346a/code/api/src/main/java/org/apache/tamaya/spi/PropertyConverter.java -- diff --git a/code/api/src/main/java/org/apache/tamaya/spi/PropertyConverter.java b/code/api/src/main/java/org/apache/tamaya/spi/PropertyConverter.java index ef6e2ac..56ac5e6 100644 --- a/code/api/src/main/java/org/apache/tamaya/spi/PropertyConverter.java +++ b/code/api/src/main/java/org/apache/tamaya/spi/PropertyConverter.java @@ -19,6 +19,8 @@ package org.apache.tamaya.spi; +import jdk.nashorn.internal.objects.annotations.Function; + /** * Interface for an property that converts a configured String into something else. * This is used for implementing type conversion from a property (String) to a certain target @@ -26,6 +28,7 @@ package org.apache.tamaya.spi; * * @param the type of the type literal */ +@FunctionalInterface public interface PropertyConverter{ /** http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/2278346a/code/api/src/main/java/org/apache/tamaya/spi/PropertyFilter.java -- diff --git a/code/api/src/main/java/org/apache/tamaya/spi/PropertyFilter.java b/code/api/src/main/java/org/apache/tamaya/spi/PropertyFilter.java index 350bd73..3054496 100644 --- a/code/api/src/main/java/org/apache/tamaya/spi/PropertyFilter.java +++ b/code/api/src/main/java/org/apache/tamaya/spi/PropertyFilter.java @@ -25,6 +25,7 @@ p
[14/14] incubator-tamaya-extensions git commit: Merge branch 'java8'
Merge branch 'java8' Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/commit/a9552da3 Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/tree/a9552da3 Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/diff/a9552da3 Branch: refs/heads/master Commit: a9552da35cfa48ffbb21f77f7a77fa9df7142d98 Parents: 2d32caa bcede48 Author: Anatole Tresch Authored: Thu Sep 28 22:05:54 2017 +0200 Committer: Anatole Tresch Committed: Thu Sep 28 22:05:54 2017 +0200 -- modules/events/bnd.bnd | 34 ++- modules/events/pom.xml | 10 ++-- .../tamaya/events/ConfigEventListener.java | 1 + .../events/ConfigurationChangeBuilder.java | 26 - .../tamaya/events/FrozenConfiguration.java | 2 +- .../internal/DefaultConfigChangeObserver.java | 15 ++--- .../internal/DefaultConfigEventManagerSpi.java | 2 + .../events/internal/LoggingConfigListener.java | 2 + .../tamaya/events/ConfigurationChangeTest.java | 1 + modules/features/bnd.bnd| 24 +++- modules/features/pom.xml| 4 -- modules/filter/bnd.bnd | 27 - modules/filter/pom.xml | 15 +++-- .../tamaya/filter/ConfigurationFilter.java | 2 + modules/formats/base/bnd.bnd| 27 - modules/formats/base/pom.xml| 4 -- .../format/formats/IniConfigurationFormat.java | 2 + .../tamaya/format/formats/PropertiesFormat.java | 2 + .../format/formats/PropertiesXmlFormat.java | 2 + modules/formats/json/bnd.bnd| 29 +- modules/formats/json/pom.xml| 4 -- modules/formats/yaml/bnd.bnd| 28 +- modules/formats/yaml/pom.xml| 1 - modules/functions/bnd.bnd | 25 - modules/functions/pom.xml | 4 -- .../org/apache/tamaya/functions/KeyMapper.java | 2 +- .../org/apache/tamaya/functions/Predicate.java | 13 + .../tamaya/functions/PropertyMatcher.java | 2 +- .../org/apache/tamaya/functions/Supplier.java | 10 +--- modules/injection/cdi/bnd.bnd | 33 ++- modules/injection/injection-api/bnd.bnd | 26 - modules/injection/injection-api/pom.xml | 1 - .../org/apache/tamaya/inject/api/Config.java| 15 ++--- .../tamaya/inject/spi/BaseDynamicValue.java | 2 +- modules/injection/standalone/bnd.bnd| 29 +- modules/injection/standalone/pom.xml| 9 +-- .../internal/DefaultConfigurationInjector.java | 2 + modules/jndi/bnd.bnd| 29 -- modules/jndi/pom.xml| 9 +-- .../apache/tamaya/jndi/JNDIPropertySource.java | 2 + modules/mutable-config/bnd.bnd | 33 ++- modules/mutable-config/pom.xml | 9 +-- .../mutableconfig/ChangePropagationPolicy.java | 1 + .../internal/DefaultMutableConfiguration.java | 2 + .../DefaultMutableConfigurationSpi.java | 2 + modules/optional/bnd.bnd| 22 +++- modules/optional/pom.xml| 4 -- .../apache/tamaya/optional/ValueProvider.java | 1 + modules/resolver/bnd.bnd| 31 +- modules/resolver/pom.xml| 4 -- modules/resources/bnd.bnd | 30 +- modules/resources/pom.xml | 9 +-- .../apache/tamaya/resource/ResourceLocator.java | 1 + .../internal/ClassPathResourceLocator.java | 2 + .../internal/DefaultResourceResolver.java | 2 + .../resource/internal/FileResourceLocator.java | 2 + .../resource/internal/PathResourceLocator.java | 2 + .../resource/internal/URLResourceLocator.java | 2 + modules/spi-support/bnd.bnd | 25 - modules/spi-support/pom.xml | 4 -- .../DefaultConfigurationContextBuilder.java | 3 +- .../spisupport/PropertySourceComparator.java| 59 +++- .../tamaya/spisupport/SystemPropertySource.java | 22 modules/spring/bnd.bnd | 25 - pom.xml | 9 ++- 65 files changed, 604 insertions(+), 179 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/a9552da3/modules/injection/injection-api/pom.xml -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/a9552da3/pom.xml --
[01/14] incubator-tamaya-extensions git commit: TAMAYA-274: Moved to Java 8.
Repository: incubator-tamaya-extensions Updated Branches: refs/heads/master 2d32caaa7 -> a9552da35 TAMAYA-274: Moved to Java 8. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/commit/6fdd34c7 Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/tree/6fdd34c7 Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/diff/6fdd34c7 Branch: refs/heads/master Commit: 6fdd34c759fb9dae915438b9fc9a75f93d131d1e Parents: 46beb9a Author: anatole Authored: Mon Aug 7 17:34:25 2017 +0200 Committer: anatole Committed: Mon Aug 7 17:34:25 2017 +0200 -- .../org/apache/tamaya/events/ConfigEventListener.java | 1 + .../java/org/apache/tamaya/functions/KeyMapper.java| 2 +- .../java/org/apache/tamaya/functions/Predicate.java| 13 ++--- .../org/apache/tamaya/functions/PropertyMatcher.java | 2 +- .../java/org/apache/tamaya/functions/Supplier.java | 10 ++ .../tamaya/mutableconfig/ChangePropagationPolicy.java | 1 + .../java/org/apache/tamaya/optional/ValueProvider.java | 1 + .../org/apache/tamaya/resource/ResourceLocator.java| 1 + .../spisupport/DefaultConfigurationContextBuilder.java | 3 ++- pom.xml| 2 +- 10 files changed, 13 insertions(+), 23 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/6fdd34c7/modules/events/src/main/java/org/apache/tamaya/events/ConfigEventListener.java -- diff --git a/modules/events/src/main/java/org/apache/tamaya/events/ConfigEventListener.java b/modules/events/src/main/java/org/apache/tamaya/events/ConfigEventListener.java index 7fb32c8..fd08191 100644 --- a/modules/events/src/main/java/org/apache/tamaya/events/ConfigEventListener.java +++ b/modules/events/src/main/java/org/apache/tamaya/events/ConfigEventListener.java @@ -21,6 +21,7 @@ package org.apache.tamaya.events; /** * Interface to be implemented for listening on changes on {@link org.apache.tamaya.Configuration} instances. */ +@FunctionalInterface public interface ConfigEventListener { /** * Called if an event occurred. http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/6fdd34c7/modules/functions/src/main/java/org/apache/tamaya/functions/KeyMapper.java -- diff --git a/modules/functions/src/main/java/org/apache/tamaya/functions/KeyMapper.java b/modules/functions/src/main/java/org/apache/tamaya/functions/KeyMapper.java index 2666c1b..bf6e6d3 100644 --- a/modules/functions/src/main/java/org/apache/tamaya/functions/KeyMapper.java +++ b/modules/functions/src/main/java/org/apache/tamaya/functions/KeyMapper.java @@ -23,7 +23,7 @@ package org.apache.tamaya.functions; * if mapped to null). * */ -//@FunctionalInterface +@FunctionalInterface public interface KeyMapper { /** http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/6fdd34c7/modules/functions/src/main/java/org/apache/tamaya/functions/Predicate.java -- diff --git a/modules/functions/src/main/java/org/apache/tamaya/functions/Predicate.java b/modules/functions/src/main/java/org/apache/tamaya/functions/Predicate.java index 3061746..5c8869e 100644 --- a/modules/functions/src/main/java/org/apache/tamaya/functions/Predicate.java +++ b/modules/functions/src/main/java/org/apache/tamaya/functions/Predicate.java @@ -26,17 +26,8 @@ package org.apache.tamaya.functions; * * @param the type of the input to the predicate */ -//@FunctionalInterface -public interface Predicate { - -/** - * Evaluates this predicate on the given argument. - * - * @param t the input argument - * @return {@code true} if the input argument matches the predicate, - * otherwise {@code false} - */ -boolean test(T t); +@FunctionalInterface +public interface Predicate extends java.util.function.Predicate{ } http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/6fdd34c7/modules/functions/src/main/java/org/apache/tamaya/functions/PropertyMatcher.java -- diff --git a/modules/functions/src/main/java/org/apache/tamaya/functions/PropertyMatcher.java b/modules/functions/src/main/java/org/apache/tamaya/functions/PropertyMatcher.java index 45d44ee..cfb207e 100644 --- a/modules/functions/src/main/java/org/apache/tamaya/functions/PropertyMatcher.java +++ b/modules/functions/src/main/java/org/apache/tamaya/functions/PropertyMatcher.java @@ -22,7 +22,7 @@ package org.apache.tamaya.functions; * Represents a sele
[02/14] incubator-tamaya-extensions git commit: TAMAYA-274: Moved to Java 8, fixed Javadoc issues.
TAMAYA-274: Moved to Java 8, fixed Javadoc issues. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/commit/5cb0e696 Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/tree/5cb0e696 Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/diff/5cb0e696 Branch: refs/heads/master Commit: 5cb0e696ef63607f28600e129c8574293e7e1421 Parents: 6fdd34c Author: anatole Authored: Mon Aug 7 17:51:55 2017 +0200 Committer: anatole Committed: Mon Aug 7 17:51:55 2017 +0200 -- .../apache/tamaya/events/FrozenConfiguration.java| 2 +- .../java/org/apache/tamaya/inject/api/Config.java| 15 --- .../apache/tamaya/inject/spi/BaseDynamicValue.java | 2 +- 3 files changed, 6 insertions(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/5cb0e696/modules/events/src/main/java/org/apache/tamaya/events/FrozenConfiguration.java -- diff --git a/modules/events/src/main/java/org/apache/tamaya/events/FrozenConfiguration.java b/modules/events/src/main/java/org/apache/tamaya/events/FrozenConfiguration.java index 295a609..61e8abe 100644 --- a/modules/events/src/main/java/org/apache/tamaya/events/FrozenConfiguration.java +++ b/modules/events/src/main/java/org/apache/tamaya/events/FrozenConfiguration.java @@ -209,7 +209,7 @@ public final class FrozenConfiguration implements Configuration, Serializable { * * The time is taken from {@linkplain System#currentTimeMillis()} * - * @see {@linkplain System#currentTimeMillis()} + * @see System#currentTimeMillis() * @return the moment in time when this configruration has been created */ public long getFrozenAt() { http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/5cb0e696/modules/injection/injection-api/src/main/java/org/apache/tamaya/inject/api/Config.java -- diff --git a/modules/injection/injection-api/src/main/java/org/apache/tamaya/inject/api/Config.java b/modules/injection/injection-api/src/main/java/org/apache/tamaya/inject/api/Config.java index 6ce55ed..67a3bfc 100644 --- a/modules/injection/injection-api/src/main/java/org/apache/tamaya/inject/api/Config.java +++ b/modules/injection/injection-api/src/main/java/org/apache/tamaya/inject/api/Config.java @@ -34,15 +34,12 @@ import java.lang.annotation.Target; * Simplest variant * Below the most simple variant of a configured class is given: * - * {@code * package a.b; * * public class ConfiguredItem { - * - * @Config + * &Config * private String aValue; * } - * } * * Configuration resolution is implemented as follows: * @@ -57,14 +54,12 @@ import java.lang.annotation.Target; * Explicit annotations * In the next example we explicitly define the configuration keys to be used: * - * {@code - * @ConfigDefaultSections("section1") + * &ConfigDefaultSections("section1") * public class ConfiguredItem { * - * @Config(value = {"b", "[a.b.deprecated.keys]", "a"}, defaultValue = "myDefaultValue") + * &Config(value = {"b", "[a.b.deprecated.keys]", "a"}, defaultValue = "myDefaultValue") * private String aValue; * } - * } * * * Within this example we evaluate multiple possible keys: {@code section1.b, a.b.deprecated.keys, section1.a}. @@ -76,15 +71,13 @@ import java.lang.annotation.Target; * In the last example we explicitly define the configuration keys but omit the section part, letting the default * section names to be taken: * - * {@code * package a.b; * * public class ConfiguredItem { * - * @Config(value = {"b", "[a.b.deprecated.keys]", "a"}, defaultValue = "myDefaultValue") + * &Config(value = {"b", "[a.b.deprecated.keys]", "a"}, defaultValue = "myDefaultValue") * private String aValue; * } - * } * * * Key resolution is similar to above, but now the default package names are used, resulting in http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/5cb0e696/modules/injection/injection-api/src/main/java/org/apache/tamaya/inject/spi/BaseDynamicValue.java -- diff --git a/modules/injection/injection-api/src/main/java/org/apache/tamaya/inject/spi/BaseDynamicValue.java b/modules/injection/injection-api/src/main/java/org/apache/tamaya/inject/spi/BaseDynamicValue.java index f9e2079..a23a85c 100644 --- a/modules/injection/injection-api/src/main/java/org/apache/tamaya/inject/spi/BaseDynamicValue.java +++ b/modules/injection/injection-api/src/main/java/org/apache/tamaya/inject/spi/BaseDynamicValue.java @@ -28,7 +28,7 @@ import
[04/14] incubator-tamaya-extensions git commit: Added latency for change test (sometimes failing).
Added latency for change test (sometimes failing). Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/commit/0d13b0ec Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/tree/0d13b0ec Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/diff/0d13b0ec Branch: refs/heads/master Commit: 0d13b0ec09527c0a5ffdc0580f11350b01ba6064 Parents: 70edbf9 Author: anatole Authored: Tue Aug 8 21:46:22 2017 +0200 Committer: anatole Committed: Tue Aug 8 21:46:22 2017 +0200 -- .../test/java/org/apache/tamaya/events/ConfigurationChangeTest.java | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/0d13b0ec/modules/events/src/test/java/org/apache/tamaya/events/ConfigurationChangeTest.java -- diff --git a/modules/events/src/test/java/org/apache/tamaya/events/ConfigurationChangeTest.java b/modules/events/src/test/java/org/apache/tamaya/events/ConfigurationChangeTest.java index 4cedeab..60f40c2 100644 --- a/modules/events/src/test/java/org/apache/tamaya/events/ConfigurationChangeTest.java +++ b/modules/events/src/test/java/org/apache/tamaya/events/ConfigurationChangeTest.java @@ -69,6 +69,7 @@ public class ConfigurationChangeTest { @Test public void testGetTimestamp() throws Exception { Configuration config = ConfigurationProvider.getConfiguration(); +Thread.sleep(10L); ConfigurationChange change = ConfigurationChangeBuilder.of(config).build(); assertTrue((System.currentTimeMillis() - change.getTimestamp()) > 0L); change = ConfigurationChangeBuilder.of(config).setTimestamp(10L).build();
[10/14] incubator-tamaya-extensions git commit: TAMAYA-297: Added missing import package for format module.
TAMAYA-297: Added missing import package for format module. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/commit/d447fae1 Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/tree/d447fae1 Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/diff/d447fae1 Branch: refs/heads/master Commit: d447fae1a2b0e9e83f2200d13449d9335e1c0f46 Parents: 182891e Author: anatole Authored: Fri Sep 22 22:10:52 2017 +0200 Committer: anatole Committed: Fri Sep 22 22:10:52 2017 +0200 -- modules/formats/yaml/bnd.bnd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/d447fae1/modules/formats/yaml/bnd.bnd -- diff --git a/modules/formats/yaml/bnd.bnd b/modules/formats/yaml/bnd.bnd index 771d652..b173e56 100644 --- a/modules/formats/yaml/bnd.bnd +++ b/modules/formats/yaml/bnd.bnd @@ -23,6 +23,7 @@ Export-Package: \ org.apache.tamaya.yaml Import-Package: \ org.apache.tamaya,\ - org.apache.tamaya.spi + org.apache.tamaya.spi,\ + org.apache.tamaya.format Export-Service: \ org.apache.tamaya.format.ConfigurationFormat
[08/14] incubator-tamaya-extensions git commit: TAMAYA-274: Improved BND configs for better OSGI support, added OSGI annotations.
TAMAYA-274: Improved BND configs for better OSGI support, added OSGI annotations. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/commit/d702e3ce Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/tree/d702e3ce Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/diff/d702e3ce Branch: refs/heads/master Commit: d702e3cee64c20cdec681b036cac21832714344f Parents: 089043d Author: anatole Authored: Sun Sep 3 22:50:18 2017 +0200 Committer: anatole Committed: Sun Sep 3 22:50:18 2017 +0200 -- modules/events/bnd.bnd | 34 +++- modules/events/pom.xml | 6 .../internal/DefaultConfigEventManagerSpi.java | 2 ++ .../events/internal/LoggingConfigListener.java | 2 ++ modules/features/bnd.bnd| 24 -- modules/filter/bnd.bnd | 27 +++- modules/filter/pom.xml | 11 +++ .../tamaya/filter/ConfigurationFilter.java | 2 ++ modules/formats/base/bnd.bnd| 27 +++- .../format/formats/IniConfigurationFormat.java | 2 ++ .../tamaya/format/formats/PropertiesFormat.java | 2 ++ .../format/formats/PropertiesXmlFormat.java | 2 ++ modules/formats/json/bnd.bnd| 28 +++- .../java/org/apache/tamaya/json/JSONFormat.java | 2 ++ .../apache/tamaya/json/JSONPropertySource.java | 2 ++ modules/formats/yaml/bnd.bnd| 27 +++- modules/functions/bnd.bnd | 25 +- modules/injection/cdi/bnd.bnd | 33 +-- modules/injection/injection-api/bnd.bnd | 26 +-- modules/injection/standalone/bnd.bnd| 29 - modules/injection/standalone/pom.xml| 5 +++ .../internal/DefaultConfigurationInjector.java | 2 ++ modules/jndi/bnd.bnd| 28 +--- modules/jndi/pom.xml| 5 +++ .../apache/tamaya/jndi/JNDIPropertySource.java | 2 ++ modules/mutable-config/bnd.bnd | 33 +-- modules/mutable-config/pom.xml | 5 +++ .../internal/DefaultMutableConfiguration.java | 2 ++ .../DefaultMutableConfigurationSpi.java | 2 ++ modules/optional/bnd.bnd| 22 - modules/resolver/bnd.bnd| 31 -- modules/resources/bnd.bnd | 30 - modules/resources/pom.xml | 5 +++ .../internal/ClassPathResourceLocator.java | 2 ++ .../internal/DefaultResourceResolver.java | 2 ++ .../resource/internal/FileResourceLocator.java | 2 ++ .../resource/internal/PathResourceLocator.java | 2 ++ .../resource/internal/URLResourceLocator.java | 2 ++ modules/spi-support/bnd.bnd | 25 +- modules/spring/bnd.bnd | 25 +- 40 files changed, 520 insertions(+), 25 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/d702e3ce/modules/events/bnd.bnd -- diff --git a/modules/events/bnd.bnd b/modules/events/bnd.bnd index 21036e3..1b9859a 100644 --- a/modules/events/bnd.bnd +++ b/modules/events/bnd.bnd @@ -1,4 +1,36 @@ +-buildpath: \ + osgi.annotation; version=6.0.0,\ + osgi.core; version=6.0,\ + osgi.cmpn; version=6.0 + +-testpath: \ + ${junit} + +javac.source: 1.8 +javac.target: 1.8 + +Bundle-Version: ${version}.${tstamp} +Bundle-Name: Apache Tamaya - Events +Bundle-SymbolicName: org.apache.tamaya.events +Bundle-Description: Apacha Tamaya Config - Events +Bundle-Category: Implementation +Bundle-Copyright: (C) Apache Foundation +Bundle-License: Apache Licence version 2 +Bundle-Vendor: Apache Software Foundation +Bundle-ContactAddress: dev-tam...@incubator.apache.org +Bundle-DocURL: http://tamaya.apache.org Export-Package: \ org.apache.tamaya.events,\ org.apache.tamaya.events.spi -Bundle-SymbolicName: org.apache.tamaya.events \ No newline at end of file +Import-Package: \ + org.apache.tamaya,\ + org.apache.tamaya.spi,\ + org.osgi.framework,\ + javax.annotation +Private-Package: \ + org.apache.tamaya.events.internal +Export-Service: \ +org.apache.tamaya.events.spi.ConfigEventManagerSpi + + + http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/d702e3ce/modules/events/pom.xml -- diff --git a/modules/events/pom.xml b/mod
[06/14] incubator-tamaya-extensions git commit: TAMAYA-260: Added support for config_ordinal as alternative ordinal key.
TAMAYA-260: Added support for config_ordinal as alternative ordinal key. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/commit/72c37c5c Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/tree/72c37c5c Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/diff/72c37c5c Branch: refs/heads/master Commit: 72c37c5c1e5d3504c87e796b9af923ae476d4436 Parents: 1d1cf72 Author: anatole Authored: Wed Aug 9 00:21:48 2017 +0200 Committer: anatole Committed: Wed Aug 9 00:21:48 2017 +0200 -- .../spisupport/PropertySourceComparator.java| 59 +++- 1 file changed, 32 insertions(+), 27 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/72c37c5c/modules/spi-support/src/main/java/org/apache/tamaya/spisupport/PropertySourceComparator.java -- diff --git a/modules/spi-support/src/main/java/org/apache/tamaya/spisupport/PropertySourceComparator.java b/modules/spi-support/src/main/java/org/apache/tamaya/spisupport/PropertySourceComparator.java index f4c37ac..6799e4e 100644 --- a/modules/spi-support/src/main/java/org/apache/tamaya/spisupport/PropertySourceComparator.java +++ b/modules/spi-support/src/main/java/org/apache/tamaya/spisupport/PropertySourceComparator.java @@ -39,6 +39,8 @@ public class PropertySourceComparator implements Comparator, Ser private static final PropertySourceComparator INSTANCE = new PropertySourceComparator(); +private String alternativeOrdinalKey; + private PropertySourceComparator(){} /** @@ -58,9 +60,9 @@ public class PropertySourceComparator implements Comparator, Ser * @return the comparison result. */ private int comparePropertySources(PropertySource source1, PropertySource source2) { -if (getOrdinal(source1) < getOrdinal(source2)) { +if (getOrdinal(source1, alternativeOrdinalKey) < getOrdinal(source2, alternativeOrdinalKey)) { return -1; -} else if (getOrdinal(source1) > getOrdinal(source2)) { +} else if (getOrdinal(source1, alternativeOrdinalKey) > getOrdinal(source2, alternativeOrdinalKey)) { return 1; } else { return source1.getClass().getName().compareTo(source2.getClass().getName()); @@ -68,35 +70,38 @@ public class PropertySourceComparator implements Comparator, Ser } public static int getOrdinal(PropertySource propertySource) { -//PropertyValue ordinalValue = propertySource.get(PropertySource.TAMAYA_ORDINAL); -//if(ordinalValue!=null){ -//try{ -//return Integer.parseInt(ordinalValue.getProperty().trim()); -//}catch(Exception e){ -//LOG.finest("Failed to parse ordinal from " + PropertySource.TAMAYA_ORDINAL + -//" in " + propertySource.getName()+": "+ordinalValue.getProperty()); -//} -//} -//try { -//Method method = propertySource.getClass().getMethod("getOrdinal"); -//if(int.class.equals(method.getReturnType())){ -//try { -//return (int)method.invoke(propertySource); -//} catch (Exception e) { -//LOG.log(Level.FINEST, "Error calling int getOrdinal() on " + propertySource.getName(), e); -//} -//} -//} catch (NoSuchMethodException e) { -//LOG.finest("No int getOrdinal() method found in " + propertySource.getName()); -//} -//Priority prio = propertySource.getClass().getAnnotation(Priority.class); -//if(prio!=null){ -//return prio.value(); -//} +return getOrdinal(propertySource, null); +} + +public static int getOrdinal(PropertySource propertySource, String alternativeOrdinalKey) { +if(alternativeOrdinalKey!=null) { +PropertyValue ordinalValue = propertySource.get(alternativeOrdinalKey); +if (ordinalValue != null) { +try { +return Integer.parseInt(ordinalValue.getValue().trim()); +} catch (Exception e) { +LOG.finest("Failed to parse ordinal from " + alternativeOrdinalKey + +" in " + propertySource.getName() + ": " + ordinalValue.getValue()); +} +} +} return propertySource.getOrdinal(); } + +/** + * Overrides/adds the key to evaluate/override a property sources ordinal. + * @param ordinalKey sets the alternative ordinal key, if null default + * behaviour will be active. + * @return the instance
[03/14] incubator-tamaya-extensions git commit: TAMAYA-274: Moved to Java 8, set version to 0.4-incubating-SNAPSHOT
TAMAYA-274: Moved to Java 8, set version to 0.4-incubating-SNAPSHOT Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/commit/70edbf97 Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/tree/70edbf97 Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/diff/70edbf97 Branch: refs/heads/master Commit: 70edbf9727abc2f9dcd214fd47a3ee3dda33e411 Parents: 5cb0e69 Author: anatole Authored: Tue Aug 8 21:44:52 2017 +0200 Committer: anatole Committed: Tue Aug 8 21:44:52 2017 +0200 -- distribution/pom.xml| 2 +- examples/01-resources-example/pom.xml | 4 ++-- examples/02-resolver-example/pom.xml| 2 +- examples/03-injection-example/pom.xml | 4 ++-- examples/04-events-example/pom.xml | 2 +- examples/pom.xml| 4 ++-- modules/events/pom.xml | 2 +- modules/features/pom.xml| 2 +- modules/filter/pom.xml | 2 +- modules/formats/base/pom.xml| 2 +- modules/formats/json/pom.xml| 2 +- modules/formats/pom.xml | 2 +- modules/formats/yaml/pom.xml| 2 +- modules/functions/pom.xml | 2 +- modules/injection/cdi/pom.xml | 2 +- modules/injection/injection-api/pom.xml | 2 +- modules/injection/pom.xml | 2 +- modules/injection/standalone/pom.xml| 2 +- modules/jndi/pom.xml| 2 +- modules/mutable-config/pom.xml | 2 +- modules/optional/pom.xml| 2 +- modules/pom.xml | 2 +- modules/resolver/pom.xml| 2 +- modules/resources/pom.xml | 2 +- modules/spi-support/pom.xml | 2 +- modules/spring/pom.xml | 2 +- pom.xml | 2 +- 27 files changed, 30 insertions(+), 30 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/70edbf97/distribution/pom.xml -- diff --git a/distribution/pom.xml b/distribution/pom.xml index a28bf93..61ecda0 100644 --- a/distribution/pom.xml +++ b/distribution/pom.xml @@ -25,7 +25,7 @@ under the License. org.apache.tamaya.ext tamaya-extensions-all -0.3-incubating-SNAPSHOT +0.4-incubating-SNAPSHOT .. http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/70edbf97/examples/01-resources-example/pom.xml -- diff --git a/examples/01-resources-example/pom.xml b/examples/01-resources-example/pom.xml index f71d542..e8a269c 100644 --- a/examples/01-resources-example/pom.xml +++ b/examples/01-resources-example/pom.xml @@ -25,11 +25,11 @@ under the License. org.apache.tamaya.ext.examples examples -0.3-incubating-SNAPSHOT +0.4-incubating-SNAPSHOT 01-resources-example -0.3-incubating-SNAPSHOT +0.4-incubating-SNAPSHOT Apache Tamaya Resource Location Example This project contains a simple example using the resource location module. http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/70edbf97/examples/02-resolver-example/pom.xml -- diff --git a/examples/02-resolver-example/pom.xml b/examples/02-resolver-example/pom.xml index b2bb703..fd97227 100644 --- a/examples/02-resolver-example/pom.xml +++ b/examples/02-resolver-example/pom.xml @@ -25,7 +25,7 @@ under the License. org.apache.tamaya.ext.examples examples -0.3-incubating-SNAPSHOT +0.4-incubating-SNAPSHOT 02-resolver-example http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/70edbf97/examples/03-injection-example/pom.xml -- diff --git a/examples/03-injection-example/pom.xml b/examples/03-injection-example/pom.xml index 0fba95d..d647359 100644 --- a/examples/03-injection-example/pom.xml +++ b/examples/03-injection-example/pom.xml @@ -25,11 +25,11 @@ under the License. org.apache.tamaya.ext.examples examples -0.3-incubating-SNAPSHOT +0.4-incubating-SNAPSHOT 03-injection-example -0.3-incubating-SNAPSHOT +0.4-incubating-SNAPSHOT Apache Tamaya Configuration Injection Example This project contains a simple illustrating how configuration values can be injected. http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/70edbf97/examples/04-events-example/pom.xml --
[13/14] incubator-tamaya-extensions git commit: TAMAYA-310: Fixed events emit for changes.
TAMAYA-310: Fixed events emit for changes. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/commit/bcede48d Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/tree/bcede48d Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/diff/bcede48d Branch: refs/heads/master Commit: bcede48d2e8ec5d41172fb9e44e19fb5bae8136f Parents: 6bd7d1d Author: anatole Authored: Sun Sep 24 21:34:40 2017 +0200 Committer: anatole Committed: Sun Sep 24 21:34:40 2017 +0200 -- .../events/ConfigurationChangeBuilder.java | 26 +--- .../internal/DefaultConfigChangeObserver.java | 15 +-- 2 files changed, 18 insertions(+), 23 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/bcede48d/modules/events/src/main/java/org/apache/tamaya/events/ConfigurationChangeBuilder.java -- diff --git a/modules/events/src/main/java/org/apache/tamaya/events/ConfigurationChangeBuilder.java b/modules/events/src/main/java/org/apache/tamaya/events/ConfigurationChangeBuilder.java index 651a80d..7379e72 100644 --- a/modules/events/src/main/java/org/apache/tamaya/events/ConfigurationChangeBuilder.java +++ b/modules/events/src/main/java/org/apache/tamaya/events/ConfigurationChangeBuilder.java @@ -103,12 +103,10 @@ public final class ConfigurationChangeBuilder { String key = en.getKey(); String previousValue = en.getValue(); String currentValue = current.get(en.getKey()); - -if (currentValue == null) { -PropertyChangeEvent event = new PropertyChangeEvent(previous, key, previousValue, null); -events.put(key, event); -} else if (!Objects.equals(current, previous)) { -PropertyChangeEvent event = new PropertyChangeEvent(previous, key, currentValue, previousValue); +if(Objects.equals(currentValue, previousValue)){ +continue; +}else { +PropertyChangeEvent event = new PropertyChangeEvent(previous, key, previousValue, currentValue); events.put(key, event); } } @@ -117,16 +115,16 @@ public final class ConfigurationChangeBuilder { String key = en.getKey(); String previousValue = previous.get(en.getKey()); String currentValue = en.getValue(); - -if (previousValue == null) { -PropertyChangeEvent event = new PropertyChangeEvent(current, key, null, currentValue); -events.put(key, event); -} else if (!(Objects.equals(previousValue, currentValue) && events.containsKey(key))) { -PropertyChangeEvent event = new PropertyChangeEvent(current, en.getKey(), previousValue, en.getValue()); -events.put(key, event); +if(Objects.equals(currentValue, previousValue)){ +continue; +}else{ +if (previousValue == null) { +PropertyChangeEvent event = new PropertyChangeEvent(current, key, null, currentValue); +events.put(key, event); +} +// the other cases were already covered by the previous loop. } } - return events.values(); } http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/bcede48d/modules/events/src/main/java/org/apache/tamaya/events/internal/DefaultConfigChangeObserver.java -- diff --git a/modules/events/src/main/java/org/apache/tamaya/events/internal/DefaultConfigChangeObserver.java b/modules/events/src/main/java/org/apache/tamaya/events/internal/DefaultConfigChangeObserver.java index 9d4169c..51951de 100644 --- a/modules/events/src/main/java/org/apache/tamaya/events/internal/DefaultConfigChangeObserver.java +++ b/modules/events/src/main/java/org/apache/tamaya/events/internal/DefaultConfigChangeObserver.java @@ -64,20 +64,17 @@ public class DefaultConfigChangeObserver { FrozenConfiguration frozenConfig = FrozenConfiguration.of(ConfigurationProvider.getConfiguration()); ConfigurationChange changes; -if (getLastConfig() == null) { -changes = ConfigurationChangeBuilder.of().putAll(frozenConfig.getProperties()) -.build(); -} else { +if (getLastConfig() != null) { changes = ConfigurationChangeBuilder.of(getLastConfig()).addChanges(frozenConfig) .build(); +if(!changes.isEmpty()) { +LOG.i
[07/14] incubator-tamaya-extensions git commit: TAMAYA-260: Fixed classcast exception.
TAMAYA-260: Fixed classcast exception. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/commit/089043d9 Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/tree/089043d9 Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/diff/089043d9 Branch: refs/heads/master Commit: 089043d9ef940635e27c94d1123a0cff533cc1a7 Parents: 72c37c5 Author: anatole Authored: Mon Aug 14 01:40:33 2017 +0200 Committer: anatole Committed: Mon Aug 14 01:40:33 2017 +0200 -- .../tamaya/spisupport/SystemPropertySource.java | 22 +++- 1 file changed, 12 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/089043d9/modules/spi-support/src/main/java/org/apache/tamaya/spisupport/SystemPropertySource.java -- diff --git a/modules/spi-support/src/main/java/org/apache/tamaya/spisupport/SystemPropertySource.java b/modules/spi-support/src/main/java/org/apache/tamaya/spisupport/SystemPropertySource.java index de83a82..bc5f99e 100644 --- a/modules/spi-support/src/main/java/org/apache/tamaya/spisupport/SystemPropertySource.java +++ b/modules/spi-support/src/main/java/org/apache/tamaya/spisupport/SystemPropertySource.java @@ -133,16 +133,18 @@ public class SystemPropertySource extends BasePropertySource { final String prefix = this.prefix; Map entries = new HashMap<>(); for (Map.Entry entry : sysProps.entrySet()) { -if(prefix==null) { -entries.put((String) entry.getKey(), -PropertyValue.of((String) entry.getKey(), -(String) entry.getValue(), -getName())); -}else { -entries.put(prefix + entry.getKey(), -PropertyValue.of(prefix + entry.getKey(), -(String) entry.getValue(), -getName())); +if(entry.getKey() instanceof String && entry.getValue() instanceof String) { +if (prefix == null) { +entries.put((String) entry.getKey(), +PropertyValue.of((String) entry.getKey(), +(String) entry.getValue(), +getName())); +} else { +entries.put(prefix + entry.getKey(), +PropertyValue.of(prefix + entry.getKey(), +(String) entry.getValue(), +getName())); +} } } return entries;
[09/14] incubator-tamaya-extensions git commit: TAMAYA-297: Fixed invalid symbolic name, changed entry order in pom.
TAMAYA-297: Fixed invalid symbolic name, changed entry order in pom. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/commit/182891e5 Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/tree/182891e5 Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/diff/182891e5 Branch: refs/heads/master Commit: 182891e55ec6d7c6e08dda60eb7b7b1dedd5dadc Parents: d702e3c Author: anatole Authored: Thu Sep 21 18:25:21 2017 +0200 Committer: anatole Committed: Thu Sep 21 18:25:21 2017 +0200 -- modules/spi-support/bnd.bnd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/182891e5/modules/spi-support/bnd.bnd -- diff --git a/modules/spi-support/bnd.bnd b/modules/spi-support/bnd.bnd index 88bec7c..1ce81a3 100644 --- a/modules/spi-support/bnd.bnd +++ b/modules/spi-support/bnd.bnd @@ -11,7 +11,7 @@ javac.target: 1.8 Bundle-Version: ${version}.${tstamp} Bundle-Name: Apache Tamaya - SPI Support -Bundle-SymbolicName: org.apache.tamaya.resource +Bundle-SymbolicName: org.apache.tamaya.spisupport Bundle-Description: Apacha Tamaya Config - SPI Support Bundle-Category: Implementation Bundle-Copyright: (C) Apache Foundation
[11/14] incubator-tamaya-extensions git commit: TAMAYA-297: Added missing spisupport import package.
TAMAYA-297: Added missing spisupport import package. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/commit/4733cfab Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/tree/4733cfab Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/diff/4733cfab Branch: refs/heads/master Commit: 4733cfabcc5b0c21f5f5696603e9572257d25942 Parents: d447fae Author: anatole Authored: Fri Sep 22 22:11:55 2017 +0200 Committer: anatole Committed: Fri Sep 22 22:11:55 2017 +0200 -- modules/jndi/bnd.bnd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/4733cfab/modules/jndi/bnd.bnd -- diff --git a/modules/jndi/bnd.bnd b/modules/jndi/bnd.bnd index a54a517..12c280e 100644 --- a/modules/jndi/bnd.bnd +++ b/modules/jndi/bnd.bnd @@ -23,4 +23,5 @@ Export-Package: \ org.apache.tamaya.jndi Import-Package: \ org.apache.tamaya,\ - org.apache.tamaya.spi + org.apache.tamaya.spi,\ + org.apache.tamaya.spisupport
[05/14] incubator-tamaya-extensions git commit: TAMAYA-274: Simplified compiler settings, set version to 0.4-incubating-SNAPSHOT
TAMAYA-274: Simplified compiler settings, set version to 0.4-incubating-SNAPSHOT Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/commit/1d1cf72e Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/tree/1d1cf72e Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/diff/1d1cf72e Branch: refs/heads/master Commit: 1d1cf72ef18e95980602807e6d4f1e939c90a7d2 Parents: 0d13b0e Author: anatole Authored: Wed Aug 9 00:21:01 2017 +0200 Committer: anatole Committed: Wed Aug 9 00:21:01 2017 +0200 -- modules/events/pom.xml | 4 modules/features/pom.xml| 4 modules/filter/pom.xml | 4 modules/formats/base/pom.xml| 4 modules/formats/json/pom.xml| 4 modules/formats/yaml/pom.xml| 1 - modules/functions/pom.xml | 4 modules/injection/injection-api/pom.xml | 1 - modules/injection/standalone/pom.xml| 4 modules/jndi/pom.xml| 4 modules/mutable-config/pom.xml | 4 modules/optional/pom.xml| 4 modules/resolver/pom.xml| 4 modules/resources/pom.xml | 4 modules/spi-support/pom.xml | 4 pom.xml | 9 - 16 files changed, 4 insertions(+), 59 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/1d1cf72e/modules/events/pom.xml -- diff --git a/modules/events/pom.xml b/modules/events/pom.xml index a9fd9ac..3ef6ff7 100644 --- a/modules/events/pom.xml +++ b/modules/events/pom.xml @@ -32,10 +32,6 @@ under the License. Apache Tamaya Event and dynamic Update Extensions jar - -1.7 - - org.apache.tamaya http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/1d1cf72e/modules/features/pom.xml -- diff --git a/modules/features/pom.xml b/modules/features/pom.xml index ca1b8c3..6f15c0f 100644 --- a/modules/features/pom.xml +++ b/modules/features/pom.xml @@ -32,10 +32,6 @@ under the License. Apache Tamaya Feature Check jar - -1.7 - - org.apache.tamaya http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/1d1cf72e/modules/filter/pom.xml -- diff --git a/modules/filter/pom.xml b/modules/filter/pom.xml index bc8a4d6..4cf2bd6 100644 --- a/modules/filter/pom.xml +++ b/modules/filter/pom.xml @@ -32,10 +32,6 @@ under the License. Apache Tamaya Adaptive Configuration Filtering jar - -1.7 - - org.apache.tamaya http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/1d1cf72e/modules/formats/base/pom.xml -- diff --git a/modules/formats/base/pom.xml b/modules/formats/base/pom.xml index 8e5ff74..aa2c660 100644 --- a/modules/formats/base/pom.xml +++ b/modules/formats/base/pom.xml @@ -32,10 +32,6 @@ under the License. Apache Tamaya Modules Formats Common jar - -1.7 - - org.apache.tamaya http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/1d1cf72e/modules/formats/json/pom.xml -- diff --git a/modules/formats/json/pom.xml b/modules/formats/json/pom.xml index 0cacc56..5f807c5 100644 --- a/modules/formats/json/pom.xml +++ b/modules/formats/json/pom.xml @@ -34,10 +34,6 @@ under the License. jar 2015 - -1.7 - - org.apache.tamaya http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/1d1cf72e/modules/formats/yaml/pom.xml -- diff --git a/modules/formats/yaml/pom.xml b/modules/formats/yaml/pom.xml index 431c574..d5448f3 100644 --- a/modules/formats/yaml/pom.xml +++ b/modules/formats/yaml/pom.xml @@ -35,7 +35,6 @@ under the License. 2016 -1.7 1.17 http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/1d1cf72e/modules/functions/pom.xml -- diff --git a/modules/functions/pom.xml b/modules/functions/pom.xml index 5c90633..957f3a3 100644 --- a/modules/functions/pom.xml +++ b/modules/functions/pom.xml @@ -32,10 +32,6 @@ under the License. Apache Tamaya Modules - Common
[12/14] incubator-tamaya-extensions git commit: TAMAYA-297: Fixes on OSGI commands, added propagation flag.
TAMAYA-297: Fixes on OSGI commands, added propagation flag. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/commit/6bd7d1d8 Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/tree/6bd7d1d8 Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/diff/6bd7d1d8 Branch: refs/heads/master Commit: 6bd7d1d87737a809eacfde3d69ea5a8ebbcfb020 Parents: 4733cfa Author: anatole Authored: Fri Sep 22 23:44:36 2017 +0200 Committer: anatole Committed: Fri Sep 22 23:44:36 2017 +0200 -- modules/formats/json/bnd.bnd | 3 ++- .../json/src/main/java/org/apache/tamaya/json/JSONFormat.java | 2 -- .../src/main/java/org/apache/tamaya/json/JSONPropertySource.java | 2 -- 3 files changed, 2 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/6bd7d1d8/modules/formats/json/bnd.bnd -- diff --git a/modules/formats/json/bnd.bnd b/modules/formats/json/bnd.bnd index 0a13b56..3e0af5f 100644 --- a/modules/formats/json/bnd.bnd +++ b/modules/formats/json/bnd.bnd @@ -23,7 +23,8 @@ Export-Package: \ org.apache.tamaya.json Import-Package: \ org.apache.tamaya,\ - org.apache.tamaya.spi + org.apache.tamaya.spi,\ + org.apache.tamaya.format Export-Service: \ org.apache.tamaya.format.ConfigurationFormat http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/6bd7d1d8/modules/formats/json/src/main/java/org/apache/tamaya/json/JSONFormat.java -- diff --git a/modules/formats/json/src/main/java/org/apache/tamaya/json/JSONFormat.java b/modules/formats/json/src/main/java/org/apache/tamaya/json/JSONFormat.java index 665f329..5902cbd 100644 --- a/modules/formats/json/src/main/java/org/apache/tamaya/json/JSONFormat.java +++ b/modules/formats/json/src/main/java/org/apache/tamaya/json/JSONFormat.java @@ -21,7 +21,6 @@ package org.apache.tamaya.json; import org.apache.tamaya.format.ConfigurationData; import org.apache.tamaya.format.ConfigurationDataBuilder; import org.apache.tamaya.format.ConfigurationFormat; -import org.osgi.service.component.annotations.Component; import java.io.IOException; import java.io.InputStream; @@ -42,7 +41,6 @@ import javax.json.JsonReaderFactory; * * @see http://www.json.org";>JSON format specification */ -@Component public class JSONFormat implements ConfigurationFormat { /** Property that make Johnzon accept commentc. */ public static final String JOHNZON_SUPPORTS_COMMENTS_PROP = "org.apache.johnzon.supports-comments"; http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/6bd7d1d8/modules/formats/json/src/main/java/org/apache/tamaya/json/JSONPropertySource.java -- diff --git a/modules/formats/json/src/main/java/org/apache/tamaya/json/JSONPropertySource.java b/modules/formats/json/src/main/java/org/apache/tamaya/json/JSONPropertySource.java index f9d1d85..5934210 100644 --- a/modules/formats/json/src/main/java/org/apache/tamaya/json/JSONPropertySource.java +++ b/modules/formats/json/src/main/java/org/apache/tamaya/json/JSONPropertySource.java @@ -21,7 +21,6 @@ package org.apache.tamaya.json; import org.apache.tamaya.ConfigException; import org.apache.tamaya.spi.PropertySource; import org.apache.tamaya.spi.PropertyValue; -import org.osgi.service.component.annotations.Component; import java.io.IOException; import java.io.InputStream; @@ -44,7 +43,6 @@ import static java.lang.String.format; /** * Property source based on a JSON file. */ -@Component public class JSONPropertySource implements PropertySource { /** Constant for enabling comments in Johnzon. */ public static final String JOHNZON_SUPPORTS_COMMENTS_PROP = "org.apache.johnzon.supports-comments";
[28/45] incubator-tamaya-sandbox git commit: TAMAYA-307: Readded collections module.
TAMAYA-307: Readded collections module. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/commit/636dbb56 Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/tree/636dbb56 Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/diff/636dbb56 Branch: refs/heads/master Commit: 636dbb56c485a01acf8692e7ba8e9d37acd04db0 Parents: 99ce49e Author: anatole Authored: Thu Sep 21 18:22:44 2017 +0200 Committer: anatole Committed: Thu Sep 21 18:22:44 2017 +0200 -- collections/bnd.bnd | 26 ++ pom.xml | 1 + 2 files changed, 27 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/636dbb56/collections/bnd.bnd -- diff --git a/collections/bnd.bnd b/collections/bnd.bnd new file mode 100644 index 000..0018594 --- /dev/null +++ b/collections/bnd.bnd @@ -0,0 +1,26 @@ +-buildpath: \ + osgi.annotation; version=6.0.0,\ + osgi.core; version=6.0,\ + osgi.cmpn; version=6.0 + +-testpath: \ + ${junit} + +javac.source: 1.8 +javac.target: 1.8 + +Bundle-Version: ${version}.${tstamp} +Bundle-Name: Apache Tamaya - Collections Support +Bundle-SymbolicName: org.apache.tamaya.collections +Bundle-Description: Apacha Tamaya Config - Collections Support +Bundle-Category: Implementation +Bundle-Copyright: (C) Apache Foundation +Bundle-License: Apache Licence version 2 +Bundle-Vendor: Apache Software Foundation +Bundle-ContactAddress: dev-tam...@incubator.apache.org +Bundle-DocURL: http://tamaya.apache.org +Export-Package: \ + org.apache.tamaya.collections +Import-Package: \ +org.apache.tamaya,\ +org.apache.tamaya.spi http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/636dbb56/pom.xml -- diff --git a/pom.xml b/pom.xml index ba3f3c7..6206b00 100644 --- a/pom.xml +++ b/pom.xml @@ -738,6 +738,7 @@ under the License. +collections hazelcast apache-commons jodatime
[43/45] incubator-tamaya-sandbox git commit: TAMAYA-297: Added tests/small fixes.
TAMAYA-297: Added tests/small fixes. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/commit/a8029f4e Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/tree/a8029f4e Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/diff/a8029f4e Branch: refs/heads/master Commit: a8029f4ee1b79dd5ec1730a994a3dcfbd8df6890 Parents: 563437b Author: anatole Authored: Tue Sep 26 09:20:03 2017 +0200 Committer: anatole Committed: Tue Sep 26 09:20:03 2017 +0200 -- .../java/org/apache/tamaya/osgi/Backups.java| 50 - .../org/apache/tamaya/osgi/BackupsTest.java | 107 +++ 2 files changed, 155 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/a8029f4e/osgi/common/src/main/java/org/apache/tamaya/osgi/Backups.java -- diff --git a/osgi/common/src/main/java/org/apache/tamaya/osgi/Backups.java b/osgi/common/src/main/java/org/apache/tamaya/osgi/Backups.java index 01074fd..6205895 100644 --- a/osgi/common/src/main/java/org/apache/tamaya/osgi/Backups.java +++ b/osgi/common/src/main/java/org/apache/tamaya/osgi/Backups.java @@ -28,7 +28,9 @@ import java.util.logging.Level; import java.util.logging.Logger; /** - * Created by atsticks on 19.09.17. + * Singleton class to store OSGI configuration backups before change the OSGI + * Config with Tamaya settings. This allows to restore the configuration in + * case of issues. */ public final class Backups { @@ -38,10 +40,20 @@ public final class Backups { private Backups(){} +/** + * Sets the given backup for a PID. + * @param pid the PID, not null. + * @param config the config to store. + */ public static void set(String pid, Dictionary config){ initialConfigState.put(pid, toHashtable(config)); } +/** + * Converts the dictionary to a hash table to enabled serialization. + * @param dictionary he config, not null. + * @return the correspoinding Hashtable + */ private static Hashtable toHashtable(Dictionary dictionary) { if (dictionary == null) { return null; @@ -58,30 +70,60 @@ public final class Backups { return map; } +/** + * Removes a backup. + * @param pid the PID, not null. + * @return + */ public static Dictionary remove(String pid){ return initialConfigState.remove(pid); } +/** + * Removes all backups. + */ public static void removeAll(){ initialConfigState.clear(); } +/** + * Get a backup for a PID. + * @param pid the PID, not null. + * @return the backup found, or null. + */ public static Dictionary get(String pid){ return initialConfigState.get(pid); } +/** + * Get all current stored backups. + * @return The backups stored, by PID. + */ public static Map> get(){ return new HashMap<>(initialConfigState); } +/** + * Get all current kjnown PIDs. + * @return the PIDs, never null. + */ public static Set getPids(){ return initialConfigState.keySet(); } +/** + * Checks if a backup exists for a given PID. + * @param pid the pid, not null. + * @return + */ public static boolean contains(String pid){ return initialConfigState.containsKey(pid); } +/** + * Saves the bachups into the given config. + * @param config the config, not nul. + */ public static void save(Dictionary config){ try{ ByteArrayOutputStream bos = new ByteArrayOutputStream(); @@ -89,12 +131,16 @@ public final class Backups { oos.writeObject(initialConfigState); oos.flush(); Base64.getEncoder().encode(bos.toByteArray()); -config.put(TAMAYA_BACKUP, Base64.getEncoder().encode(bos.toByteArray())); +config.put(TAMAYA_BACKUP, Base64.getEncoder().encodeToString(bos.toByteArray())); }catch(Exception e){ LOG.log(Level.SEVERE, "Failed to restore OSGI Backups.", e); } } +/** + * Restores the backups ino the given config. + * @param config the config, not null. + */ public static void restore(Dictionary config){ try{ String serialized = (String)config.get("tamaya.backup"); http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/a8029f4e/osgi/common/src/test/java/org/apache/tamaya/osgi/BackupsTest.java -- diff --git a/osgi/common/src/test/java/org/apache/tamaya/osgi/BackupsTest.java b/osgi/common/src/te
[22/45] incubator-tamaya-sandbox git commit: TAMAYA-297: Added, improved commands, improved formatting of table styled outputs.
TAMAYA-297: Added, improved commands, improved formatting of table styled outputs. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/commit/cdd839ce Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/tree/cdd839ce Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/diff/cdd839ce Branch: refs/heads/master Commit: cdd839ceb4ba73cee32f0cecb0175b26c8ca4cfd Parents: 9205386 Author: anatole Authored: Tue Sep 19 12:57:10 2017 +0200 Committer: anatole Committed: Tue Sep 19 12:57:10 2017 +0200 -- osgi/karaf-shell/pom.xml| 7 +- .../karaf/shell/DefaultDisableCommand.java | 3 +- .../karaf/shell/EvaluateCMConfigCommand.java| 63 -- .../tamaya/karaf/shell/GetPolicyCommand.java| 2 +- .../tamaya/karaf/shell/HistoryClearCommand.java | 69 +++ .../tamaya/karaf/shell/HistoryGetCommand.java | 116 +++ .../apache/tamaya/karaf/shell/InfoCommand.java | 4 +- .../tamaya/karaf/shell/PolicyGetCommand.java| 49 .../tamaya/karaf/shell/PolicySetCommand.java| 70 +++ .../tamaya/karaf/shell/PropertyCommand.java | 75 .../tamaya/karaf/shell/PropertyGetCommand.java | 86 ++ .../karaf/shell/PropertySourceCommand.java | 16 ++- .../karaf/shell/PropertySourcesCommand.java | 13 ++- .../tamaya/karaf/shell/SetPolicyCommand.java| 68 --- .../apache/tamaya/karaf/shell/StringUtil.java | 46 .../org/apache/tamaya/karaf/shell/commands | 15 ++- 16 files changed, 478 insertions(+), 224 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/cdd839ce/osgi/karaf-shell/pom.xml -- diff --git a/osgi/karaf-shell/pom.xml b/osgi/karaf-shell/pom.xml index cb857dc..e7c1558 100644 --- a/osgi/karaf-shell/pom.xml +++ b/osgi/karaf-shell/pom.xml @@ -29,7 +29,7 @@ tamaya-karaf-shell_alpha jar -Apache Tamaya :: Karaf :: Shell +Apache Tamaya :: OSGI :: Karaf :: Shell Tamaya Karaf Shell Commands @@ -44,6 +44,11 @@ provided +org.osgi +org.osgi.core +provided + + org.apache.karaf.shell org.apache.karaf.shell.core ${dependency.karaf.version} http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/cdd839ce/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/DefaultDisableCommand.java -- diff --git a/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/DefaultDisableCommand.java b/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/DefaultDisableCommand.java index 0c14da5..99461dc 100644 --- a/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/DefaultDisableCommand.java +++ b/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/DefaultDisableCommand.java @@ -28,6 +28,7 @@ import org.apache.karaf.shell.api.console.CommandLine; import org.apache.karaf.shell.api.console.Completer; import org.apache.karaf.shell.api.console.Session; import org.apache.karaf.shell.support.completers.StringsCompleter; +import org.apache.tamaya.osgi.OperationMode; import org.apache.tamaya.osgi.TamayaConfigPlugin; import java.io.IOException; @@ -58,7 +59,7 @@ public class DefaultDisableCommand implements Action{ @Override public int complete(Session session, CommandLine commandLine, List candidates) { StringsCompleter delegate = new StringsCompleter(); -for(TamayaConfigPlugin.OperationMode mode:TamayaConfigPlugin.OperationMode.values()) { +for(OperationMode mode: OperationMode.values()) { delegate.getStrings().add(mode.toString()); } return delegate.complete(session, commandLine, candidates); http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/cdd839ce/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/EvaluateCMConfigCommand.java -- diff --git a/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/EvaluateCMConfigCommand.java b/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/EvaluateCMConfigCommand.java deleted file mode 100644 index d22022a..000 --- a/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/EvaluateCMConfigCommand.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work
[42/45] incubator-tamaya-sandbox git commit: TAMAYA-297: Ignored failing testsuites.
TAMAYA-297: Ignored failing testsuites. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/commit/563437b1 Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/tree/563437b1 Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/diff/563437b1 Branch: refs/heads/master Commit: 563437b1209a8253fcf606adf5c355a58bd99403 Parents: ee6133b Author: anatole Authored: Tue Sep 26 08:46:41 2017 +0200 Committer: anatole Committed: Tue Sep 26 08:46:41 2017 +0200 -- osgi/common/src/test/java/org/apache/tamaya/osgi/OSGITest.java | 2 ++ .../test/java/org/apache/tamaya/osgi/TamayaConfigPluginTest.java | 2 ++ 2 files changed, 4 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/563437b1/osgi/common/src/test/java/org/apache/tamaya/osgi/OSGITest.java -- diff --git a/osgi/common/src/test/java/org/apache/tamaya/osgi/OSGITest.java b/osgi/common/src/test/java/org/apache/tamaya/osgi/OSGITest.java index 8cfa72d..b65c4d4 100644 --- a/osgi/common/src/test/java/org/apache/tamaya/osgi/OSGITest.java +++ b/osgi/common/src/test/java/org/apache/tamaya/osgi/OSGITest.java @@ -22,6 +22,7 @@ import org.apache.tamaya.spi.ConfigurationProviderSpi; import org.apache.tamaya.spi.ServiceContextManager; import org.junit.After; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.ops4j.pax.exam.Configuration; @@ -43,6 +44,7 @@ import static org.ops4j.pax.exam.CoreOptions.*; @RunWith(PaxExam.class) @ExamReactorStrategy(PerMethod.class) +@Ignore public class OSGITest { @Inject http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/563437b1/osgi/common/src/test/java/org/apache/tamaya/osgi/TamayaConfigPluginTest.java -- diff --git a/osgi/common/src/test/java/org/apache/tamaya/osgi/TamayaConfigPluginTest.java b/osgi/common/src/test/java/org/apache/tamaya/osgi/TamayaConfigPluginTest.java index 704a98e..61d76a2 100644 --- a/osgi/common/src/test/java/org/apache/tamaya/osgi/TamayaConfigPluginTest.java +++ b/osgi/common/src/test/java/org/apache/tamaya/osgi/TamayaConfigPluginTest.java @@ -18,6 +18,7 @@ */ package org.apache.tamaya.osgi; +import org.junit.Ignore; import org.junit.Test; import org.osgi.service.cm.Configuration; @@ -26,6 +27,7 @@ import static org.junit.Assert.*; /** * Created by atsticks on 10.12.16. */ +@Ignore public class TamayaConfigPluginTest { private TamayaConfigPlugin configAdmin = new TamayaConfigPlugin(null);
[25/45] incubator-tamaya-sandbox git commit: TAMAYA-297: Simplified naming.
TAMAYA-297: Simplified naming. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/commit/54ff0e6f Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/tree/54ff0e6f Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/diff/54ff0e6f Branch: refs/heads/master Commit: 54ff0e6f019d8849c124152ff6cf13c26dc5e842 Parents: 39143de Author: anatole Authored: Tue Sep 19 13:00:25 2017 +0200 Committer: anatole Committed: Tue Sep 19 13:00:25 2017 +0200 -- osgi/karaf-features/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/54ff0e6f/osgi/karaf-features/pom.xml -- diff --git a/osgi/karaf-features/pom.xml b/osgi/karaf-features/pom.xml index eb4c7e1..f940767 100644 --- a/osgi/karaf-features/pom.xml +++ b/osgi/karaf-features/pom.xml @@ -28,7 +28,7 @@ limitations under the License. tamaya-karaf-features feature -Apache Tamaya :: Karaf :: Features +Apache Tamaya :: OSGI :: Karaf :: Features Tamaya Karaf Feature Descriptor.
[06/45] incubator-tamaya-sandbox git commit: TAMAYA-260: Fixed basic TCK integration.
TAMAYA-260: Fixed basic TCK integration. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/commit/a3e01813 Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/tree/a3e01813 Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/diff/a3e01813 Branch: refs/heads/master Commit: a3e01813fdd47205ee5bd12353f94358ba633bae Parents: b04b841 Author: anatole Authored: Tue Aug 8 09:22:16 2017 +0200 Committer: anatole Committed: Tue Aug 8 09:22:16 2017 +0200 -- microprofile/src/test/resources/tck-suite.xml | 29 -- microprofile/tck-suite.xml| 29 ++ 2 files changed, 29 insertions(+), 29 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/a3e01813/microprofile/src/test/resources/tck-suite.xml -- diff --git a/microprofile/src/test/resources/tck-suite.xml b/microprofile/src/test/resources/tck-suite.xml deleted file mode 100644 index 7efa750..000 --- a/microprofile/src/test/resources/tck-suite.xml +++ /dev/null @@ -1,29 +0,0 @@ -http://testng.org/testng-1.0.dtd"; > - - - - - - - - - - - \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/a3e01813/microprofile/tck-suite.xml -- diff --git a/microprofile/tck-suite.xml b/microprofile/tck-suite.xml new file mode 100644 index 000..7efa750 --- /dev/null +++ b/microprofile/tck-suite.xml @@ -0,0 +1,29 @@ +http://testng.org/testng-1.0.dtd"; > + + + + + + + + + + + \ No newline at end of file
[23/45] incubator-tamaya-sandbox git commit: TAMAYA-300: Added config history. DId a small refactoring.
TAMAYA-300: Added config history. DId a small refactoring. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/commit/cbd23125 Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/tree/cbd23125 Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/diff/cbd23125 Branch: refs/heads/master Commit: cbd23125f7f47186b651f0ff6bd0e1a1e50a4b78 Parents: cdd839c Author: anatole Authored: Tue Sep 19 12:59:30 2017 +0200 Committer: anatole Committed: Tue Sep 19 12:59:30 2017 +0200 -- .../java/org/apache/tamaya/osgi/Activator.java | 9 +- .../org/apache/tamaya/osgi/ConfigChanger.java | 170 + .../org/apache/tamaya/osgi/ConfigHistory.java | 168 + .../org/apache/tamaya/osgi/OperationMode.java | 31 +++ .../apache/tamaya/osgi/TamayaConfigPlugin.java | 250 +++ .../tamaya/osgi/TamayaConfigPluginTest.java | 75 ++ 6 files changed, 542 insertions(+), 161 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/cbd23125/osgi/common/src/main/java/org/apache/tamaya/osgi/Activator.java -- diff --git a/osgi/common/src/main/java/org/apache/tamaya/osgi/Activator.java b/osgi/common/src/main/java/org/apache/tamaya/osgi/Activator.java index d6c5726..a1522a1 100644 --- a/osgi/common/src/main/java/org/apache/tamaya/osgi/Activator.java +++ b/osgi/common/src/main/java/org/apache/tamaya/osgi/Activator.java @@ -44,7 +44,9 @@ public class Activator implements BundleActivator { private static final Logger LOG = Logger.getLogger(Activator.class.getName()); -private ServiceRegistration registration; +private ServiceRegistration registration; + +private TamayaConfigPlugin plugin; @Override @@ -71,11 +73,11 @@ public class Activator implements BundleActivator { LOG.fine("Using custom ranking for Tamaya OSGI Config plugin: " + ranking); } props.put(Constants.SERVICE_RANKING, DEFAULT_RANKING); -TamayaConfigPlugin plugin = new TamayaConfigPlugin(context); +this.plugin = new TamayaConfigPlugin(context); LOG.info("Registering Tamaya OSGI Config plugin with ranking: " + ranking); registration = context.registerService( TamayaConfigPlugin.class, -plugin, props); +this.plugin, props); LOG.info("Registered Tamaya OSGI Config plugin."); configuration.update(props); } @@ -83,6 +85,7 @@ public class Activator implements BundleActivator { @Override public void stop(BundleContext context) throws Exception { if (registration != null) { +context.removeBundleListener(this.plugin); registration.unregister(); } } http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/cbd23125/osgi/common/src/main/java/org/apache/tamaya/osgi/ConfigChanger.java -- diff --git a/osgi/common/src/main/java/org/apache/tamaya/osgi/ConfigChanger.java b/osgi/common/src/main/java/org/apache/tamaya/osgi/ConfigChanger.java new file mode 100644 index 000..29c4720 --- /dev/null +++ b/osgi/common/src/main/java/org/apache/tamaya/osgi/ConfigChanger.java @@ -0,0 +1,170 @@ +/* + * 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.tamaya.osgi; + +import org.osgi.framework.Bundle; +import org.osgi.framework.BundleContext; +import org.osgi.framework.ServiceReference; +import org.osgi.service.cm.Configuration; +import org.osgi.service.cm.ConfigurationAdmin; + +import java.util.*; +import java.util.logging.Level; +import java.util.logging.Logger; + +/** + * Created by atsticks on 19.09.17. + */ +final class ConfigChanger { + +private static final Logger LOG = Logger.getLogger(TamayaConfigPlugin.class.getName()); +private static final OSGIConfigMapper DEFAULT_CONFIG_MAPPER = new DefaultO
[10/45] incubator-tamaya-sandbox git commit: TAMAYA-274: Simplified compiler settings, set version to 0.4-incubating-SNAPSHOT
TAMAYA-274: Simplified compiler settings, set version to 0.4-incubating-SNAPSHOT Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/commit/f30884f9 Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/tree/f30884f9 Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/diff/f30884f9 Branch: refs/heads/master Commit: f30884f9e0ec2902567fe4e823f6f87ac2c29f98 Parents: 1e2a184 Author: anatole Authored: Wed Aug 9 00:20:09 2017 +0200 Committer: anatole Committed: Wed Aug 9 00:20:09 2017 +0200 -- management/pom.xml| 4 metamodel/pom.xml | 4 .../apache/tamaya/osgi/InjectionKarafTest.java| 18 +- .../org/apache/tamaya/osgi/OSGIKarafTest.java | 12 ++-- pom.xml | 15 --- remote/pom.xml| 4 server/pom.xml| 1 - tamaya-sandbox.iml| 2 +- ui/pom.xml| 3 --- usagetracker/pom.xml | 4 validation/pom.xml| 4 vertx/pom.xml | 3 --- 12 files changed, 24 insertions(+), 50 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/f30884f9/management/pom.xml -- diff --git a/management/pom.xml b/management/pom.xml index 1ac279a..81f64c9 100644 --- a/management/pom.xml +++ b/management/pom.xml @@ -30,10 +30,6 @@ under the License. Apache Tamaya Modules - JMX Support jar - -1.7 - - org.apache.tamaya http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/f30884f9/metamodel/pom.xml -- diff --git a/metamodel/pom.xml b/metamodel/pom.xml index 1f8ae92..b462590 100644 --- a/metamodel/pom.xml +++ b/metamodel/pom.xml @@ -33,10 +33,6 @@ jar - -1.7 - - org.apache.tamaya http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/f30884f9/osgi/karaf-features/src/test/java/org/apache/tamaya/osgi/InjectionKarafTest.java -- diff --git a/osgi/karaf-features/src/test/java/org/apache/tamaya/osgi/InjectionKarafTest.java b/osgi/karaf-features/src/test/java/org/apache/tamaya/osgi/InjectionKarafTest.java index 14e83ed..d8a2366 100644 --- a/osgi/karaf-features/src/test/java/org/apache/tamaya/osgi/InjectionKarafTest.java +++ b/osgi/karaf-features/src/test/java/org/apache/tamaya/osgi/InjectionKarafTest.java @@ -70,7 +70,7 @@ public class InjectionKarafTest { .artifactId("tamaya-osgi-features") .type("xml") .classifier("features") -.version("0.3-incubating-SNAPSHOT"); +.version("0.4-incubating-SNAPSHOT"); return options( KarafDistributionOption.karafDistributionConfiguration() .frameworkUrl(CoreOptions.maven() @@ -94,16 +94,16 @@ public class InjectionKarafTest { "src/test/resources/org.ops4j.pax.logging.cfg")), mavenBundle("org.apache.geronimo.specs", "geronimo-annotation_1.2_spec", "1.0-alpha-1"), -mavenBundle("org.apache.tamaya", "tamaya-api", "0.3-incubating-SNAPSHOT"), -mavenBundle("org.apache.tamaya", "tamaya-core", "0.3-incubating-SNAPSHOT"), -mavenBundle("org.apache.tamaya.ext", "tamaya-spisupport", "0.3-incubating-SNAPSHOT"), -mavenBundle("org.apache.tamaya.ext", "tamaya-functions", "0.3-incubating-SNAPSHOT"), -mavenBundle("org.apache.tamaya.ext", "tamaya-osgi", "0.3-incubating-SNAPSHOT"), +mavenBundle("org.apache.tamaya", "tamaya-api", "0.4-incubating-SNAPSHOT"), +mavenBundle("org.apache.tamaya", "tamaya-core", "0.4-incubating-SNAPSHOT"), +mavenBundle("org.apache.tamaya.ext", "tamaya-spisupport", "0.4-incubating-SNAPSHOT"), +mavenBundle("org.apache.tamaya.ext", "tamaya-functions", "0.4-incubating-SNAPSHOT"), +mavenBundle("org.apache.tamaya.ext", "tamaya-osgi", "0.4-incubating-SNAPSHOT"), // injection libs mavenBundle("org.apache.geronimo.specs", "geronimo-atinject_1.0_spec", "1.0"), -mavenBundle("org.apache.tamaya.ext", "tamaya-injection-api", "0.3-incubating-SNAPSHOT"), -mav
[01/45] incubator-tamaya-sandbox git commit: TAMAYA-145: Fxed conversion issue and invalid config syntax.
Repository: incubator-tamaya-sandbox Updated Branches: refs/heads/master 2c031dcff -> 9fdd5dae7 TAMAYA-145: Fxed conversion issue and invalid config syntax. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/commit/1fec344c Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/tree/1fec344c Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/diff/1fec344c Branch: refs/heads/master Commit: 1fec344c1bf98eb8accea00fbb0c51968bb47685 Parents: 9731be7 Author: anatole Authored: Mon May 1 22:50:40 2017 +0200 Committer: anatole Committed: Mon May 1 22:50:40 2017 +0200 -- .../apache/tamaya/metamodel/internal/ComponentConfigurator.java | 4 metamodel/src/test/resources/IntegrationTests/context-test.xml | 2 +- metamodel/src/test/resources/tamaya-config.xml | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/1fec344c/metamodel/src/main/java/org/apache/tamaya/metamodel/internal/ComponentConfigurator.java -- diff --git a/metamodel/src/main/java/org/apache/tamaya/metamodel/internal/ComponentConfigurator.java b/metamodel/src/main/java/org/apache/tamaya/metamodel/internal/ComponentConfigurator.java index 6e7ea75..30463d4 100644 --- a/metamodel/src/main/java/org/apache/tamaya/metamodel/internal/ComponentConfigurator.java +++ b/metamodel/src/main/java/org/apache/tamaya/metamodel/internal/ComponentConfigurator.java @@ -176,6 +176,10 @@ public final class ComponentConfigurator { case "Number": return Float.valueOf(value); default: +if(Enum.class.isAssignableFrom(targetType)){ +Method m = targetType.getDeclaredMethod("valueOf", String.class); +return m.invoke(null, value); +} Constructor c = targetType.getConstructor(String.class); if (!Modifier.isPublic(c.getModifiers())) { LOG.fine("Setting constructor as accessible: " + targetType.getSimpleName() + "#(String)"); http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/1fec344c/metamodel/src/test/resources/IntegrationTests/context-test.xml -- diff --git a/metamodel/src/test/resources/IntegrationTests/context-test.xml b/metamodel/src/test/resources/IntegrationTests/context-test.xml index e1073f7..2b7ffb4 100644 --- a/metamodel/src/test/resources/IntegrationTests/context-test.xml +++ b/metamodel/src/test/resources/IntegrationTests/context-test.xml @@ -22,7 +22,7 @@ ${properties:system:STAGE?default=DEV} ${properties:system:configdir?default=.} ${properties:system:APP?default=NONE} -${java:org.apache.tamaya.metamodel.MetaContext#id()} +${java:java.util.UUID.randomUUID()} http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/1fec344c/metamodel/src/test/resources/tamaya-config.xml -- diff --git a/metamodel/src/test/resources/tamaya-config.xml b/metamodel/src/test/resources/tamaya-config.xml index bdb3269..d372249 100644 --- a/metamodel/src/test/resources/tamaya-config.xml +++ b/metamodel/src/test/resources/tamaya-config.xml @@ -64,7 +64,7 @@ - + @@ -74,7 +74,7 @@ "METACONTEXT: " + MetaContext.getInstance().getProperties() -"CONFIG : " + Configuration.getInstance().getProperties() +"CONFIG : " + config
[04/45] incubator-tamaya-sandbox git commit: TAMAYA-256: Added missing config file.
TAMAYA-256: Added missing config file. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/commit/e52a5a3a Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/tree/e52a5a3a Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/diff/e52a5a3a Branch: refs/heads/master Commit: e52a5a3ac66d585e8b9dec7b4112b53ead367a89 Parents: 2eb290d Author: anatole Authored: Mon Aug 7 18:03:36 2017 +0200 Committer: anatole Committed: Mon Aug 7 18:03:36 2017 +0200 -- .../META-INF/javaconfiguration.properties| 19 +++ 1 file changed, 19 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/e52a5a3a/vertx/src/test/resources/META-INF/javaconfiguration.properties -- diff --git a/vertx/src/test/resources/META-INF/javaconfiguration.properties b/vertx/src/test/resources/META-INF/javaconfiguration.properties new file mode 100644 index 000..fbe9178 --- /dev/null +++ b/vertx/src/test/resources/META-INF/javaconfiguration.properties @@ -0,0 +1,19 @@ +# +# 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 current 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. +# +message=Good Bye from Apache Tamaya! \ No newline at end of file
[19/45] incubator-tamaya-sandbox git commit: TAMAYA-274: Fixed basic service loading in OSGI. Added missing requirements.
TAMAYA-274: Fixed basic service loading in OSGI. Added missing requirements. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/commit/c345b5c2 Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/tree/c345b5c2 Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/diff/c345b5c2 Branch: refs/heads/master Commit: c345b5c2c0c8541c13930585392c7e7c59be012f Parents: 5925c34 Author: anatole Authored: Sun Sep 17 01:51:20 2017 +0200 Committer: anatole Committed: Sun Sep 17 01:51:20 2017 +0200 -- consul/bnd.bnd | 4 +++- etcd/bnd.bnd | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/c345b5c2/consul/bnd.bnd -- diff --git a/consul/bnd.bnd b/consul/bnd.bnd index 8c328f7..bb6123a 100644 --- a/consul/bnd.bnd +++ b/consul/bnd.bnd @@ -23,7 +23,9 @@ Export-Package: \ org.apache.tamaya.consul Import-Package: \ org.apache.tamaya,\ -org.apache.tamaya.spi +org.apache.tamaya.spi,\ +org.apache.tamaya.mutableconfig,\ +org.apache.tamaya.mutableconfig.spi Export-Service: \ org.apache.tamaya.spi.PropertySource \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/c345b5c2/etcd/bnd.bnd -- diff --git a/etcd/bnd.bnd b/etcd/bnd.bnd index 792c69c..027e033 100644 --- a/etcd/bnd.bnd +++ b/etcd/bnd.bnd @@ -23,7 +23,9 @@ Export-Package: \ org.apache.tamaya.etcd Import-Package: \ org.apache.tamaya,\ -org.apache.tamaya.spi +org.apache.tamaya.spi,\ +org.apache.tamaya.mutableconfig\ +org.apache.tamaya.mutableconfig.spi Export-Service: \ org.apache.tamaya.spi.PropertySource \ No newline at end of file
[03/45] incubator-tamaya-sandbox git commit: TAMAYA-274: Moved to Java 8, fixed Javadoc issues.
TAMAYA-274: Moved to Java 8, fixed Javadoc issues. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/commit/2eb290de Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/tree/2eb290de Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/diff/2eb290de Branch: refs/heads/master Commit: 2eb290dec00b49e5fab1a35965a62397caa1ce3f Parents: 31b9c0e Author: anatole Authored: Mon Aug 7 17:58:46 2017 +0200 Committer: anatole Committed: Mon Aug 7 17:58:46 2017 +0200 -- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/2eb290de/pom.xml -- diff --git a/pom.xml b/pom.xml index a788354..afc8a0e 100644 --- a/pom.xml +++ b/pom.xml @@ -47,7 +47,7 @@ under the License. 3.0-incubating-SNAPSHOT 2.5 false -1.7 +1.8 5.0.0 ${osgi.version} ${jdkVersion}
[31/45] incubator-tamaya-sandbox git commit: TAMAYA-297: Fixed invalid symbolic name, changed entry order in pom.
TAMAYA-297: Fixed invalid symbolic name, changed entry order in pom. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/commit/39bf8240 Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/tree/39bf8240 Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/diff/39bf8240 Branch: refs/heads/master Commit: 39bf824056ed708c2e40d1d15fb5d72fdfbb257e Parents: 4c25938 Author: anatole Authored: Thu Sep 21 18:25:21 2017 +0200 Committer: anatole Committed: Thu Sep 21 18:25:21 2017 +0200 -- configured-sysprops/pom.xml | 10 +-- osgi/felix-shell/bnd.bnd| 36 osgi/felix-shell/pom.xml| 92 .../tamaya/felix/shell/BackupCreateCommand.java | 47 ++ .../tamaya/felix/shell/BackupDeleteCommand.java | 42 + .../tamaya/felix/shell/BackupListCommand.java | 41 + .../tamaya/felix/shell/ConfigCommand.java | 42 + .../felix/shell/DefaultDisableCommand.java | 47 ++ .../tamaya/felix/shell/GetPolicyCommand.java| 47 ++ .../felix/shell/HistoryDeleteCommand.java | 42 + .../tamaya/felix/shell/HistoryGetCommand.java | 47 ++ .../felix/shell/HistorySizeGetCommand.java | 42 + .../felix/shell/HistorySizeSetCommand.java | 47 ++ .../apache/tamaya/felix/shell/InfoCommand.java | 46 ++ .../tamaya/felix/shell/PolicyGetCommand.java| 47 ++ .../tamaya/felix/shell/PolicySetCommand.java| 49 +++ .../tamaya/felix/shell/PropertyGetCommand.java | 50 +++ .../felix/shell/PropertySourceCommand.java | 42 + .../felix/shell/PropertySourcesCommand.java | 42 + .../org/apache/tamaya/karaf/shell/commands | 37 20 files changed, 890 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/39bf8240/configured-sysprops/pom.xml -- diff --git a/configured-sysprops/pom.xml b/configured-sysprops/pom.xml index 8384d04..28ce175 100644 --- a/configured-sysprops/pom.xml +++ b/configured-sysprops/pom.xml @@ -32,11 +32,6 @@ under the License. -junit -junit -test - - org.apache.tamaya tamaya-api ${project.parent.version} @@ -47,6 +42,11 @@ under the License. ${project.parent.version} test + +junit +junit +test + http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/39bf8240/osgi/felix-shell/bnd.bnd -- diff --git a/osgi/felix-shell/bnd.bnd b/osgi/felix-shell/bnd.bnd new file mode 100644 index 000..643f788 --- /dev/null +++ b/osgi/felix-shell/bnd.bnd @@ -0,0 +1,36 @@ +-buildpath: \ + osgi.annotation; version=6.0.0,\ + osgi.core; version=6.0,\ + osgi.cmpn; version=6.0 + +-testpath: \ + ${junit} + +javac.source: 1.8 +javac.target: 1.8 + +Bundle-Version: ${version}.${tstamp} +Bundle-Name: Apache Tamaya - Felix Shell Commands +Bundle-SymbolicName: org.apache.tamaya.osgi.felix.shell +Bundle-Description: Apacha Tamaya Configuration - Felix Shell Extensions +Bundle-Category: Implementation +Bundle-Copyright: (C) Apache Foundation +Bundle-License: Apache Licence version 2 +Bundle-Vendor: Apache Software Foundation +Bundle-ContactAddress: dev-tam...@incubator.apache.org +Bundle-DocURL: http://tamaya.apache.org +Export-Package: \ + org.apache.tamaya.felix.shell +Import-Package: \ +org.osgi.service.cm,\ +org.osgi.framework,\ +org.apache.tamaya,\ +org.apache.tamaya.spi,\ +org.apache.tamaya.functions,\ +org.apache.tamaya.spisupport,\ +org.apache.tamaya.osgi,\ +org.apache.felix.service.command,\ +org.apache.karaf.shell.api.console,\ +org.apache.karaf.shell.api.action,\ +org.apache.karaf.shell.api.action.lifecycle,\ +org.apache.karaf.shell.support.completers http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/39bf8240/osgi/felix-shell/pom.xml -- diff --git a/osgi/felix-shell/pom.xml b/osgi/felix-shell/pom.xml new file mode 100644 index 000..d19cb08 --- /dev/null +++ b/osgi/felix-shell/pom.xml @@ -0,0 +1,92 @@ + +http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd";> + + + +4.0.0 + + +org.apache.tamaya.e
[38/45] incubator-tamaya-sandbox git commit: TAMAYA-297: Removed OSGIConfigMapper to reduce complexity. Added restore functionality for backups.
TAMAYA-297: Removed OSGIConfigMapper to reduce complexity. Added restore functionality for backups. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/commit/dab1da7a Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/tree/dab1da7a Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/diff/dab1da7a Branch: refs/heads/master Commit: dab1da7a7f959634c6b6ba7e6037e14b1f4f8575 Parents: fc0c72a Author: anatole Authored: Sun Sep 24 21:41:31 2017 +0200 Committer: anatole Committed: Sun Sep 24 21:41:31 2017 +0200 -- .../java/org/apache/tamaya/osgi/Backups.java| 110 +++ .../org/apache/tamaya/osgi/InitialState.java| 110 --- .../apache/tamaya/osgi/OSGIConfigMapper.java| 38 --- .../tamaya/osgi/commands/BackupCommands.java| 44 ++-- 4 files changed, 147 insertions(+), 155 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/dab1da7a/osgi/common/src/main/java/org/apache/tamaya/osgi/Backups.java -- diff --git a/osgi/common/src/main/java/org/apache/tamaya/osgi/Backups.java b/osgi/common/src/main/java/org/apache/tamaya/osgi/Backups.java new file mode 100644 index 000..cacf830 --- /dev/null +++ b/osgi/common/src/main/java/org/apache/tamaya/osgi/Backups.java @@ -0,0 +1,110 @@ +/* + * 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.tamaya.osgi; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.util.*; +import java.util.concurrent.ConcurrentHashMap; +import java.util.logging.Level; +import java.util.logging.Logger; + +/** + * Created by atsticks on 19.09.17. + */ +public final class Backups { + +private static final Logger LOG = Logger.getLogger(Backups.class.getName()); +private static Map> initialConfigState = new ConcurrentHashMap<>(); + +private Backups(){} + +public static void set(String pid, Dictionary config){ +initialConfigState.put(pid, toHashtable(config)); +} + +private static Hashtable toHashtable(Dictionary dictionary) { +if (dictionary == null) { +return null; +} +if(dictionary instanceof Hashtable){ +return (Hashtable) dictionary; +} +Hashtable map = new Hashtable<>(dictionary.size()); +Enumeration keys = dictionary.keys(); +while (keys.hasMoreElements()) { +String key = keys.nextElement(); +map.put(key, dictionary.get(key)); +} +return map; +} + +public static Dictionary remove(String pid){ +return initialConfigState.remove(pid); +} + +public static void removeAll(){ +initialConfigState.clear(); +} + +public static Dictionary get(String pid){ +return initialConfigState.get(pid); +} + +public static Map> get(){ +return new HashMap<>(initialConfigState); +} + +public static Set getPids(){ +return initialConfigState.keySet(); +} + +public static boolean contains(String pid){ +return initialConfigState.containsKey(pid); +} + +public static void save(TamayaConfigPlugin plugin){ +try{ +ByteArrayOutputStream bos = new ByteArrayOutputStream(); +ObjectOutputStream oos = new ObjectOutputStream(bos); +oos.writeObject(initialConfigState); +oos.flush(); +Base64.getEncoder().encode(bos.toByteArray()); +plugin.setConfigValue("backup", Base64.getEncoder().encode(bos.toByteArray())); +}catch(Exception e){ +LOG.log(Level.SEVERE, "Failed to restore OSGI Backups.", e); +} +} + +public static void restore(TamayaConfigPlugin plugin){ +try{ +String serialized = (String)plugin.getConfigValue("backup"); +if(se
[44/45] incubator-tamaya-sandbox git commit: TAMAYA-297: Added tests using mocks instead of PAX.
TAMAYA-297: Added tests using mocks instead of PAX. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/commit/d0e9a65f Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/tree/d0e9a65f Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/diff/d0e9a65f Branch: refs/heads/master Commit: d0e9a65ff9c6eabf9d5106ad75498a6e596e932d Parents: a8029f4 Author: anatole Authored: Thu Sep 28 11:21:47 2017 +0200 Committer: anatole Committed: Thu Sep 28 11:21:47 2017 +0200 -- osgi/common/bnd.bnd | 3 +- osgi/common/pom.xml | 65 ++ .../apache/tamaya/osgi/commands/StringUtil.java | 2 +- .../apache/tamaya/osgi/AbstractOSGITest.java| 89 + .../org/apache/tamaya/osgi/OSGIBasicTests.java | 84 .../java/org/apache/tamaya/osgi/OSGITest.java | 127 --- .../tamaya/osgi/TamayaConfigPluginTest.java | 116 +++-- osgi/common/src/test/resources/arquillian.xml | 27 osgi/common/src/test/resources/felix.properties | 23 osgi/pom.xml| 53 +--- 10 files changed, 297 insertions(+), 292 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/d0e9a65f/osgi/common/bnd.bnd -- diff --git a/osgi/common/bnd.bnd b/osgi/common/bnd.bnd index af8e245..4731c08 100644 --- a/osgi/common/bnd.bnd +++ b/osgi/common/bnd.bnd @@ -30,5 +30,4 @@ Import-Package: \ org.apache.tamaya.spi,\ org.apache.tamaya.functions,\ org.apache.tamaya.spisupport -Export-Service: org.osgi.service.cm.ConfigurationPlugin,\ -org.apache.tamaya.osgi.TamayaConfigPlugin +Export-Service: org.apache.tamaya.osgi.TamayaConfigPlugin http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/d0e9a65f/osgi/common/pom.xml -- diff --git a/osgi/common/pom.xml b/osgi/common/pom.xml index fdcb7f3..fd4d8db 100644 --- a/osgi/common/pom.xml +++ b/osgi/common/pom.xml @@ -32,21 +32,29 @@ Apache Tamaya :: OSGi :: ConfigurationPlugin Tamaya Based OSGI ConfigurationPlugin Implementation + +1.5.0 +1.5.1 + +4.9.2 +2.5.2 +1.6.6 +1.9.5 +1.0 + + org.osgi org.osgi.core -provided org.osgi org.osgi.compendium -provided org.osgi org.osgi.util.tracker -provided @@ -83,53 +91,66 @@ junit junit + +org.mockito +mockito-core + - + org.ops4j.pax.exam -pax-exam-container-forked +pax-exam-container-karaf +${pax.exam.version} +test org.ops4j.pax.exam pax-exam-junit4 +${pax.exam.version} +test org.ops4j.pax.exam pax-exam-link-mvn +${pax.exam.version} +test org.ops4j.pax.url pax-url-aether +${pax.url.version} +test + + +org.ops4j.pax.tinybundles +tinybundles +2.1.1 +test org.apache.felix org.apache.felix.framework +5.6.8 +provided + + +org.apache.felix +org.apache.felix.configadmin +1.8.16 +provided ch.qos.logback logback-core +1.2.3 +test ch.qos.logback logback-classic +1.2.3 +test - -org.ops4j.pax.exam -pax-exam - - -org.ops4j.pax.exam -pax-exam-junit4 - - -org.ops4j.pax.url -pax-url-wrap - - -org.ops4j.pax.url -pax-url-reference - - http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/d0e9a65f/osgi/common/src/main/java/org/apache/tamaya/osgi/commands/StringUtil.java -- diff --git a/osgi/common/src/main/java/org/apache/tamaya/osgi/commands/StringUtil.java b/osgi/common/src/main/java/org/apache/tamaya/osgi/commands/StringUtil.java index b6819
[34/45] incubator-tamaya-sandbox git commit: TAMAYA-297: Fixes on OSGI commands, added propagation flag.
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/86713156/osgi/gogo-shell/src/main/java/org/apache/tamaya/gogo/shell/Activator.java -- diff --git a/osgi/gogo-shell/src/main/java/org/apache/tamaya/gogo/shell/Activator.java b/osgi/gogo-shell/src/main/java/org/apache/tamaya/gogo/shell/Activator.java index 8c07c24..ac83d0d 100644 --- a/osgi/gogo-shell/src/main/java/org/apache/tamaya/gogo/shell/Activator.java +++ b/osgi/gogo-shell/src/main/java/org/apache/tamaya/gogo/shell/Activator.java @@ -45,26 +45,27 @@ public class Activator implements BundleActivator { Dictionary props = new Hashtable<>(); props.put("osgi.command.scope", "tamaya"); props.put("osgi.command.function", -new String[] {"config", "property_get", -"propertysource_get","propertysources_get"}); +new String[] {"tm_config", "tm_property", +"tm_propertysource","tm_propertysources"}); configReg = context.registerService( ConfigCommands.class, new ConfigCommands(context), props); props.put("osgi.command.function", -new String[] {"history_get","history_delete", -"maxhistory_get", "maxhistory_set"}); +new String[] {"tm_history","tm_history_delete","tm_history_delete_all", +"tm_history_maxsize", "tm_history_maxsize_set"}); histReg = context.registerService( HistoryCommands.class, new HistoryCommands(context), props); props.put("osgi.command.function", -new String[] {"backup_create","backup_delete", -"backup_get"}); +new String[] {"tm_backup_create","tm_backup_delete", +"tm_backup"}); backupReg = context.registerService( BackupCommands.class, new BackupCommands(context), props); props.put("osgi.command.function", -new String[] {"tamaya_disable","tamaya_policy_get", -"tamaya_policy_set","tamaya_info"}); +new String[] {"tm_disable","tm_policy", +"tm_policy_set","tm_info", "tm_propagate_updates", +"tm_propagate_updates_set"}); settingsReg = context.registerService( SettingsCommands.class, new SettingsCommands(context), props); http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/86713156/osgi/gogo-shell/src/main/java/org/apache/tamaya/gogo/shell/BackupCommands.java -- diff --git a/osgi/gogo-shell/src/main/java/org/apache/tamaya/gogo/shell/BackupCommands.java b/osgi/gogo-shell/src/main/java/org/apache/tamaya/gogo/shell/BackupCommands.java index 79e4ca1..cd8caf2 100644 --- a/osgi/gogo-shell/src/main/java/org/apache/tamaya/gogo/shell/BackupCommands.java +++ b/osgi/gogo-shell/src/main/java/org/apache/tamaya/gogo/shell/BackupCommands.java @@ -42,21 +42,21 @@ public class BackupCommands { @Descriptor("Creates an OSGI ConfigAdmin configuration backup for a PID.") -public void backup_create(@Parameter(absentValue = Parameter.UNSPECIFIED, names={"-p", "--pid"}) +public void tm_backup_create(@Parameter(absentValue = Parameter.UNSPECIFIED, names={"-p", "--pid"}) @Descriptor("The PID (requred)") String pid, - @Parameter(absentValue = Parameter.UNSPECIFIED, names={"-f", "--force"}) + @Parameter(absentValue = Parameter.UNSPECIFIED, names={"-f", "--force"}) @Descriptor("If set any existing backup will be overriden, default is false.") Boolean force) throws IOException { System.out.println(org.apache.tamaya.osgi.commands.BackupCommands.createBackup(getService(ConfigurationAdmin.class), pid, force)); } @Descriptor("Deletes an OSGI ConfigAdmin configuration backup for a PID.") -public void backup_delete(@Parameter(absentValue = Parameter.UNSPECIFIED, names={"-p", "--pid"}) +public void tm_backup_delete(@Parameter(absentValue = Parameter.UNSPECIFIED, names={"-p", "--pid"}) @Descriptor("The target PID") String pid) throws IOException { System.out.println(org.apache.tamaya.osgi.commands.BackupCommands.deleteBackup(pid)); } @Descriptor("Shows the contents of the OSGI ConfigAdmin configuration backup for a PID.") -public void backup_get(@Parameter(absentValue = Parameter.UNSPECIFIED, names={"-p", "--pid"}) +public void tm_backup_get(@Parameter(absentValue = Parameter.UNSPECIFIED, names={"-p", "--pid"}) @Descriptor("The PID (requred)") String pid) throws IOException { System.out.println(org.apache.tamaya.osgi
[16/45] incubator-tamaya-sandbox git commit: TAMAYA-260: Fixed CDI tests/impl for all non Provider-related test cases.
TAMAYA-260: Fixed CDI tests/impl for all non Provider-related test cases. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/commit/4a63a4a4 Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/tree/4a63a4a4 Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/diff/4a63a4a4 Branch: refs/heads/master Commit: 4a63a4a4f30492535bd3b98881b442f681d69f78 Parents: 50927f4 Author: anatole Authored: Mon Aug 14 01:13:13 2017 +0200 Committer: anatole Committed: Mon Aug 14 01:13:13 2017 +0200 -- .../microprofile/cdi/BridgingConfigBean.java| 3 ++- .../cdi/MicroprofileCDIExtension.java | 2 +- .../cdi/MicroprofileConfigurationProducer.java | 28 +++- .../imported/CDIPlainInjectionTest.java | 16 ++- 4 files changed, 34 insertions(+), 15 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/4a63a4a4/microprofile/src/main/java/org/apache/tamaya/microprofile/cdi/BridgingConfigBean.java -- diff --git a/microprofile/src/main/java/org/apache/tamaya/microprofile/cdi/BridgingConfigBean.java b/microprofile/src/main/java/org/apache/tamaya/microprofile/cdi/BridgingConfigBean.java index 763f6ed..deb2496 100644 --- a/microprofile/src/main/java/org/apache/tamaya/microprofile/cdi/BridgingConfigBean.java +++ b/microprofile/src/main/java/org/apache/tamaya/microprofile/cdi/BridgingConfigBean.java @@ -79,7 +79,8 @@ final class BridgingConfigBean implements Bean { @Override public boolean isNullable() { -return delegate.isNullable(); +return false; +// delegate.isNullable(); } @Override http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/4a63a4a4/microprofile/src/main/java/org/apache/tamaya/microprofile/cdi/MicroprofileCDIExtension.java -- diff --git a/microprofile/src/main/java/org/apache/tamaya/microprofile/cdi/MicroprofileCDIExtension.java b/microprofile/src/main/java/org/apache/tamaya/microprofile/cdi/MicroprofileCDIExtension.java index 9260d3d..7a819fc 100644 --- a/microprofile/src/main/java/org/apache/tamaya/microprofile/cdi/MicroprofileCDIExtension.java +++ b/microprofile/src/main/java/org/apache/tamaya/microprofile/cdi/MicroprofileCDIExtension.java @@ -63,7 +63,7 @@ public class MicroprofileCDIExtension implements Extension { if (injectionPoint.getAnnotated().isAnnotationPresent(ConfigProperty.class)) { System.err.println("Configured: " + injectionPoint); final ConfigProperty annotation = injectionPoint.getAnnotated().getAnnotation(ConfigProperty.class); -String key = !annotation.name().isEmpty()?annotation.name():injectionPoint.getMember().getName(); +String key = !annotation.name().isEmpty()?annotation.name():MicroprofileConfigurationProducer.getDefaultKey(injectionPoint); Member member = injectionPoint.getMember(); if(member instanceof Field) { types.add(((Field) member).getType()); http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/4a63a4a4/microprofile/src/main/java/org/apache/tamaya/microprofile/cdi/MicroprofileConfigurationProducer.java -- diff --git a/microprofile/src/main/java/org/apache/tamaya/microprofile/cdi/MicroprofileConfigurationProducer.java b/microprofile/src/main/java/org/apache/tamaya/microprofile/cdi/MicroprofileConfigurationProducer.java index 7a7799f..e6c1174 100644 --- a/microprofile/src/main/java/org/apache/tamaya/microprofile/cdi/MicroprofileConfigurationProducer.java +++ b/microprofile/src/main/java/org/apache/tamaya/microprofile/cdi/MicroprofileConfigurationProducer.java @@ -16,6 +16,7 @@ */ package org.apache.tamaya.microprofile.cdi; +import org.apache.commons.lang.StringUtils; import org.apache.tamaya.*; import org.apache.tamaya.spi.ConversionContext; import org.apache.tamaya.spi.PropertyConverter; @@ -34,6 +35,8 @@ import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; +import static org.apache.commons.lang.WordUtils.uncapitalize; + /** * Producer bean for configuration properties. */ @@ -45,9 +48,12 @@ public class MicroprofileConfigurationProducer { @Produces @ConfigProperty public Object resolveAndConvert(final InjectionPoint injectionPoint) { -System.err.println("Inject: " + injectionPoint); +LOGGER.finest( () -> "Inject: " + injectionPoint); final ConfigProperty annotation = injectionPoint.getAnnotated().getAnnotation(C
[18/45] incubator-tamaya-sandbox git commit: TAMAYA-274: Improved BND configs for better OSGI support, added OSGI annotations.
TAMAYA-274: Improved BND configs for better OSGI support, added OSGI annotations. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/commit/5925c34d Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/tree/5925c34d Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/diff/5925c34d Branch: refs/heads/master Commit: 5925c34d9d0a17715da81473acbad4e8c66555e1 Parents: b2c69a1 Author: anatole Authored: Sun Sep 3 22:50:18 2017 +0200 Committer: anatole Committed: Sun Sep 3 22:50:18 2017 +0200 -- apache-commons/bnd.bnd | 27 +- camel/bnd.bnd | 25 - configured-sysprops/bnd.bnd | 25 - consul/bnd.bnd | 28 ++- etcd/bnd.bnd| 28 ++- hazelcast/bnd.bnd | 27 +- jodatime/bnd.bnd| 27 +- management/bnd.bnd | 27 +- metamodel/bnd.bnd | 35 -- .../internal/CombinationPolicyReader.java | 2 ++ .../DSLLoadingConfigurationProviderSpi.java | 2 ++ .../metamodel/internal/MetaContextReader.java | 2 ++ .../internal/PropertyConverterReader.java | 2 ++ .../internal/PropertyFilterOrderingReader.java | 2 ++ .../internal/PropertyFilterReader.java | 2 ++ .../internal/PropertySourceOrderingReader.java | 2 ++ .../internal/PropertySourceReader.java | 2 ++ .../internal/factories/CLIArgumentsFactory.java | 2 ++ .../factories/EnvPropertiesFactory.java | 2 ++ .../factories/FilePropertySourceFactory.java| 2 ++ .../ResourcePropertySourceFactory.java | 2 ++ .../ResourcePropertySourceProviderFactory.java | 2 ++ .../factories/SysPropertiesFactory.java | 2 ++ .../factories/URLPropertySourceFactory.java | 2 ++ .../internal/resolver/JavaResolver.java | 2 ++ .../internal/resolver/PropertiesResolver.java | 2 ++ microprofile/bnd.bnd| 34 ++ .../cdi/MicroprofileConfigurationProducer.java | 5 ++- .../imported/CDIPlainInjectionTest.java | 5 ++- osgi/common/bnd.bnd | 27 +++--- .../src/main/features/features.xml | 12 +++ pom.xml | 4 +-- propertysources/bnd.bnd | 26 +- remote/bnd.bnd | 25 - server/bnd.bnd | 27 -- ui/base/bnd.bnd | 38 +--- ui/events/bnd.bnd | 31 +++- ui/mutableconfig/bnd.bnd| 31 +++- uom/bnd.bnd | 29 +-- usagetracker/bnd.bnd| 33 +++-- validation/bnd.bnd | 33 +++-- vertx/bnd.bnd | 26 +- 42 files changed, 625 insertions(+), 44 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/5925c34d/apache-commons/bnd.bnd -- diff --git a/apache-commons/bnd.bnd b/apache-commons/bnd.bnd index bd8886b..e7dfd6d 100644 --- a/apache-commons/bnd.bnd +++ b/apache-commons/bnd.bnd @@ -1,3 +1,28 @@ +-buildpath: \ + osgi.annotation; version=6.0.0,\ + osgi.core; version=6.0,\ + osgi.cmpn; version=6.0 + +-testpath: \ + ${junit} + +javac.source: 1.8 +javac.target: 1.8 + +Bundle-Version: ${version}.${tstamp} +Bundle-Name: Apache Tamaya - Commons Integration +Bundle-SymbolicName: org.apache.tamaya.commons +Bundle-Description: Apacha Tamaya Config - Commons Integration Support +Bundle-Category: Implementation +Bundle-Copyright: (C) Apache Foundation +Bundle-License: Apache Licence version 2 +Bundle-Vendor: Apache Software Foundation +Bundle-ContactAddress: dev-tam...@incubator.apache.org +Bundle-DocURL: http://tamaya.apache.org Export-Package: \ org.apache.tamaya.commons -Bundle-SymbolicName: org.apache.tamaya.commons \ No newline at end of file +Import-Package: \ +org.apache.tamaya,\ +org.apache.tamaya.spi +Export-Service: \ +org.apache.tamaya.format.ConfigurationFormat http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/5925c34d/camel/bnd.bnd -- diff --git a/camel/bnd.bnd b/camel/bnd.bnd index 667c00c..a
[39/45] incubator-tamaya-sandbox git commit: TAMAYA-297: Removed OSGIConfigMapper to reduce complexity. Added restore functionality for backups.
TAMAYA-297: Removed OSGIConfigMapper to reduce complexity. Added restore functionality for backups. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/commit/2281cb3b Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/tree/2281cb3b Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/diff/2281cb3b Branch: refs/heads/master Commit: 2281cb3b60ea8fbf1740a20b6ab706ab2e0a757f Parents: dab1da7 Author: anatole Authored: Sun Sep 24 21:41:55 2017 +0200 Committer: anatole Committed: Sun Sep 24 21:41:55 2017 +0200 -- .../org/apache/tamaya/osgi/ConfigChanger.java | 163 +++ .../apache/tamaya/osgi/TamayaConfigPlugin.java | 140 +++- .../tamaya/osgi/commands/ConfigCommands.java| 90 +++--- 3 files changed, 259 insertions(+), 134 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/2281cb3b/osgi/common/src/main/java/org/apache/tamaya/osgi/ConfigChanger.java -- diff --git a/osgi/common/src/main/java/org/apache/tamaya/osgi/ConfigChanger.java b/osgi/common/src/main/java/org/apache/tamaya/osgi/ConfigChanger.java index f0ecdfb..71fe18b 100644 --- a/osgi/common/src/main/java/org/apache/tamaya/osgi/ConfigChanger.java +++ b/osgi/common/src/main/java/org/apache/tamaya/osgi/ConfigChanger.java @@ -18,13 +18,22 @@ */ package org.apache.tamaya.osgi; +import org.apache.tamaya.ConfigurationProvider; +import org.apache.tamaya.functions.ConfigurationFunctions; import org.osgi.framework.Bundle; import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceReference; import org.osgi.service.cm.Configuration; import org.osgi.service.cm.ConfigurationAdmin; -import java.util.*; +import java.io.IOException; +import java.util.Date; +import java.util.Dictionary; +import java.util.Enumeration; +import java.util.HashMap; +import java.util.Hashtable; +import java.util.Map; +import java.util.Objects; import java.util.logging.Level; import java.util.logging.Logger; @@ -34,7 +43,8 @@ import java.util.logging.Logger; final class ConfigChanger { private static final Logger LOG = Logger.getLogger(TamayaConfigPlugin.class.getName()); -private static final OSGIConfigMapper DEFAULT_CONFIG_MAPPER = new DefaultOSGIConfigMapper(); +private static final String TAMAYA_OPERATION_MODE = "tamaya-operationmode"; +private static final String TAMAYA_ROOT = "tamaya-root"; private BundleContext context; private ConfigurationAdmin cm; @@ -53,55 +63,82 @@ final class ConfigChanger { return cm; } -public void configure(String pid, Bundle bundle, OperationMode defaultOpMode) { -OperationMode opMode = Objects.requireNonNull(defaultOpMode); -if(bundle!=null) { -String opVal = bundle.getHeaders().get("Tamaya-OperationMode"); -if (opVal != null) { -opMode = OperationMode.valueOf(opVal.toUpperCase()); -} -} -LOG.finest("Evaluating Tamaya Config for PID: " + pid); -if(bundle!=null) { -ConfigHistory.configuring(pid, "bundle=" + bundle.getSymbolicName() + ", bundle-id=" + bundle.getBundleId() + ", operationMode=" + opMode); -}else{ -ConfigHistory.configuring(pid, "trigger=Tamaya, operationMode=" + opMode); -} -org.apache.tamaya.Configuration tamayaConfig = configMapper().getConfiguration(pid); -if (tamayaConfig == null) { -LOG.finest("No Tamaya configuration for PID: " + pid); -return; -} +public Dictionary configure(String pid, Bundle bundle, OperationMode operationMode, boolean opModeExplicit, boolean dryRun) { try { +String root = '[' + pid + ']'; // TODO Check for Bundle.getLocation() usage here... Configuration osgiConfig = cm.getConfiguration(pid, bundle!=null?bundle.getLocation():null); +OperationMode opMode = Objects.requireNonNull(operationMode); +// Check manifest config +if(bundle!=null) { +if(!opModeExplicit) { +String opVal = bundle.getHeaders().get(TAMAYA_OPERATION_MODE); +if (opVal != null) { +opMode = OperationMode.valueOf(opVal.toUpperCase()); +} +} +String customRoot = bundle.getHeaders().get(TAMAYA_ROOT); +if(customRoot!=null){ +root = customRoot; +} +} +// Check for dynamic OSGI overrides if(osgiConfig!=null){ -Dictionary dictionary = osgiConfig.getProperties()
[09/45] incubator-tamaya-sandbox git commit: TAMAYA-260: Implemented all basic microprofile features. Last 3 failres are to be discussed with MP folks.
TAMAYA-260: Implemented all basic microprofile features. Last 3 failres are to be discussed with MP folks. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/commit/1e2a184f Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/tree/1e2a184f Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/diff/1e2a184f Branch: refs/heads/master Commit: 1e2a184f80167576c6b884f004083bf5496cfe95 Parents: d9e2d54 Author: anatole Authored: Wed Aug 9 00:18:52 2017 +0200 Committer: anatole Committed: Wed Aug 9 00:18:52 2017 +0200 -- .../microprofile/MicroprofileAdapter.java | 1 + .../microprofile/MicroprofileConfigBuilder.java | 46 +++- .../MicroprofileConfigProviderResolver.java | 8 +- .../MicroprofileConfigurationProducer.java | 104 .../MicroprofileDefaultProperties.java | 33 +++ .../microprofile/TamayaPropertySource.java | 4 +- .../org.apache.tamaya.spi.PropertySource| 20 ++ .../MicroprofileConfigBuilderTest.java | 3 +- .../MicroprofileConfigProviderTest.java | 2 +- .../microprofile/MicroprofileConfigTest.java| 11 +- .../MPSystemPropertiesConfigSource.java | 34 --- .../AutoDiscoveredConfigSourceTest.java | 64 + .../imported/CDIPlainInjectionTest.java | 226 ++ .../imported/ConfigProviderTest.java| 143 +++ .../microprofile/imported/ConverterTest.java| 235 +++ .../imported/CustomConfigSourceTest.java| 61 + .../imported/OptionalValuesBean.java| 61 + .../imported/broken/ConfigOwner.java| 39 +++ .../imported/broken/CustomConverterBean.java| 46 ...MissingConverterOnInstanceInjectionTest.java | 62 + .../MissingValueOnInstanceInjectionTest.java| 61 + .../WrongConverterOnInstanceInjectionTest.java | 63 + .../CustomConfigSourceProvider.java | 53 + .../configsources/CustomDbConfigSource.java | 69 ++ .../configsources/SampleYamlConfigSource.java | 58 + .../microprofile/imported/converters/Duck.java | 36 +++ .../imported/converters/DuckConverter.java | 33 +++ .../microprofile/imported/converters/Pizza.java | 45 .../imported/converters/PizzaConverter.java | 33 +++ .../imported/matchers/AdditionalMatchers.java | 61 + .../tck/TamayaConfigArchiveProcessor.java | 69 ++ .../microprofile/tck/TamayaConfigExtension.java | 36 +++ .../META-INF/microprofile-config.properties | 100 ...eclipse.microprofile.config.spi.ConfigSource | 2 +- ...microprofile.config.spi.ConfigSourceProvider | 18 ++ jboss.arquillian.core.spi.LoadableExtension | 19 ++ microprofile/src/test/tck-suite.xml | 29 +++ microprofile/tck-suite.xml | 29 --- 38 files changed, 1938 insertions(+), 79 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/1e2a184f/microprofile/src/main/java/org/apache/tamaya/microprofile/MicroprofileAdapter.java -- diff --git a/microprofile/src/main/java/org/apache/tamaya/microprofile/MicroprofileAdapter.java b/microprofile/src/main/java/org/apache/tamaya/microprofile/MicroprofileAdapter.java index 20d5af0..8f5002c 100644 --- a/microprofile/src/main/java/org/apache/tamaya/microprofile/MicroprofileAdapter.java +++ b/microprofile/src/main/java/org/apache/tamaya/microprofile/MicroprofileAdapter.java @@ -75,6 +75,7 @@ public final class MicroprofileAdapter{ for(PropertySource ps:propertySources){ configSources.add(toConfigSource(ps)); } +Collections.reverse(configSources); return configSources; } http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/1e2a184f/microprofile/src/main/java/org/apache/tamaya/microprofile/MicroprofileConfigBuilder.java -- diff --git a/microprofile/src/main/java/org/apache/tamaya/microprofile/MicroprofileConfigBuilder.java b/microprofile/src/main/java/org/apache/tamaya/microprofile/MicroprofileConfigBuilder.java index 5e6b613..aacd31b 100644 --- a/microprofile/src/main/java/org/apache/tamaya/microprofile/MicroprofileConfigBuilder.java +++ b/microprofile/src/main/java/org/apache/tamaya/microprofile/MicroprofileConfigBuilder.java @@ -21,9 +21,14 @@ package org.apache.tamaya.microprofile; import org.apache.tamaya.ConfigurationProvider; import org.apache.tamaya.TypeLiteral; import org.apache.tamaya.spi.ConfigurationContextBuilder; +import org.apache.tamaya.spi.ServiceContextManager; +import org.apache.tamaya.spisupport.E
[36/45] incubator-tamaya-sandbox git commit: TAMAYA-297: Unified commands in Karaf and Gogo. Added new commands for updater support.
TAMAYA-297: Unified commands in Karaf and Gogo. Added new commands for updater support. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/commit/509598d9 Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/tree/509598d9 Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/diff/509598d9 Branch: refs/heads/master Commit: 509598d9ac52ada1319791da3ea86b9724f627bb Parents: 8671315 Author: anatole Authored: Sun Sep 24 21:36:03 2017 +0200 Committer: anatole Committed: Sun Sep 24 21:36:03 2017 +0200 -- .../tamaya/osgi/DefaultOSGIConfigMapper.java| 45 - .../karaf/shell/ApplyTamayaConfigCommand.java | 55 .../tamaya/karaf/shell/BackupCreateCommand.java | 3 - .../tamaya/karaf/shell/BackupDeleteCommand.java | 1 - .../karaf/shell/BackupRestoreCommand.java | 46 + .../tamaya/karaf/shell/ConfigCommand.java | 57 .../karaf/shell/DefaultDisableCommand.java | 69 .../karaf/shell/DefaultEnableCommand.java | 68 +++ .../karaf/shell/DefaultEnabledCommand.java | 63 ++ .../tamaya/karaf/shell/OSGIConfigCommand.java | 51 +++ .../tamaya/karaf/shell/TamayaConfigCommand.java | 54 +++ .../org/apache/tamaya/karaf/shell/commands | 8 ++- 12 files changed, 343 insertions(+), 177 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/509598d9/osgi/common/src/main/java/org/apache/tamaya/osgi/DefaultOSGIConfigMapper.java -- diff --git a/osgi/common/src/main/java/org/apache/tamaya/osgi/DefaultOSGIConfigMapper.java b/osgi/common/src/main/java/org/apache/tamaya/osgi/DefaultOSGIConfigMapper.java deleted file mode 100644 index 861efb2..000 --- a/osgi/common/src/main/java/org/apache/tamaya/osgi/DefaultOSGIConfigMapper.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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.tamaya.osgi; - -import org.apache.tamaya.ConfigurationProvider; -import org.apache.tamaya.functions.ConfigurationFunctions; -import org.osgi.framework.ServiceReference; - -import java.util.Arrays; - -/** - * Created by atsticks on 18.09.17. - */ -public class DefaultOSGIConfigMapper implements OSGIConfigMapper { - -@Override -public org.apache.tamaya.Configuration getConfiguration(String pid) { -if (pid != null) { -return ConfigurationProvider.getConfiguration() -.with(ConfigurationFunctions.section("[" + pid + ']', true)); -} -return null; -} - -@Override -public String toString() { -return "Default OSGIConfigRootMapper([symbolicName:version/properties] -> [bundle:symbolicName]"; -} -} http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/509598d9/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/ApplyTamayaConfigCommand.java -- diff --git a/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/ApplyTamayaConfigCommand.java b/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/ApplyTamayaConfigCommand.java new file mode 100644 index 000..f6a7dc8 --- /dev/null +++ b/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/ApplyTamayaConfigCommand.java @@ -0,0 +1,55 @@ +/* + * 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
[30/45] incubator-tamaya-sandbox git commit: TAMAYA-307: Readded collections module.
TAMAYA-307: Readded collections module. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/commit/4c259384 Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/tree/4c259384 Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/diff/4c259384 Branch: refs/heads/master Commit: 4c25938401a26f780cd76659e69331679352b792 Parents: 636dbb5 Author: anatole Authored: Thu Sep 21 18:23:30 2017 +0200 Committer: anatole Committed: Thu Sep 21 18:23:30 2017 +0200 -- collections/pom.xml | 53 + .../collections/AdaptiveCombinationPolicy.java | 122 ++ .../tamaya/collections/ArrayListConverter.java | 62 + .../tamaya/collections/CollectionConverter.java | 63 + .../collections/ConcurrentHashMapConverter.java | 63 + .../tamaya/collections/HashMapConverter.java| 63 + .../tamaya/collections/HashSetConverter.java| 62 + .../tamaya/collections/ItemTokenizer.java | 171 ++ .../tamaya/collections/LinkedListConverter.java | 63 + .../tamaya/collections/ListConverter.java | 55 + .../apache/tamaya/collections/MapConverter.java | 58 + .../apache/tamaya/collections/SetConverter.java | 55 + .../tamaya/collections/SortedMapConverter.java | 36 +++ .../tamaya/collections/SortedSetConverter.java | 36 +++ .../tamaya/collections/TreeMapConverter.java| 62 + .../tamaya/collections/TreeSetConverter.java| 63 + .../org.apache.tamaya.spi.PropertyConverter | 31 +++ ...he.tamaya.spi.PropertyValueCombinationPolicy | 19 ++ .../collections/CollectionAdvancedTests.java| 117 ++ .../collections/CollectionsBaseTests.java | 227 +++ .../CollectionsTypedReadOnlyTests.java | 173 ++ .../collections/CollectionsTypedTests.java | 208 + .../collections/MyUpperCaseConverter.java | 33 +++ .../META-INF/javaconfiguration.properties | 73 ++ 24 files changed, 1968 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/4c259384/collections/pom.xml -- diff --git a/collections/pom.xml b/collections/pom.xml new file mode 100644 index 000..b11c807 --- /dev/null +++ b/collections/pom.xml @@ -0,0 +1,53 @@ + +http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd";> +4.0.0 + + +org.apache.tamaya.ext +tamaya-extensions +0.4-incubating-SNAPSHOT +.. + + +tamaya-collections +Apache Tamaya Modules - Collections Support +jar + + + +org.apache.tamaya +tamaya-core +${project.version} +test + + +org.apache.tamaya +tamaya-api +${project.version} + + +junit +junit +test + + + + + http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/4c259384/collections/src/main/java/org/apache/tamaya/collections/AdaptiveCombinationPolicy.java -- diff --git a/collections/src/main/java/org/apache/tamaya/collections/AdaptiveCombinationPolicy.java b/collections/src/main/java/org/apache/tamaya/collections/AdaptiveCombinationPolicy.java new file mode 100644 index 000..f10f7ec --- /dev/null +++ b/collections/src/main/java/org/apache/tamaya/collections/AdaptiveCombinationPolicy.java @@ -0,0 +1,122 @@ +/* + * 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.tamaya.collections; + +import org.apache.tamaya.ConfigurationProvider; +import org.apache.tamaya.spi.PropertySource; +import org.apache.tamaya.spi.PropertyValue; +import org.apache.tamaya.spi.PropertyValueCo
[35/45] incubator-tamaya-sandbox git commit: TAMAYA-297: Fixes on OSGI commands, added propagation flag.
TAMAYA-297: Fixes on OSGI commands, added propagation flag. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/commit/86713156 Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/tree/86713156 Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/diff/86713156 Branch: refs/heads/master Commit: 86713156b37270e8725c2cbceadd59defb00ee1c Parents: c2becbf Author: anatole Authored: Fri Sep 22 23:44:36 2017 +0200 Committer: anatole Committed: Fri Sep 22 23:44:36 2017 +0200 -- osgi/common/bnd.bnd | 5 +- .../org/apache/tamaya/osgi/ConfigChanger.java | 4 + .../org/apache/tamaya/osgi/ConfigHistory.java | 4 +- .../org/apache/tamaya/osgi/InitialState.java| 2 +- .../apache/tamaya/osgi/OSGIConfigMapper.java| 2 +- .../org/apache/tamaya/osgi/OperationMode.java | 4 +- .../apache/tamaya/osgi/TamayaConfigPlugin.java | 52 +++-- .../apache/tamaya/osgi/attic/ConfigPrinter.java | 115 --- .../tamaya/osgi/attic/ConfigPrinterService.java | 28 --- .../osgi/attic/TamayaConfigAdminImpl.java | 167 .../osgi/attic/TamayaOSGIConfiguration.java | 139 - .../tamaya/osgi/commands/BackupCommands.java| 103 ++ .../tamaya/osgi/commands/ConfigCommands.java| 195 +++ .../tamaya/osgi/commands/HistoryCommands.java | 3 +- .../tamaya/osgi/TamayaConfigPluginTest.java | 42 ++-- .../tamaya/felix/shell/BackupCreateCommand.java | 47 - .../tamaya/felix/shell/BackupDeleteCommand.java | 42 .../tamaya/felix/shell/BackupListCommand.java | 41 .../tamaya/felix/shell/ConfigCommand.java | 42 .../felix/shell/DefaultDisableCommand.java | 47 - .../tamaya/felix/shell/GetPolicyCommand.java| 47 - .../felix/shell/HistoryDeleteCommand.java | 42 .../tamaya/felix/shell/HistoryGetCommand.java | 47 - .../felix/shell/HistorySizeGetCommand.java | 42 .../felix/shell/HistorySizeSetCommand.java | 47 - .../apache/tamaya/felix/shell/InfoCommand.java | 46 - .../tamaya/felix/shell/PolicyGetCommand.java| 47 - .../tamaya/felix/shell/PolicySetCommand.java| 49 - .../tamaya/felix/shell/PropertyGetCommand.java | 50 - .../felix/shell/PropertySourcesCommand.java | 42 .../org/apache/tamaya/karaf/shell/commands | 37 .../org/apache/tamaya/gogo/shell/Activator.java | 17 +- .../tamaya/gogo/shell/BackupCommands.java | 8 +- .../tamaya/gogo/shell/ConfigCommands.java | 8 +- .../tamaya/gogo/shell/HistoryCommands.java | 10 +- .../tamaya/gogo/shell/SettingsCommands.java | 19 +- .../tamaya/karaf/shell/BackupCreateCommand.java | 3 +- .../tamaya/karaf/shell/BackupDeleteCommand.java | 3 +- .../tamaya/karaf/shell/BackupListCommand.java | 3 +- .../tamaya/karaf/shell/ConfigCommand.java | 6 +- .../karaf/shell/DefaultDisableCommand.java | 3 +- .../tamaya/karaf/shell/GetPolicyCommand.java| 3 +- .../karaf/shell/HistoryDeleteAllCommand.java| 38 .../karaf/shell/HistoryDeleteCommand.java | 7 +- .../tamaya/karaf/shell/HistoryGetCommand.java | 5 +- .../karaf/shell/HistoryMaxsizeCommand.java | 3 +- .../karaf/shell/HistoryMaxsizeSetCommand.java | 47 + .../karaf/shell/HistorySizeSetCommand.java | 48 - .../apache/tamaya/karaf/shell/InfoCommand.java | 3 +- .../tamaya/karaf/shell/PolicyGetCommand.java| 3 +- .../tamaya/karaf/shell/PolicySetCommand.java| 5 +- .../karaf/shell/PropagateUpdatesCommand.java| 46 + .../karaf/shell/PropagateUpdatesSetCommand.java | 56 ++ .../tamaya/karaf/shell/PropertyGetCommand.java | 3 +- .../karaf/shell/PropertySourceCommand.java | 3 +- .../karaf/shell/PropertySourcesCommand.java | 3 +- .../org/apache/tamaya/karaf/shell/commands | 9 +- osgi/pom.xml| 1 + osgi/updater/bnd.bnd| 2 +- .../apache/tamaya/osgi/updater/Activator.java | 21 +- 60 files changed, 642 insertions(+), 1324 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/86713156/osgi/common/bnd.bnd -- diff --git a/osgi/common/bnd.bnd b/osgi/common/bnd.bnd index 22c802c..af8e245 100644 --- a/osgi/common/bnd.bnd +++ b/osgi/common/bnd.bnd @@ -21,10 +21,11 @@ Bundle-ContactAddress: dev-tam...@incubator.apache.org Bundle-DocURL: http://tamaya.apache.org Bundle-Activator: org.apache.tamaya.osgi.Activator Export-Package: \ - org.apache.tamaya.osgi + org.apache.tamaya.osgi,\ + org.apache.tamaya.osgi
[05/45] incubator-tamaya-sandbox git commit: TAMAYA-260: Now implementing official MP config 1.0 release.
TAMAYA-260: Now implementing official MP config 1.0 release. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/commit/b04b841b Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/tree/b04b841b Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/diff/b04b841b Branch: refs/heads/master Commit: b04b841bfe84d3c4d0a9b8a5ff6833ed954b9cd5 Parents: e52a5a3 Author: anatole Authored: Tue Aug 8 09:12:48 2017 +0200 Committer: anatole Committed: Tue Aug 8 09:12:48 2017 +0200 -- microprofile/pom.xml| 65 +--- .../microprofile/MicroprofileAdapter.java | 38 +++-- .../microprofile/MicroprofileConfigBuilder.java | 11 ++ .../org/eclipse/microprofile/config/Config.java | 126 -- .../microprofile/config/ConfigProvider.java | 102 .../config/inject/ConfigProperty.java | 112 - .../config/inject/package-info.java | 40 - .../microprofile/config/package-info.java | 75 - .../microprofile/config/spi/ConfigBuilder.java | 83 -- .../config/spi/ConfigProviderResolver.java | 164 --- .../microprofile/config/spi/ConfigSource.java | 107 .../config/spi/ConfigSourceProvider.java| 58 --- .../microprofile/config/spi/Converter.java | 77 - .../microprofile/config/spi/package-info.java | 30 microprofile/src/test/resources/tck-suite.xml | 29 15 files changed, 102 insertions(+), 1015 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/b04b841b/microprofile/pom.xml -- diff --git a/microprofile/pom.xml b/microprofile/pom.xml index 1b5d808..123f7b8 100644 --- a/microprofile/pom.xml +++ b/microprofile/pom.xml @@ -38,24 +38,6 @@ under the License. 1.0 - - - -org.apache.maven.plugins -maven-compiler-plugin - -true -${maven.compile.optimize} -${maven.compile.sourceLevel} -${maven.compile.targetLevel} -${project.build.sourceEncoding} - ${maven.compile.deprecation} - - - - - - junit @@ -98,11 +80,48 @@ under the License. provided true - - - - - + +org.eclipse.microprofile.config +microprofile-config-api +1.0 + + +org.eclipse.microprofile.config +microprofile-config-tck +1.0 +test + + +org.testng +testng +6.9.9 +test + + + +tck + + +runTCK + + + + + +org.apache.maven.plugins +maven-surefire-plugin +2.19.1 + + +tck-suite.xml + + + + + + + + http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/b04b841b/microprofile/src/main/java/org/apache/tamaya/microprofile/MicroprofileAdapter.java -- diff --git a/microprofile/src/main/java/org/apache/tamaya/microprofile/MicroprofileAdapter.java b/microprofile/src/main/java/org/apache/tamaya/microprofile/MicroprofileAdapter.java index 29f563c..20d5af0 100644 --- a/microprofile/src/main/java/org/apache/tamaya/microprofile/MicroprofileAdapter.java +++ b/microprofile/src/main/java/org/apache/tamaya/microprofile/MicroprofileAdapter.java @@ -42,9 +42,9 @@ public final class MicroprofileAdapter{ private MicroprofileAdapter(){} /** - * Converts a Tamaya {@link Configuration} into a Microprofile.io {@Config}. + * Converts a Tamaya {@link Configuration} into a Microprofile.io {@link Config}. * @param config the Tamaya {@link Configuration} instance, not null. - * @return the corresponding Microprofile.io {@Config} instance, never null. + * @return the corresponding Microprofile.io {@link Config} instance, never null. */ public static Config toConfig(Configuration config){ if(config instanceof TamayaConfiguration){ @@ -54,9 +54,9 @@ public
[20/45] incubator-tamaya-sandbox git commit: TAMAYA-274: Implemented OSGI integration, tested in Karaf (using Karaf shell custom commands).
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/92053860/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/PropertySourceCommand.java -- diff --git a/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/PropertySourceCommand.java b/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/PropertySourceCommand.java new file mode 100644 index 000..fc42c54 --- /dev/null +++ b/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/PropertySourceCommand.java @@ -0,0 +1,59 @@ +/* + * 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.tamaya.karaf.shell; + +import org.apache.karaf.shell.api.action.Action; +import org.apache.karaf.shell.api.action.Argument; +import org.apache.karaf.shell.api.action.Command; +import org.apache.karaf.shell.api.action.lifecycle.Service; +import org.apache.tamaya.Configuration; +import org.apache.tamaya.ConfigurationProvider; +import org.apache.tamaya.spi.PropertySource; +import org.apache.tamaya.spi.PropertyValue; + +import java.io.IOException; + +@Command(scope = "tamaya", name = "propertysource", description="Show the current Tamaya entries of a propertysource.") +@Service +public class PropertySourceCommand implements Action{ + +@Argument(index = 0, name = "propertysource", description = "The target property source id.", +required = false, multiValued = false) +String propertysource = null; + +public Object execute() throws IOException { +Configuration config = ConfigurationProvider.getConfiguration(); +if(propertysource!=null){ +PropertySource ps = config.getContext().getPropertySource(propertysource); +if(ps==null){ +System.out.println("No such propertysource: " + propertysource); +}else { +System.out.println("ID: " + ps.getName()); +System.out.println("Ordinal: " + ps.getOrdinal()); +System.out.println("Class: " + ps.getClass().getName()); +System.out.println("Properties:"); +for(PropertyValue pv:ps.getProperties().values()) { +System.out.println(pv); +} +} +} +return null; +} + +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/92053860/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/PropertySourcesCommand.java -- diff --git a/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/PropertySourcesCommand.java b/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/PropertySourcesCommand.java new file mode 100644 index 000..74c5985 --- /dev/null +++ b/osgi/karaf-shell/src/main/java/org/apache/tamaya/karaf/shell/PropertySourcesCommand.java @@ -0,0 +1,48 @@ +/* + * 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.tamaya.karaf.shell; + +import org.apache.karaf.shell.api.action.Action; +import org.apache.karaf.shell.api.action.Argument; +import org.apache.karaf.shell.api.action.Command; +import org.apache.karaf.shell.api.action.lifecycle.Service; +import org.apache.tamaya.Configuration; +import org.apache.tamaya.ConfigurationProvider; +import org.apache.tamaya.spi.PropertySource; +import org.apache.tamaya.spi.PropertyValue; +
[32/45] incubator-tamaya-sandbox git commit: TAMAYA-297: Implemented Gogo support, tested it with Apache Felix.
TAMAYA-297: Implemented Gogo support, tested it with Apache Felix. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/commit/c83611c5 Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/tree/c83611c5 Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/diff/c83611c5 Branch: refs/heads/master Commit: c83611c5aa0c2b65c2d306628232b88e75602347 Parents: 39bf824 Author: anatole Authored: Fri Sep 22 12:52:12 2017 +0200 Committer: anatole Committed: Fri Sep 22 12:52:12 2017 +0200 -- osgi/felix-shell/bnd.bnd| 36 osgi/felix-shell/pom.xml| 92 osgi/gogo-shell/bnd.bnd | 34 osgi/gogo-shell/pom.xml | 73 .../org/apache/tamaya/gogo/shell/Activator.java | 91 +++ .../tamaya/gogo/shell/BackupCommands.java | 64 ++ .../tamaya/gogo/shell/ConfigCommands.java | 76 .../tamaya/gogo/shell/HistoryCommands.java | 77 .../tamaya/gogo/shell/SettingsCommands.java | 67 ++ 9 files changed, 482 insertions(+), 128 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/c83611c5/osgi/felix-shell/bnd.bnd -- diff --git a/osgi/felix-shell/bnd.bnd b/osgi/felix-shell/bnd.bnd deleted file mode 100644 index 643f788..000 --- a/osgi/felix-shell/bnd.bnd +++ /dev/null @@ -1,36 +0,0 @@ --buildpath: \ - osgi.annotation; version=6.0.0,\ - osgi.core; version=6.0,\ - osgi.cmpn; version=6.0 - --testpath: \ - ${junit} - -javac.source: 1.8 -javac.target: 1.8 - -Bundle-Version: ${version}.${tstamp} -Bundle-Name: Apache Tamaya - Felix Shell Commands -Bundle-SymbolicName: org.apache.tamaya.osgi.felix.shell -Bundle-Description: Apacha Tamaya Configuration - Felix Shell Extensions -Bundle-Category: Implementation -Bundle-Copyright: (C) Apache Foundation -Bundle-License: Apache Licence version 2 -Bundle-Vendor: Apache Software Foundation -Bundle-ContactAddress: dev-tam...@incubator.apache.org -Bundle-DocURL: http://tamaya.apache.org -Export-Package: \ - org.apache.tamaya.felix.shell -Import-Package: \ -org.osgi.service.cm,\ -org.osgi.framework,\ -org.apache.tamaya,\ -org.apache.tamaya.spi,\ -org.apache.tamaya.functions,\ -org.apache.tamaya.spisupport,\ -org.apache.tamaya.osgi,\ -org.apache.felix.service.command,\ -org.apache.karaf.shell.api.console,\ -org.apache.karaf.shell.api.action,\ -org.apache.karaf.shell.api.action.lifecycle,\ -org.apache.karaf.shell.support.completers http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/c83611c5/osgi/felix-shell/pom.xml -- diff --git a/osgi/felix-shell/pom.xml b/osgi/felix-shell/pom.xml deleted file mode 100644 index d19cb08..000 --- a/osgi/felix-shell/pom.xml +++ /dev/null @@ -1,92 +0,0 @@ - -http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd";> - - - -4.0.0 - - -org.apache.tamaya.ext -tamaya-osgi-all -0.4-incubating-SNAPSHOT - - -tamaya-osgi-gogo-shell_alpha -jar -Apache Tamaya :: OSGI :: Gogo :: Shell -Tamaya Gogo Shell Commands - - - -org.apache.tamaya.ext -tamaya-osgi_alpha -${project.parent.version} - - -org.osgi -org.osgi.compendium -provided - - -org.osgi -org.osgi.core -provided - - -org.apache.felix -org.apache.felix.framework -5.6.1 - - - -org.apache.felix -org.apache.felix.scr.annotations -1.9.12 - - - - -org.hamcrest -java-hamcrest - - -junit -junit - - - - - - -org.apache.felix -maven-scr-plugin -1.21.0 - - -generate-scr-scrdescriptor - -scr - - - - - - - - http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/c83611c5/osgi/gogo-shell/bnd.bnd --
[08/45] incubator-tamaya-sandbox git commit: TAMAYA-260: Implemented all basic microprofile features. Last 3 failres are to be discussed with MP folks.
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/1e2a184f/microprofile/src/test/java/org/apache/tamaya/microprofile/imported/matchers/AdditionalMatchers.java -- diff --git a/microprofile/src/test/java/org/apache/tamaya/microprofile/imported/matchers/AdditionalMatchers.java b/microprofile/src/test/java/org/apache/tamaya/microprofile/imported/matchers/AdditionalMatchers.java new file mode 100644 index 000..31024d2 --- /dev/null +++ b/microprofile/src/test/java/org/apache/tamaya/microprofile/imported/matchers/AdditionalMatchers.java @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2016-2017 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * 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. + */ + +package org.apache.tamaya.microprofile.imported.matchers; + +import org.hamcrest.BaseMatcher; +import org.hamcrest.Description; +import org.hamcrest.Matcher; + +import static org.hamcrest.Matchers.closeTo; + +/** + * + * @author Ondrej Mihalyi + */ +public final class AdditionalMatchers { + +private AdditionalMatchers() { +// utility class +} + +public static Matcher floatCloseTo(float value, float range) { +return new BaseMatcher() { + +private Matcher doubleMatcher = null; + +@Override +public boolean matches(Object item) { +if (item instanceof Float) { +return (doubleMatcher = closeTo(value, range)).matches(((Float)item).doubleValue()); +} +else { +return (doubleMatcher = closeTo(value, range)).matches(item); +} +} + +@Override +public void describeTo(Description description) { +doubleMatcher.describeTo(description); +} +}; +} + + +} http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/1e2a184f/microprofile/src/test/java/org/apache/tamaya/microprofile/tck/TamayaConfigArchiveProcessor.java -- diff --git a/microprofile/src/test/java/org/apache/tamaya/microprofile/tck/TamayaConfigArchiveProcessor.java b/microprofile/src/test/java/org/apache/tamaya/microprofile/tck/TamayaConfigArchiveProcessor.java new file mode 100644 index 000..4522fb8 --- /dev/null +++ b/microprofile/src/test/java/org/apache/tamaya/microprofile/tck/TamayaConfigArchiveProcessor.java @@ -0,0 +1,69 @@ +/* + * 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.tamaya.microprofile.tck; + +import org.apache.tamaya.microprofile.MicroprofileAdapter; +import org.apache.tamaya.microprofile.MicroprofileConfigProviderResolver; +import org.eclipse.microprofile.config.spi.ConfigProviderResolver; +import org.jboss.arquillian.container.test.spi.client.deployment.ApplicationArchiveProcessor; +import org.jboss.arquillian.test.spi.TestClass; +import org.jboss.shrinkwrap.api.Archive; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.asset.EmptyAsset; +import org.jboss.shrinkwrap.api.spec.JavaArchive; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.jboss.shrinkwrap.resolver.api.maven.Maven; + +import java.io.File; + +/** + * Adds the whole Config implementation classes and resources to the + * Arqillian deployment archive. This is needed to have the container + * pick up the beans from within the impl for the TCK tests. + * + * @author mailto:strub...@yahoo.de";>Mark Struberg + */ +public class TamayaConfigA
[21/45] incubator-tamaya-sandbox git commit: TAMAYA-274: Implemented OSGI integration, tested in Karaf (using Karaf shell custom commands).
TAMAYA-274: Implemented OSGI integration, tested in Karaf (using Karaf shell custom commands). Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/commit/92053860 Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/tree/92053860 Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/diff/92053860 Branch: refs/heads/master Commit: 920538603ef43802b16f60eb8ef41b55b96e6c15 Parents: c345b5c Author: anatole Authored: Mon Sep 18 17:15:43 2017 +0200 Committer: anatole Committed: Mon Sep 18 17:15:43 2017 +0200 -- osgi/common/bnd.bnd | 7 +- osgi/common/pom.xml | 6 +- .../java/org/apache/tamaya/osgi/Activator.java | 49 +-- .../tamaya/osgi/DefaultOSGIConfigMapper.java| 45 +++ .../apache/tamaya/osgi/OSGIConfigMapper.java| 38 +++ .../tamaya/osgi/OSGIConfigRootMapper.java | 36 --- .../tamaya/osgi/TamayaConfigAdminImpl.java | 170 --- .../apache/tamaya/osgi/TamayaConfigPlugin.java | 295 +++ .../tamaya/osgi/TamayaOSGIConfiguration.java| 139 - .../apache/tamaya/osgi/attic/ConfigPrinter.java | 115 .../tamaya/osgi/attic/ConfigPrinterService.java | 28 ++ .../osgi/attic/TamayaConfigAdminImpl.java | 167 +++ .../osgi/attic/TamayaOSGIConfiguration.java | 139 + .../tamaya/osgi/TamayaConfigAdminImplTest.java | 75 - osgi/karaf-features/pom.xml | 60 +--- osgi/karaf-shell/bnd.bnd| 37 +++ osgi/karaf-shell/pom.xml| 71 + .../tamaya/karaf/shell/ConfigCommand.java | 50 .../karaf/shell/DefaultDisableCommand.java | 68 + .../karaf/shell/EvaluateCMConfigCommand.java| 63 .../tamaya/karaf/shell/GetPolicyCommand.java| 42 +++ .../apache/tamaya/karaf/shell/InfoCommand.java | 46 +++ .../tamaya/karaf/shell/PropertyCommand.java | 75 + .../karaf/shell/PropertySourceCommand.java | 59 .../karaf/shell/PropertySourcesCommand.java | 48 +++ .../tamaya/karaf/shell/SetPolicyCommand.java| 68 + .../org/apache/tamaya/karaf/shell/commands | 27 ++ osgi/pom.xml| 115 +--- 28 files changed, 1538 insertions(+), 600 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/92053860/osgi/common/bnd.bnd -- diff --git a/osgi/common/bnd.bnd b/osgi/common/bnd.bnd index 56e697f..22c802c 100644 --- a/osgi/common/bnd.bnd +++ b/osgi/common/bnd.bnd @@ -10,9 +10,9 @@ javac.source: 1.8 javac.target: 1.8 Bundle-Version: ${version}.${tstamp} -Bundle-Name: Apache Tamaya - OSGI ConfigAdmin +Bundle-Name: Apache Tamaya - OSGI ConfigurationPlugin Bundle-SymbolicName: org.apache.tamaya.osgi -Bundle-Description: Apacha Tamaya Configuration - OSGI ConfigAdmin +Bundle-Description: Apacha Tamaya Configuration - OSGI ConfigurationPlugin Bundle-Category: Implementation Bundle-Copyright: (C) Apache Foundation Bundle-License: Apache Licence version 2 @@ -29,4 +29,5 @@ Import-Package: \ org.apache.tamaya.spi,\ org.apache.tamaya.functions,\ org.apache.tamaya.spisupport -Export-Service: org.osgi.service.cm.ConfigurationAdmin +Export-Service: org.osgi.service.cm.ConfigurationPlugin,\ +org.apache.tamaya.osgi.TamayaConfigPlugin http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/92053860/osgi/common/pom.xml -- diff --git a/osgi/common/pom.xml b/osgi/common/pom.xml index e0a5411..9455104 100644 --- a/osgi/common/pom.xml +++ b/osgi/common/pom.xml @@ -29,14 +29,14 @@ tamaya-osgi_alpha jar -Apache Tamaya :: OSGi Integration :: ConfigAdmin -Tamaya Based OSGI Implementation of ConfigAdmin and Config Injection +Apache Tamaya :: OSGi Integration :: ConfigurationPlugin +Tamaya Based OSGI ConfigurationPlugin Implementation org.osgi org.osgi.core -test +provided org.osgi http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/92053860/osgi/common/src/main/java/org/apache/tamaya/osgi/Activator.java -- diff --git a/osgi/common/src/main/java/org/apache/tamaya/osgi/Activator.java b/osgi/common/src/main/java/org/apache/tamaya/osgi/Activator.java index 83e1acf..d6c5726 100644 --- a/osgi/common/src/main/java/org/apache/tamaya/osgi/Activator.java +++ b/osgi/common/src/main/java/org/apache/tamaya/osgi/Activator.java @@ -18,11 +18,11 @@ */ package org.
[13/45] incubator-tamaya-sandbox git commit: TAMAYA-260: Fixed CDI issues regarding MP integration.
TAMAYA-260: Fixed CDI issues regarding MP integration. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/commit/88b39eff Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/tree/88b39eff Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/diff/88b39eff Branch: refs/heads/master Commit: 88b39eff5c92d977414f2e8d229bf0d023173656 Parents: 41305de Author: anatole Authored: Sun Aug 13 01:27:49 2017 +0200 Committer: anatole Committed: Sun Aug 13 01:27:49 2017 +0200 -- microprofile/pom.xml| 72 + .../microprofile/MicroprofileConfigBuilder.java | 6 +- .../microprofile/cdi/BridgingConfigBean.java| 104 +++ .../tamaya/microprofile/cdi/ConfiguredType.java | 4 +- .../cdi/MicroprofileCDIExtension.java | 94 +++-- .../cdi/MicroprofileConfigurationProducer.java | 63 --- .../converter/ProviderConverter.java| 10 +- microprofile/src/main/resources/beans.xml | 25 + .../AutoDiscoveredConfigSourceTest.java | 2 +- .../imported/CDIPlainInjectionTest.java | 46 ++-- .../imported/CdiOptionalInjectionTest.java | 52 +- .../imported/ConfigProviderTest.java| 29 +- .../microprofile/imported/ConverterTest.java| 2 +- .../imported/CustomConfigSourceTest.java| 21 .../imported/OptionalValuesBean.java| 3 +- .../imported/base/AbstractTest.java | 42 .../imported/broken/ConfigOwner.java| 28 ++--- .../imported/broken/CustomConverterBean.java| 26 ++--- ...MissingConverterOnInstanceInjectionTest.java | 62 --- .../MissingValueOnInstanceInjectionTest.java| 61 --- .../WrongConverterOnInstanceInjectionTest.java | 63 --- .../microprofile/imported/converters/Pizza.java | 9 +- .../imported/converters/PizzaConverter.java | 3 +- .../tck/TamayaConfigArchiveProcessor.java | 4 +- .../src/test/resources/META-INF/beans.xml | 24 + .../META-INF/microprofile-config.properties | 2 + ...rg.eclipse.microprofile.config.spi.Converter | 18 27 files changed, 406 insertions(+), 469 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/88b39eff/microprofile/pom.xml -- diff --git a/microprofile/pom.xml b/microprofile/pom.xml index 4795d36..ff893b8 100644 --- a/microprofile/pom.xml +++ b/microprofile/pom.xml @@ -42,7 +42,10 @@ under the License. 1.1.13.Final 2.0.0.Beta5 2.0 -3.0.0.Final +3.0.0.Final +2.2.7.Final +1.1.0 +4.7.1 @@ -73,29 +76,48 @@ under the License. tamaya-functions ${tamaya-version} - - - - - - - - - - - - org.eclipse.microprofile.config microprofile-config-api 1.0 -org.eclipse.microprofile.config -microprofile-config-tck -1.0 +javax.enterprise +cdi-api +1.2 +provided + + +org.apache.geronimo.specs +geronimo-jcdi_1.1_spec +${geronimo-jcdi-1.1-spec.version} +provided + + +org.jboss.weld.se +weld-se +${weld.version} +test + + +org.apache.deltaspike.cdictrl +deltaspike-cdictrl-weld +${deltaspike.version} +test + + +org.apache.deltaspike.modules +deltaspike-test-control-module-api +${deltaspike.version} +test + + +org.apache.deltaspike.modules +deltaspike-test-control-module-impl +${deltaspike.version} test + org.jboss.arquillian.testng arquillian-testng-container @@ -115,19 +137,31 @@ under the License. test pom + +org.apache.openejb +openejb-core +${openejb.version} +provided + -Weld3 +TCK -true +false +org.eclipse.microprofile.config +microprofile-config-tck +1.0 +test +
[24/45] incubator-tamaya-sandbox git commit: TAMAYA-300: Simplified naming.
TAMAYA-300: Simplified naming. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/commit/39143de0 Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/tree/39143de0 Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/diff/39143de0 Branch: refs/heads/master Commit: 39143de0458ca53625ee56b234bf202a432a3214 Parents: cbd2312 Author: anatole Authored: Tue Sep 19 12:59:54 2017 +0200 Committer: anatole Committed: Tue Sep 19 12:59:54 2017 +0200 -- osgi/common/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/39143de0/osgi/common/pom.xml -- diff --git a/osgi/common/pom.xml b/osgi/common/pom.xml index 9455104..fdcb7f3 100644 --- a/osgi/common/pom.xml +++ b/osgi/common/pom.xml @@ -29,7 +29,7 @@ tamaya-osgi_alpha jar -Apache Tamaya :: OSGi Integration :: ConfigurationPlugin +Apache Tamaya :: OSGi :: ConfigurationPlugin Tamaya Based OSGI ConfigurationPlugin Implementation
[14/45] incubator-tamaya-sandbox git commit: TAMAYA-260: Fixed CDI integration for almost any aspects of MP, removed mp from build.
TAMAYA-260: Fixed CDI integration for almost any aspects of MP, removed mp from build. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/commit/029a43ca Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/tree/029a43ca Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/diff/029a43ca Branch: refs/heads/master Commit: 029a43ca63eb1fc0a809ac337a63c351ae142d28 Parents: 88b39ef Author: anatole Authored: Sun Aug 13 23:51:10 2017 +0200 Committer: anatole Committed: Sun Aug 13 23:51:10 2017 +0200 -- .../microprofile/cdi/BridgingConfigBean.java| 2 +- .../microprofile/cdi/ConfiguredField.java | 2 +- .../microprofile/cdi/ConfiguredMethod.java | 2 +- .../tamaya/microprofile/cdi/ConfiguredType.java | 2 +- .../cdi/MicroprofileCDIExtension.java | 2 +- .../cdi/MicroprofileConfigurationProducer.java | 1 + .../converter/ProviderConverter.java| 138 +-- .../org.apache.tamaya.spi.PropertyConverter | 2 +- .../imported/CDIPlainInjectionTest.java | 7 +- .../tck/TamayaConfigArchiveProcessor.java | 5 +- pom.xml | 2 +- 11 files changed, 83 insertions(+), 82 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/029a43ca/microprofile/src/main/java/org/apache/tamaya/microprofile/cdi/BridgingConfigBean.java -- diff --git a/microprofile/src/main/java/org/apache/tamaya/microprofile/cdi/BridgingConfigBean.java b/microprofile/src/main/java/org/apache/tamaya/microprofile/cdi/BridgingConfigBean.java index 0b22c6a..763f6ed 100644 --- a/microprofile/src/main/java/org/apache/tamaya/microprofile/cdi/BridgingConfigBean.java +++ b/microprofile/src/main/java/org/apache/tamaya/microprofile/cdi/BridgingConfigBean.java @@ -27,7 +27,7 @@ import java.util.Set; /** * Internally used conversion bean. */ -class BridgingConfigBean implements Bean { +final class BridgingConfigBean implements Bean { private final Bean delegate; private final Set types; http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/029a43ca/microprofile/src/main/java/org/apache/tamaya/microprofile/cdi/ConfiguredField.java -- diff --git a/microprofile/src/main/java/org/apache/tamaya/microprofile/cdi/ConfiguredField.java b/microprofile/src/main/java/org/apache/tamaya/microprofile/cdi/ConfiguredField.java index 1c9607c..29d7122 100644 --- a/microprofile/src/main/java/org/apache/tamaya/microprofile/cdi/ConfiguredField.java +++ b/microprofile/src/main/java/org/apache/tamaya/microprofile/cdi/ConfiguredField.java @@ -24,7 +24,7 @@ import java.lang.reflect.Field; /** * CDI implementation for event publishing of configured instances. */ -class ConfiguredField { +public final class ConfiguredField { private final Field field; private String key; http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/029a43ca/microprofile/src/main/java/org/apache/tamaya/microprofile/cdi/ConfiguredMethod.java -- diff --git a/microprofile/src/main/java/org/apache/tamaya/microprofile/cdi/ConfiguredMethod.java b/microprofile/src/main/java/org/apache/tamaya/microprofile/cdi/ConfiguredMethod.java index 74e158a..90204fe 100644 --- a/microprofile/src/main/java/org/apache/tamaya/microprofile/cdi/ConfiguredMethod.java +++ b/microprofile/src/main/java/org/apache/tamaya/microprofile/cdi/ConfiguredMethod.java @@ -24,7 +24,7 @@ import java.lang.reflect.Method; /** * Implementation of a configured methods for CDI module. */ -public class ConfiguredMethod { +public final class ConfiguredMethod { private final Method method; private String key; http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/029a43ca/microprofile/src/main/java/org/apache/tamaya/microprofile/cdi/ConfiguredType.java -- diff --git a/microprofile/src/main/java/org/apache/tamaya/microprofile/cdi/ConfiguredType.java b/microprofile/src/main/java/org/apache/tamaya/microprofile/cdi/ConfiguredType.java index e94c075..535a556 100644 --- a/microprofile/src/main/java/org/apache/tamaya/microprofile/cdi/ConfiguredType.java +++ b/microprofile/src/main/java/org/apache/tamaya/microprofile/cdi/ConfiguredType.java @@ -31,7 +31,7 @@ import java.util.Objects; * Event published for items configured by CDI extensions. This is for example used by the documentation module * to automatically track the configuration endpoints for documentation.
[27/45] incubator-tamaya-sandbox git commit: TAMAYA-297: Added OSGI Config trigger for Tamaya changes.
TAMAYA-297: Added OSGI Config trigger for Tamaya changes. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/commit/99ce49ed Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/tree/99ce49ed Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/diff/99ce49ed Branch: refs/heads/master Commit: 99ce49ed39e938e0d2fb019ef2f5a3270c2c7789 Parents: 7855482 Author: anatole Authored: Tue Sep 19 22:00:11 2017 +0200 Committer: anatole Committed: Tue Sep 19 22:00:11 2017 +0200 -- osgi/common/bnd.bnd | 2 +- .../org/apache/tamaya/osgi/ConfigHistory.java | 62 + .../org/apache/tamaya/osgi/InitialState.java| 65 -- .../tamaya/karaf/shell/BackupCreateCommand.java | 68 ++ .../tamaya/karaf/shell/BackupDeleteCommand.java | 49 + .../tamaya/karaf/shell/BackupListCommand.java | 72 .../karaf/shell/HistorySizeGetCommand.java | 47 + .../karaf/shell/HistorySizeSetCommand.java | 56 +++ .../org/apache/tamaya/karaf/shell/commands | 5 ++ osgi/pom.xml| 1 + .../apache/tamaya/osgi/updater/Activator.java | 2 + 11 files changed, 379 insertions(+), 50 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/99ce49ed/osgi/common/bnd.bnd -- diff --git a/osgi/common/bnd.bnd b/osgi/common/bnd.bnd index 51175cb..22c802c 100644 --- a/osgi/common/bnd.bnd +++ b/osgi/common/bnd.bnd @@ -19,7 +19,7 @@ Bundle-License: Apache Licence version 2 Bundle-Vendor: Apache Software Foundation Bundle-ContactAddress: dev-tam...@incubator.apache.org Bundle-DocURL: http://tamaya.apache.org -Bundle-Activator: org.apache.tamaya.osgi.updater.Activator +Bundle-Activator: org.apache.tamaya.osgi.Activator Export-Package: \ org.apache.tamaya.osgi Import-Package: \ http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/99ce49ed/osgi/common/src/main/java/org/apache/tamaya/osgi/ConfigHistory.java -- diff --git a/osgi/common/src/main/java/org/apache/tamaya/osgi/ConfigHistory.java b/osgi/common/src/main/java/org/apache/tamaya/osgi/ConfigHistory.java index 42ecca6..9a2e5a9 100644 --- a/osgi/common/src/main/java/org/apache/tamaya/osgi/ConfigHistory.java +++ b/osgi/common/src/main/java/org/apache/tamaya/osgi/ConfigHistory.java @@ -20,16 +20,19 @@ package org.apache.tamaya.osgi; import java.beans.XMLDecoder; import java.beans.XMLEncoder; -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.IOException; +import java.io.*; import java.util.*; +import java.util.logging.Level; +import java.util.logging.Logger; /** * Class storing the history of changers done to the OSGI configuration by Tamaya. * This class can be used in the future to restore the previous state, if needed. */ -public final class ConfigHistory { +public final class ConfigHistory implements Serializable{ + +private static final long serialVersionUID = 1L; +private static final Logger LOG = Logger.getLogger(ConfigHistory.class.getName()); public enum TaskType{ PROPERTY, @@ -38,17 +41,7 @@ public final class ConfigHistory { } private static int maxHistory = 1; -private static List history = new LinkedList(){ - -@Override -public boolean add(ConfigHistory o) { -boolean val = super.add(o); -if(val && size() > maxHistory){ -remove(); -} -return val; -} -}; +private static List history = new LinkedList(); private long timestamp = System.currentTimeMillis(); @@ -68,6 +61,7 @@ public final class ConfigHistory { .setValue(info); synchronized (history){ history.add(h); +checkHistorySize(); } return h; } @@ -76,6 +70,7 @@ public final class ConfigHistory { .setValue(info); synchronized (history){ history.add(h); +checkHistorySize(); } return h; } @@ -86,6 +81,7 @@ public final class ConfigHistory { .setValue(value); synchronized (history){ history.add(h); +checkHistorySize(); } return h; } @@ -167,23 +163,29 @@ public final class ConfigHistory { } public static void save(TamayaConfigPlugin plugin){ -ByteArrayOutputStream bos = new ByteArrayOutputStream(); -XMLEncoder encoder = new XMLEncoder(bos, "UTF-8", false, 4)
[33/45] incubator-tamaya-sandbox git commit: TAMAYA-297: Fixed Karaf imports, aligned command names.
TAMAYA-297: Fixed Karaf imports, aligned command names. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/commit/c2becbfd Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/tree/c2becbfd Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/diff/c2becbfd Branch: refs/heads/master Commit: c2becbfd43e7a0566ec2623a6f4064a0d15363e4 Parents: c83611c Author: anatole Authored: Fri Sep 22 22:36:24 2017 +0200 Committer: anatole Committed: Fri Sep 22 22:36:24 2017 +0200 -- .../tamaya/osgi/commands/HistoryCommands.java | 95 .../apache/tamaya/osgi/commands/StringUtil.java | 46 ++ .../felix/shell/PropertySourceCommand.java | 42 - osgi/karaf-shell/bnd.bnd| 1 + osgi/karaf-shell/pom.xml| 2 +- .../tamaya/karaf/shell/BackupCreateCommand.java | 19 +--- .../tamaya/karaf/shell/BackupDeleteCommand.java | 11 +-- .../tamaya/karaf/shell/BackupListCommand.java | 35 +--- .../tamaya/karaf/shell/ConfigCommand.java | 23 +++-- .../karaf/shell/DefaultDisableCommand.java | 5 +- .../tamaya/karaf/shell/GetPolicyCommand.java| 5 +- .../tamaya/karaf/shell/HistoryClearCommand.java | 69 -- .../karaf/shell/HistoryDeleteCommand.java | 41 + .../tamaya/karaf/shell/HistoryGetCommand.java | 52 +-- .../karaf/shell/HistoryMaxsizeCommand.java | 38 .../karaf/shell/HistorySizeGetCommand.java | 47 -- .../karaf/shell/HistorySizeSetCommand.java | 14 +-- .../apache/tamaya/karaf/shell/InfoCommand.java | 9 +- .../tamaya/karaf/shell/PolicyGetCommand.java| 12 +-- .../tamaya/karaf/shell/PolicySetCommand.java| 9 +- .../tamaya/karaf/shell/PropertyGetCommand.java | 38 +--- .../karaf/shell/PropertySourceCommand.java | 27 +- .../karaf/shell/PropertySourcesCommand.java | 19 +--- .../apache/tamaya/karaf/shell/StringUtil.java | 46 -- 24 files changed, 279 insertions(+), 426 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/c2becbfd/osgi/common/src/main/java/org/apache/tamaya/osgi/commands/HistoryCommands.java -- diff --git a/osgi/common/src/main/java/org/apache/tamaya/osgi/commands/HistoryCommands.java b/osgi/common/src/main/java/org/apache/tamaya/osgi/commands/HistoryCommands.java new file mode 100644 index 000..ce73423 --- /dev/null +++ b/osgi/common/src/main/java/org/apache/tamaya/osgi/commands/HistoryCommands.java @@ -0,0 +1,95 @@ +/* + * 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.tamaya.osgi.commands; + +import org.apache.tamaya.osgi.ConfigHistory; +import org.apache.tamaya.osgi.TamayaConfigPlugin; + +import java.io.IOException; +import java.io.PrintWriter; +import java.io.StringWriter; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + + +/** + * Utility class implementing the available change history related commands. + */ +public final class HistoryCommands{ + +/** Singleton constructor. */ +private HistoryCommands(){} + +public static String clearHistory(String pid) throws IOException { +int size = ConfigHistory.history(pid).size(); +ConfigHistory.clearHistory(pid); +return "Deleted entries: " + size; +} + +public static String getHistory(String pid, String... events) throws IOException { +StringWriter sw = new StringWriter(); +PrintWriter pw = new PrintWriter(sw); +List history = ConfigHistory.history(pid); +history = filterTypes(history, events); +pw.print(StringUtil.format("Typ", 10)); +pw.print(StringUtil.format("PID", 30)); +pw.print(StringUtil.format("Key", 30)); +pw.print(StringUtil.format("Value", 40)); +pw.println(StringUtil.format("Previous Value", 40)); +pw.println(Str
[29/45] incubator-tamaya-sandbox git commit: TAMAYA-307: Readded collections module.
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/4c259384/collections/src/test/java/org/apache/tamaya/collections/CollectionsTypedTests.java -- diff --git a/collections/src/test/java/org/apache/tamaya/collections/CollectionsTypedTests.java b/collections/src/test/java/org/apache/tamaya/collections/CollectionsTypedTests.java new file mode 100644 index 000..b4e4d52 --- /dev/null +++ b/collections/src/test/java/org/apache/tamaya/collections/CollectionsTypedTests.java @@ -0,0 +1,208 @@ +/* + * 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.tamaya.collections; + +import org.apache.tamaya.Configuration; +import org.apache.tamaya.ConfigurationProvider; +import org.apache.tamaya.TypeLiteral; +import org.junit.Test; + +import java.util.*; + +import static junit.framework.TestCase.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +/** + * Basic tests for Tamaya collection support. Relevant configs for this tests: + * base.items=1,2,3,4,5,6,7,8,9,0 + * base.map=1::a, 2::b, 3::c, [4:: ] + * + */ +public class CollectionsTypedTests { + +@Test +public void testArrayListList_String(){ +Configuration config = ConfigurationProvider.getConfiguration(); +List items = config.get("typed2.arraylist", new TypeLiteral>(){}); +assertNotNull(items); +assertFalse(items.isEmpty()); +assertEquals(10, items.size()); +assertTrue(items instanceof ArrayList); +items = (List) config.get("typed2.arraylist", List.class); +assertNotNull(items); +assertFalse(items.isEmpty()); +assertEquals(10, items.size()); +assertTrue(items instanceof ArrayList); +} + +@Test +public void testLinkedListList_String(){ +Configuration config = ConfigurationProvider.getConfiguration(); +List items = config.get("typed2.linkedlist", new TypeLiteral>(){}); +assertNotNull(items); +assertFalse(items.isEmpty()); +assertEquals(10, items.size()); +assertTrue(items instanceof LinkedList); +items = (List) config.get("typed2.linkedlist", List.class); +assertNotNull(items); +assertFalse(items.isEmpty()); +assertEquals(10, items.size()); +assertTrue(items instanceof LinkedList); +} + + +@Test +public void testHashSet_String(){ +Configuration config = ConfigurationProvider.getConfiguration(); +Set items = config.get("typed2.hashset", new TypeLiteral>(){}); +assertNotNull(items); +assertFalse(items.isEmpty()); +assertEquals(10, items.size()); +assertTrue(items instanceof HashSet); +items = (Set) config.get("typed2.hashset", Set.class); +assertNotNull(items); +assertFalse(items.isEmpty()); +assertEquals(10, items.size()); +assertTrue(items instanceof HashSet); +} + +@Test +public void testTreeSet_String(){ +Configuration config = ConfigurationProvider.getConfiguration(); +Set items = config.get("typed2.treeset", new TypeLiteral>(){}); +assertNotNull(items); +assertFalse(items.isEmpty()); +assertEquals(10, items.size()); +assertTrue(items instanceof TreeSet); +items = (Set) config.get("typed2.treeset", Set.class); +assertNotNull(items); +assertFalse(items.isEmpty()); +assertEquals(10, items.size()); +assertTrue(items instanceof TreeSet); +} + +@Test +public void testHashMap_String(){ +Configuration config = ConfigurationProvider.getConfiguration(); +Map items = config.get("typed2.hashmap", new TypeLiteral>(){}); +assertNotNull(items); +assertFalse(items.isEmpty()); +assertEquals(4, items.size()); +assertEquals("a", items.get("1")); +assertEquals("b", items.get("2")); +assertEquals("c", items.get("3")); +assertEquals(" ", items.get("4")); +assertTrue(items instanceof HashMap); +items = (Map) config.get("typed2.hashmap",
[40/45] incubator-tamaya-sandbox git commit: TAMAYA-297: Readded/Simplified Karaf feature project.
TAMAYA-297: Readded/Simplified Karaf feature project. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/commit/58336629 Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/tree/58336629 Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/diff/58336629 Branch: refs/heads/master Commit: 58336629cbc7a5180a9f50653b2192155d85fefe Parents: 2281cb3 Author: anatole Authored: Sun Sep 24 22:12:01 2017 +0200 Committer: anatole Committed: Sun Sep 24 22:12:01 2017 +0200 -- osgi/karaf-features/pom.xml | 68 --- .../src/main/features/features.xml | 101 -- .../test/java/org/apache/tamaya/osgi/Hello.java | 10 - .../java/org/apache/tamaya/osgi/HelloImpl.java | 17 -- .../apache/tamaya/osgi/InjectionKarafTest.java | 149 --- .../org/apache/tamaya/osgi/OSGIKarafTest.java | 188 --- .../src/test/resources/META-INF/OSGIResource| 17 -- .../META-INF/javaconfiguration.properties | 21 --- .../test/resources/org.ops4j.pax.logging.cfg| 48 - osgi/pom.xml| 2 +- 10 files changed, 82 insertions(+), 539 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/58336629/osgi/karaf-features/pom.xml -- diff --git a/osgi/karaf-features/pom.xml b/osgi/karaf-features/pom.xml index f940767..8d8c2d4 100644 --- a/osgi/karaf-features/pom.xml +++ b/osgi/karaf-features/pom.xml @@ -44,72 +44,4 @@ limitations under the License. - - -org.apache.tamaya.ext -tamaya-osgi_alpha -${project.version} - - -org.apache.geronimo.specs -geronimo-atinject_1.0_spec - - - -org.ops4j.pax.exam -pax-exam-junit4 - - -org.ops4j.pax.exam -pax-exam-container-karaf - - -org.apache.karaf.features -framework -${dependency.karaf.version} -kar -test - - -org.apache.karaf.features -standard -${dependency.karaf.version} -features -xml -test - - -org.apache.karaf.features -enterprise -${dependency.karaf.version} -features -xml -test - - -org.ops4j.pax.exam -pax-exam-container-forked - - -org.ops4j.pax.url -pax-url-mvn - - -org.ops4j.pax.url -pax-url-reference - - -org.ops4j.pax.url -pax-url-wrap - - -org.hamcrest -java-hamcrest - - -junit -junit - - - http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/58336629/osgi/karaf-features/src/main/features/features.xml -- diff --git a/osgi/karaf-features/src/main/features/features.xml b/osgi/karaf-features/src/main/features/features.xml index 691b93f..20c5ee3 100644 --- a/osgi/karaf-features/src/main/features/features.xml +++ b/osgi/karaf-features/src/main/features/features.xml @@ -1,23 +1,84 @@ -http://karaf.apache.org/xmlns/features/v1.3.0"; name="org-apache-tamaya"> - - mvn:org.apache.tamaya.ext/tamaya-osgi_alpha/0.4-incubating-SNAPSHOT/jar - mvn:org.apache.tamaya.ext/tamaya-functions/0.3-incubating/jar - mvn:org.apache.tamaya.ext/tamaya-spisupport/0.3-incubating/jar -mvn:org.apache.tamaya/tamaya-api/0.3-incubating/jar -mvn:org.apache.tamaya/tamaya-core/0.3-incubating/jar - mvn:org.apache.geronimo.specs/geronimo-annotation_1.2_spec/1.0-alpha-1/jar - +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 Licens
[11/45] incubator-tamaya-sandbox git commit: TAMAYA-260: Fixed CDI integration for almost any aspects of MP.
TAMAYA-260: Fixed CDI integration for almost any aspects of MP. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/commit/c9676a85 Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/tree/c9676a85 Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/diff/c9676a85 Branch: refs/heads/master Commit: c9676a8533a953887fe1d8c42872151beac48cff Parents: f30884f Author: anatole Authored: Thu Aug 10 00:58:44 2017 +0200 Committer: anatole Committed: Thu Aug 10 00:58:44 2017 +0200 -- microprofile/pom.xml| 90 +- .../MicroprofileConfigurationProducer.java | 104 .../microprofile/cdi/ConfiguredField.java | 65 +++ .../microprofile/cdi/ConfiguredMethod.java | 65 +++ .../tamaya/microprofile/cdi/ConfiguredType.java | 86 ++ .../cdi/MicroprofileCDIExtension.java | 169 +++ .../cdi/MicroprofileConfigurationProducer.java | 103 +++ .../converter/ProviderConverter.java| 63 +++ .../javax.enterprise.inject.spi.Extension | 20 +++ .../org.apache.tamaya.spi.PropertyConverter | 20 +++ .../AutoDiscoveredConfigSourceTest.java | 4 +- .../imported/ConfigProviderTest.java| 6 +- .../microprofile/imported/ConverterTest.java| 14 +- .../tck/TamayaConfigArchiveProcessor.java | 10 +- 14 files changed, 657 insertions(+), 162 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/c9676a85/microprofile/pom.xml -- diff --git a/microprofile/pom.xml b/microprofile/pom.xml index 89f29c3..4795d36 100644 --- a/microprofile/pom.xml +++ b/microprofile/pom.xml @@ -39,6 +39,10 @@ under the License. 2.2.6 6.0.53 0.4-incubating-SNAPSHOT +1.1.13.Final + 2.0.0.Beta5 +2.0 +3.0.0.Final @@ -69,20 +73,18 @@ under the License. tamaya-functions ${tamaya-version} - -org.apache.geronimo.specs -geronimo-atinject_1.0_spec -${geronimo-atinject-1.0-spec.version} -provided -true - - -org.apache.geronimo.specs -geronimo-jcdi_1.1_spec -${geronimo-jcdi-1.1-spec.version} -provided -true - + + + + + + + + + + + + org.eclipse.microprofile.config microprofile-config-api @@ -95,6 +97,12 @@ under the License. test +org.jboss.arquillian.testng +arquillian-testng-container +${arquillian.version} +test + + org.testng testng 6.9.9 @@ -107,48 +115,40 @@ under the License. test pom - - -org.jboss.arquillian.container -arquillian-glassfish-embedded-3.1 -1.0.1 -test - - -org.glassfish.main.extras -glassfish-embedded-all -4.1.2 -test - - -com.sun -tools-jar - - - - -com.google.guava -guava -21.0 -test - -tck +Weld3 - -runTCK - +true + + +org.jboss.weld.se +weld-se-shaded +${weld.version} +test + + +org.jboss.arquillian.container +arquillian-weld-embedded +${arquillian-weld-embedded.version} +test + + +javax.enterprise +cdi-api +${cdi2-api.version} + + + org.apache.maven.plugins maven-surefire-plugin -2.19.1 +2.20 src/test/tck-suite.xml http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/c9676a85/microprofile/src/main/java/o
[17/45] incubator-tamaya-sandbox git commit: TAMAYA-260: Fixed Boolean conversion to comply with MP TCK.
TAMAYA-260: Fixed Boolean conversion to comply with MP TCK. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/commit/b2c69a1b Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/tree/b2c69a1b Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/diff/b2c69a1b Branch: refs/heads/master Commit: b2c69a1b71b73e8c0546bf46e5e290a583b38381 Parents: 4a63a4a Author: anatole Authored: Mon Aug 14 01:38:20 2017 +0200 Committer: anatole Committed: Mon Aug 14 01:38:20 2017 +0200 -- microprofile/pom.xml| 5 + .../tamaya/microprofile/MicroprofileConfig.java | 20 +++- .../microprofile/cdi/BridgingConfigBean.java| 10 -- .../converter/BooleanAsIntegerConverterFix.java | 13 +++-- .../tck/TamayaConfigArchiveProcessor.java | 5 +++-- 5 files changed, 34 insertions(+), 19 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/b2c69a1b/microprofile/pom.xml -- diff --git a/microprofile/pom.xml b/microprofile/pom.xml index ff893b8..37bbb2b 100644 --- a/microprofile/pom.xml +++ b/microprofile/pom.xml @@ -77,6 +77,11 @@ under the License. ${tamaya-version} +org.apache.tamaya.ext +tamaya-events +${tamaya-version} + + org.eclipse.microprofile.config microprofile-config-api 1.0 http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/b2c69a1b/microprofile/src/main/java/org/apache/tamaya/microprofile/MicroprofileConfig.java -- diff --git a/microprofile/src/main/java/org/apache/tamaya/microprofile/MicroprofileConfig.java b/microprofile/src/main/java/org/apache/tamaya/microprofile/MicroprofileConfig.java index 3dc4b34..61c3cdc 100644 --- a/microprofile/src/main/java/org/apache/tamaya/microprofile/MicroprofileConfig.java +++ b/microprofile/src/main/java/org/apache/tamaya/microprofile/MicroprofileConfig.java @@ -20,16 +20,21 @@ package org.apache.tamaya.microprofile; import org.apache.tamaya.ConfigException; import org.apache.tamaya.Configuration; +import org.apache.tamaya.events.FrozenConfiguration; import org.apache.tamaya.spi.PropertySource; import org.eclipse.microprofile.config.Config; import org.eclipse.microprofile.config.spi.ConfigSource; +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.io.Serializable; import java.util.*; /** * Microprofile {@link ConfigSource} implementation that wraps a {@link PropertySource} instance. */ -public class MicroprofileConfig implements Config { +public class MicroprofileConfig implements Config, Serializable { private Configuration delegate; @@ -79,4 +84,17 @@ public class MicroprofileConfig implements Config { "delegate=" + delegate + '}'; } + +private void writeObject(ObjectOutputStream out) throws IOException{ +if(!(this.delegate instanceof Serializable)){ +out.writeObject(FrozenConfiguration.of(this.delegate)); +}else { +out.writeObject(this.delegate); +} +} + +private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException{ +this.delegate = (Configuration)in.readObject(); +} + } http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/b2c69a1b/microprofile/src/main/java/org/apache/tamaya/microprofile/cdi/BridgingConfigBean.java -- diff --git a/microprofile/src/main/java/org/apache/tamaya/microprofile/cdi/BridgingConfigBean.java b/microprofile/src/main/java/org/apache/tamaya/microprofile/cdi/BridgingConfigBean.java index deb2496..a08f76f 100644 --- a/microprofile/src/main/java/org/apache/tamaya/microprofile/cdi/BridgingConfigBean.java +++ b/microprofile/src/main/java/org/apache/tamaya/microprofile/cdi/BridgingConfigBean.java @@ -85,16 +85,6 @@ final class BridgingConfigBean implements Bean { @Override public Object create(CreationalContext creationalContext) { -//Set injectionPoints = delegate.getInjectionPoints(); -//for(InjectionPoint injectionPoint:injectionPoints){ -//final ConfigProperty annotation = injectionPoint.getAnnotated().getAnnotation(ConfigProperty.class); -//String key = annotation.name(); -//ConversionContext context = -// MicroprofileConfigurationProducer.createConversionContext(key, injectionPoint); -//Object result =
[12/45] incubator-tamaya-sandbox git commit: TAMAYA-260: Added missing artifacts.
TAMAYA-260: Added missing artifacts. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/commit/41305de4 Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/tree/41305de4 Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/diff/41305de4 Branch: refs/heads/master Commit: 41305de4381b34b7f9d664ce10812d767cd3977d Parents: c9676a8 Author: anatole Authored: Thu Aug 10 01:00:03 2017 +0200 Committer: anatole Committed: Thu Aug 10 01:00:03 2017 +0200 -- .../imported/CdiOptionalInjectionTest.java | 71 .../imported/base/AbstractTest.java | 42 .../src/test/resources/sampleconfig.yaml| 18 + 3 files changed, 131 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/41305de4/microprofile/src/test/java/org/apache/tamaya/microprofile/imported/CdiOptionalInjectionTest.java -- diff --git a/microprofile/src/test/java/org/apache/tamaya/microprofile/imported/CdiOptionalInjectionTest.java b/microprofile/src/test/java/org/apache/tamaya/microprofile/imported/CdiOptionalInjectionTest.java new file mode 100644 index 000..ee6d158 --- /dev/null +++ b/microprofile/src/test/java/org/apache/tamaya/microprofile/imported/CdiOptionalInjectionTest.java @@ -0,0 +1,71 @@ +/* + * Copyright (c) 2016-2017 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * 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. + * + */ +package org.apache.tamaya.microprofile.imported; + +import org.eclipse.microprofile.config.tck.OptionalValuesBean; +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.testng.Arquillian; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.asset.EmptyAsset; +import org.jboss.shrinkwrap.api.asset.StringAsset; +import org.jboss.shrinkwrap.api.spec.JavaArchive; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.testng.Assert; +import org.testng.annotations.Test; + +import javax.inject.Inject; + +/** + * Verify injection of {@code Optional} fields. + * + * @author mailto:strub...@apache.org";>Mark Struberg + */ +public class CdiOptionalInjectionTest extends Arquillian{ + +private @Inject OptionalValuesBean optionalValuesBean; + +@Deployment +public static WebArchive deploy() { +JavaArchive testJar = ShrinkWrap +.create(JavaArchive.class, "cdiOptionalInjectionTest.jar") + .addClasses(org.eclipse.microprofile.config.tck.CdiOptionalInjectionTest.class, OptionalValuesBean.class) +.addAsManifestResource(new StringAsset("my.optional.int.property=1234\nmy.optional.string.property=hello"), +"microprofile-config.properties") +.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml") +.as(JavaArchive.class); + +WebArchive war = ShrinkWrap +.create(WebArchive.class, "cdiOptionalInjectionTest.war") +.addAsLibrary(testJar); +return war; +} + + +@Test +public void testOptionalInjection() { +Assert.assertTrue(optionalValuesBean.getIntProperty().isPresent()); +Assert.assertEquals(optionalValuesBean.getIntProperty().get(), Integer.valueOf(1234)); + + Assert.assertFalse(optionalValuesBean.getNotexistingProperty().isPresent()); + +Assert.assertTrue(optionalValuesBean.getStringValue().isPresent()); +Assert.assertEquals(optionalValuesBean.getStringValue().get(), "hello"); +} +} http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/41305de4/microprofile/src/test/java/org/apache/tamaya/microprofile/imported/base/AbstractTest.java -- diff --git a/microprofile/src/test/java/org/apache/tamaya/microprofile/imported/base/AbstractTest.java b/microprofile/src/test/java/org/apache/tamaya/microprofile/imported/base/AbstractTest.java new file mode 100644 index 000..0c9d3cc --- /dev/null +++ b/microprofile/src/test/java/or
[02/45] incubator-tamaya-sandbox git commit: TAMAYA-145: Added meta logging feature.
TAMAYA-145: Added meta logging feature. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/commit/31b9c0e1 Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/tree/31b9c0e1 Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/diff/31b9c0e1 Branch: refs/heads/master Commit: 31b9c0e1db95143e67dc945f25694f676d8cb00c Parents: 1fec344 Author: anatole Authored: Mon Aug 7 17:33:38 2017 +0200 Committer: anatole Committed: Mon Aug 7 17:33:38 2017 +0200 -- .../internal/resolver/LoggingReader.java| 79 ...tamaya.metamodel.spi.MetaConfigurationReader | 19 + 2 files changed, 98 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/31b9c0e1/metamodel/src/test/java/org/apache/tamaya/metamodel/internal/resolver/LoggingReader.java -- diff --git a/metamodel/src/test/java/org/apache/tamaya/metamodel/internal/resolver/LoggingReader.java b/metamodel/src/test/java/org/apache/tamaya/metamodel/internal/resolver/LoggingReader.java new file mode 100644 index 000..c0d67bc --- /dev/null +++ b/metamodel/src/test/java/org/apache/tamaya/metamodel/internal/resolver/LoggingReader.java @@ -0,0 +1,79 @@ +/* + * 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.tamaya.metamodel.internal.resolver; + +import org.apache.tamaya.Configuration; +import org.apache.tamaya.ConfigurationProvider; +import org.apache.tamaya.metamodel.MetaContext; +import org.apache.tamaya.metamodel.spi.MetaConfigurationReader; +import org.apache.tamaya.spi.ConfigurationContext; +import org.apache.tamaya.spi.ConfigurationContextBuilder; +import org.w3c.dom.Document; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.StringReader; +import java.util.HashMap; +import java.util.Map; +import java.util.Timer; +import java.util.TimerTask; + +/** + * Created by atsticks on 01.05.17. + */ +public class LoggingReader implements MetaConfigurationReader{ + +private static final JavaResolver resolver = new JavaResolver(); + +@Override +public void read(final Document document, ConfigurationContextBuilder contextBuilder) { +new Timer(true).schedule(new TimerTask() { +@Override +public void run() { +Map meta = new HashMap<>(); +meta.put("context", ConfigurationProvider.getConfiguration().getContext()); +meta.put("config", ConfigurationProvider.getConfiguration()); +NodeList nodeList = document.getDocumentElement().getElementsByTagName("context"); +for(int i=0;ihttp://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/31b9c0e1/metamodel/src/test/resources/META-INF/services/org.apache.tamaya.metamodel.spi.MetaConfigurationReader -- diff --git a/metamodel/src/test/resources/META-INF/services/org.apache.tamaya.metamodel.spi.MetaConfigurationReader b/metamodel/src/test/resources/META-INF/services/org.apache.tamaya.metamodel.spi.MetaConfigurationReader new file mode 100644 index 000..ace072c --- /dev/null +++ b/metamodel/src/test/resources/META-INF/services/org.apache.tamaya.metamodel.spi.MetaConfigurationReader @@ -0,0 +1,19 @@ +# +# 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 unde
[41/45] incubator-tamaya-sandbox git commit: TAMAYA-297: Added tests/small fixes.
TAMAYA-297: Added tests/small fixes. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/commit/ee6133b1 Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/tree/ee6133b1 Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/diff/ee6133b1 Branch: refs/heads/master Commit: ee6133b1cd9b5c8f9fb05b80450156764fa7eb99 Parents: 5833662 Author: anatole Authored: Tue Sep 26 08:43:48 2017 +0200 Committer: anatole Committed: Tue Sep 26 08:43:48 2017 +0200 -- .../java/org/apache/tamaya/osgi/Backups.java| 9 +- .../org/apache/tamaya/osgi/ConfigHistory.java | 78 -- .../apache/tamaya/osgi/TamayaConfigPlugin.java | 86 ++- .../apache/tamaya/osgi/ConfigHistoryTest.java | 148 +++ .../java/org/apache/tamaya/osgi/OSGITest.java | 8 - 5 files changed, 275 insertions(+), 54 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/ee6133b1/osgi/common/src/main/java/org/apache/tamaya/osgi/Backups.java -- diff --git a/osgi/common/src/main/java/org/apache/tamaya/osgi/Backups.java b/osgi/common/src/main/java/org/apache/tamaya/osgi/Backups.java index cacf830..01074fd 100644 --- a/osgi/common/src/main/java/org/apache/tamaya/osgi/Backups.java +++ b/osgi/common/src/main/java/org/apache/tamaya/osgi/Backups.java @@ -33,6 +33,7 @@ import java.util.logging.Logger; public final class Backups { private static final Logger LOG = Logger.getLogger(Backups.class.getName()); +public static final String TAMAYA_BACKUP = "tamaya.backup"; private static Map> initialConfigState = new ConcurrentHashMap<>(); private Backups(){} @@ -81,22 +82,22 @@ public final class Backups { return initialConfigState.containsKey(pid); } -public static void save(TamayaConfigPlugin plugin){ +public static void save(Dictionary config){ try{ ByteArrayOutputStream bos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(bos); oos.writeObject(initialConfigState); oos.flush(); Base64.getEncoder().encode(bos.toByteArray()); -plugin.setConfigValue("backup", Base64.getEncoder().encode(bos.toByteArray())); +config.put(TAMAYA_BACKUP, Base64.getEncoder().encode(bos.toByteArray())); }catch(Exception e){ LOG.log(Level.SEVERE, "Failed to restore OSGI Backups.", e); } } -public static void restore(TamayaConfigPlugin plugin){ +public static void restore(Dictionary config){ try{ -String serialized = (String)plugin.getConfigValue("backup"); +String serialized = (String)config.get("tamaya.backup"); if(serialized!=null) { ByteArrayInputStream bis = new ByteArrayInputStream(Base64.getDecoder().decode(serialized)); ObjectInputStream ois = new ObjectInputStream(bis); http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/ee6133b1/osgi/common/src/main/java/org/apache/tamaya/osgi/ConfigHistory.java -- diff --git a/osgi/common/src/main/java/org/apache/tamaya/osgi/ConfigHistory.java b/osgi/common/src/main/java/org/apache/tamaya/osgi/ConfigHistory.java index 756fe98..8e1b822 100644 --- a/osgi/common/src/main/java/org/apache/tamaya/osgi/ConfigHistory.java +++ b/osgi/common/src/main/java/org/apache/tamaya/osgi/ConfigHistory.java @@ -18,8 +18,6 @@ */ package org.apache.tamaya.osgi; -import java.beans.XMLDecoder; -import java.beans.XMLEncoder; import java.io.*; import java.util.*; import java.util.logging.Level; @@ -33,22 +31,30 @@ public final class ConfigHistory implements Serializable{ private static final long serialVersionUID = 1L; private static final Logger LOG = Logger.getLogger(ConfigHistory.class.getName()); +/** The key of the plugin OSGI configuration, where the history is stored/retrieved. */ +private static final String HISTORY_KEY = "tamaya.history"; public enum TaskType{ PROPERTY, BEGIN, END, } - +/** The max number of changes tracked. */ private static int maxHistory = 1; +/** The overall history. */ private static List history = new LinkedList(); +/** The entry timestamp. */ private long timestamp = System.currentTimeMillis(); - +/** The entry type. */ private TaskType type; +/** The previous value. */ private Object previousValue; +/** The current value. */ private Object value; +/** The key. */ private String key; +/** The target PID. */
[37/45] incubator-tamaya-sandbox git commit: TAMAYA-312: Unified commands in Gogo. Added new commands for updater support.
TAMAYA-312: Unified commands in Gogo. Added new commands for updater support. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/commit/fc0c72a6 Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/tree/fc0c72a6 Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/diff/fc0c72a6 Branch: refs/heads/master Commit: fc0c72a6bb5476efcff1fb9f46559978d71829dc Parents: 509598d Author: anatole Authored: Sun Sep 24 21:39:35 2017 +0200 Committer: anatole Committed: Sun Sep 24 21:39:35 2017 +0200 -- .../org/apache/tamaya/gogo/shell/Activator.java| 4 ++-- .../apache/tamaya/gogo/shell/BackupCommands.java | 8 .../apache/tamaya/gogo/shell/ConfigCommands.java | 17 +++-- .../apache/tamaya/gogo/shell/SettingsCommands.java | 11 --- 4 files changed, 33 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/fc0c72a6/osgi/gogo-shell/src/main/java/org/apache/tamaya/gogo/shell/Activator.java -- diff --git a/osgi/gogo-shell/src/main/java/org/apache/tamaya/gogo/shell/Activator.java b/osgi/gogo-shell/src/main/java/org/apache/tamaya/gogo/shell/Activator.java index ac83d0d..f7a2aa9 100644 --- a/osgi/gogo-shell/src/main/java/org/apache/tamaya/gogo/shell/Activator.java +++ b/osgi/gogo-shell/src/main/java/org/apache/tamaya/gogo/shell/Activator.java @@ -58,12 +58,12 @@ public class Activator implements BundleActivator { new HistoryCommands(context), props); props.put("osgi.command.function", new String[] {"tm_backup_create","tm_backup_delete", -"tm_backup"}); +"tm_backup","tm_backup_restore"}); backupReg = context.registerService( BackupCommands.class, new BackupCommands(context), props); props.put("osgi.command.function", -new String[] {"tm_disable","tm_policy", +new String[] {"tm_enable","tm_enabled", "tm_policy", "tm_policy_set","tm_info", "tm_propagate_updates", "tm_propagate_updates_set"}); settingsReg = context.registerService( http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/fc0c72a6/osgi/gogo-shell/src/main/java/org/apache/tamaya/gogo/shell/BackupCommands.java -- diff --git a/osgi/gogo-shell/src/main/java/org/apache/tamaya/gogo/shell/BackupCommands.java b/osgi/gogo-shell/src/main/java/org/apache/tamaya/gogo/shell/BackupCommands.java index cd8caf2..33fd333 100644 --- a/osgi/gogo-shell/src/main/java/org/apache/tamaya/gogo/shell/BackupCommands.java +++ b/osgi/gogo-shell/src/main/java/org/apache/tamaya/gogo/shell/BackupCommands.java @@ -20,6 +20,7 @@ package org.apache.tamaya.gogo.shell; import org.apache.felix.service.command.Descriptor; import org.apache.felix.service.command.Parameter; +import org.apache.tamaya.osgi.TamayaConfigPlugin; import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceReference; import org.osgi.service.cm.ConfigurationAdmin; @@ -55,6 +56,13 @@ public class BackupCommands { System.out.println(org.apache.tamaya.osgi.commands.BackupCommands.deleteBackup(pid)); } +@Descriptor("Restores an OSGI ConfigAdmin configuration backup for a PID and disabled Tamaya for the given PID.") +public void tm_backup_restore(@Parameter(absentValue = Parameter.UNSPECIFIED, names={"-p", "--pid"}) + @Descriptor("The target PID") String pid) throws IOException { + System.out.println(org.apache.tamaya.osgi.commands.BackupCommands.restoreBackup( +getService(TamayaConfigPlugin.class), pid)); +} + @Descriptor("Shows the contents of the OSGI ConfigAdmin configuration backup for a PID.") public void tm_backup_get(@Parameter(absentValue = Parameter.UNSPECIFIED, names={"-p", "--pid"}) @Descriptor("The PID (requred)") String pid) throws IOException { http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/fc0c72a6/osgi/gogo-shell/src/main/java/org/apache/tamaya/gogo/shell/ConfigCommands.java -- diff --git a/osgi/gogo-shell/src/main/java/org/apache/tamaya/gogo/shell/ConfigCommands.java b/osgi/gogo-shell/src/main/java/org/apache/tamaya/gogo/shell/ConfigCommands.java index 9387c27..08cb575 100644 --- a/osgi/gogo-shell/src/main/java/org/apache/tamaya/gogo/shell/ConfigCommands.java +++ b/osgi/gogo-shell/src/main/java/org/apache/tamaya/gogo/shell/ConfigCommands.java @@ -20,6 +20,7
[15/45] incubator-tamaya-sandbox git commit: TAMAYA-260: Fixed Boolean conversion to comply with MP TCK.
TAMAYA-260: Fixed Boolean conversion to comply with MP TCK. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/commit/50927f43 Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/tree/50927f43 Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/diff/50927f43 Branch: refs/heads/master Commit: 50927f43815fb901bb3e4166f658493d3e335a3c Parents: 029a43c Author: anatole Authored: Mon Aug 14 00:03:30 2017 +0200 Committer: anatole Committed: Mon Aug 14 00:03:30 2017 +0200 -- .../converter/BooleanAsIntegerConverterFix.java | 60 + .../converter/ProviderConverter.java| 69 .../org.apache.tamaya.spi.PropertyConverter | 2 +- .../imported/CDIPlainInjectionTest.java | 3 +- .../microprofile/imported/ConverterTest.java| 2 +- 5 files changed, 64 insertions(+), 72 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/50927f43/microprofile/src/main/java/org/apache/tamaya/microprofile/converter/BooleanAsIntegerConverterFix.java -- diff --git a/microprofile/src/main/java/org/apache/tamaya/microprofile/converter/BooleanAsIntegerConverterFix.java b/microprofile/src/main/java/org/apache/tamaya/microprofile/converter/BooleanAsIntegerConverterFix.java new file mode 100644 index 000..debf6c7 --- /dev/null +++ b/microprofile/src/main/java/org/apache/tamaya/microprofile/converter/BooleanAsIntegerConverterFix.java @@ -0,0 +1,60 @@ +/* + * 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.tamaya.microprofile.converter; + +import org.apache.tamaya.spi.ConversionContext; +import org.apache.tamaya.spi.PropertyConverter; + +import java.util.Locale; +import java.util.Objects; +import java.util.logging.Logger; + +/** + * Converter, converting from String to Boolean for zerpo = false, otherwise true. + */ +public class BooleanAsIntegerConverterFix implements PropertyConverter { + +private final Logger LOG = Logger.getLogger(getClass().getName()); + +@Override +public Boolean convert(String value, ConversionContext context) { +context.addSupportedFormats(getClass(), "int != 0 (true)", "0 (false)"); +try{ +int val = Integer.parseInt(Objects.requireNonNull(value).trim()); +if(val!=0) { +return Boolean.TRUE; +}else { +return Boolean.FALSE; +} +}catch(Exception e){ +// OK +return null; +} +} + +@Override +public boolean equals(Object o){ +return getClass().equals(o.getClass()); +} + +@Override +public int hashCode(){ +return getClass().hashCode(); +} +} http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/50927f43/microprofile/src/main/java/org/apache/tamaya/microprofile/converter/ProviderConverter.java -- diff --git a/microprofile/src/main/java/org/apache/tamaya/microprofile/converter/ProviderConverter.java b/microprofile/src/main/java/org/apache/tamaya/microprofile/converter/ProviderConverter.java deleted file mode 100644 index de57465..000 --- a/microprofile/src/main/java/org/apache/tamaya/microprofile/converter/ProviderConverter.java +++ /dev/null @@ -1,69 +0,0 @@ -///* -// * 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, -// * s
[45/45] incubator-tamaya-sandbox git commit: Merged.
Merged. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/commit/9fdd5dae Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/tree/9fdd5dae Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/diff/9fdd5dae Branch: refs/heads/master Commit: 9fdd5dae7995cb98ed501566049ad4a7010dee51 Parents: 2c031dc d0e9a65 Author: Anatole Tresch Authored: Thu Sep 28 22:09:26 2017 +0200 Committer: Anatole Tresch Committed: Thu Sep 28 22:09:26 2017 +0200 -- apache-commons/bnd.bnd | 27 +- apache-commons/pom.xml | 1 + camel/bnd.bnd | 25 +- camel/pom.xml | 4 + collections/bnd.bnd | 26 ++ collections/pom.xml | 53 +++ .../collections/AdaptiveCombinationPolicy.java | 122 +++ .../tamaya/collections/ArrayListConverter.java | 62 .../tamaya/collections/CollectionConverter.java | 63 .../collections/ConcurrentHashMapConverter.java | 63 .../tamaya/collections/HashMapConverter.java| 63 .../tamaya/collections/HashSetConverter.java| 62 .../tamaya/collections/ItemTokenizer.java | 171 ++ .../tamaya/collections/LinkedListConverter.java | 63 .../tamaya/collections/ListConverter.java | 55 +++ .../apache/tamaya/collections/MapConverter.java | 58 .../apache/tamaya/collections/SetConverter.java | 55 +++ .../tamaya/collections/SortedMapConverter.java | 36 ++ .../tamaya/collections/SortedSetConverter.java | 36 ++ .../tamaya/collections/TreeMapConverter.java| 62 .../tamaya/collections/TreeSetConverter.java| 63 .../org.apache.tamaya.spi.PropertyConverter | 31 ++ ...he.tamaya.spi.PropertyValueCombinationPolicy | 19 ++ .../collections/CollectionAdvancedTests.java| 117 +++ .../collections/CollectionsBaseTests.java | 227 .../CollectionsTypedReadOnlyTests.java | 173 ++ .../collections/CollectionsTypedTests.java | 208 +++ .../collections/MyUpperCaseConverter.java | 33 ++ .../META-INF/javaconfiguration.properties | 73 configured-sysprops/bnd.bnd | 25 +- configured-sysprops/pom.xml | 14 +- consul/bnd.bnd | 30 +- consul/pom.xml | 4 + etcd/bnd.bnd| 30 +- etcd/pom.xml| 4 + hazelcast/bnd.bnd | 27 +- hazelcast/pom.xml | 4 + jodatime/bnd.bnd| 27 +- jodatime/pom.xml| 4 + management/bnd.bnd | 27 +- management/pom.xml | 8 +- metamodel/bnd.bnd | 35 +- metamodel/pom.xml | 8 +- .../internal/CombinationPolicyReader.java | 2 + .../internal/ComponentConfigurator.java | 4 + .../DSLLoadingConfigurationProviderSpi.java | 2 + .../metamodel/internal/MetaContextReader.java | 2 + .../internal/PropertyConverterReader.java | 2 + .../internal/PropertyFilterOrderingReader.java | 2 + .../internal/PropertyFilterReader.java | 2 + .../internal/PropertySourceOrderingReader.java | 2 + .../internal/PropertySourceReader.java | 2 + .../internal/factories/CLIArgumentsFactory.java | 2 + .../factories/EnvPropertiesFactory.java | 2 + .../factories/FilePropertySourceFactory.java| 2 + .../ResourcePropertySourceFactory.java | 2 + .../ResourcePropertySourceProviderFactory.java | 2 + .../factories/SysPropertiesFactory.java | 2 + .../factories/URLPropertySourceFactory.java | 2 + .../internal/resolver/JavaResolver.java | 2 + .../internal/resolver/PropertiesResolver.java | 2 + .../internal/resolver/LoggingReader.java| 79 + .../resources/IntegrationTests/context-test.xml | 2 +- ...tamaya.metamodel.spi.MetaConfigurationReader | 19 ++ metamodel/src/test/resources/tamaya-config.xml | 4 +- microprofile/bnd.bnd| 34 ++ microprofile/pom.xml| 160 +++-- .../microprofile/MicroprofileAdapter.java | 39 ++- .../tamaya/microprofile/MicroprofileConfig.java | 20 +- .../microprofile/MicroprofileConfigBuilder.java | 57 +++- .../MicroprofileConfigProviderResolver.java | 8 +- .../MicroprofileDefaultProperties.java | 33 ++ .../microprofile/TamayaPropertySource.java | 4 +- .../microprofile/cdi/BridgingConfigBean.java| 95
[26/45] incubator-tamaya-sandbox git commit: TAMAYA-297: Added OSGI Config trigger for Tamaya changes.
TAMAYA-297: Added OSGI Config trigger for Tamaya changes. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/commit/78554829 Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/tree/78554829 Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/diff/78554829 Branch: refs/heads/master Commit: 7855482984c81a11ecf40f2ee63a7c82c603e0c0 Parents: 54ff0e6 Author: anatole Authored: Tue Sep 19 21:00:32 2017 +0200 Committer: anatole Committed: Tue Sep 19 21:00:32 2017 +0200 -- osgi/common/bnd.bnd | 2 +- .../org/apache/tamaya/osgi/ConfigChanger.java | 20 ++- .../org/apache/tamaya/osgi/ConfigHistory.java | 39 - .../org/apache/tamaya/osgi/InitialState.java| 89 .../apache/tamaya/osgi/TamayaConfigPlugin.java | 29 +++- osgi/updater/bnd.bnd| 34 + osgi/updater/pom.xml| 145 +++ .../apache/tamaya/osgi/updater/Activator.java | 59 .../tamaya/osgi/updater/EventListener.java | 79 ++ 9 files changed, 481 insertions(+), 15 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/78554829/osgi/common/bnd.bnd -- diff --git a/osgi/common/bnd.bnd b/osgi/common/bnd.bnd index 22c802c..51175cb 100644 --- a/osgi/common/bnd.bnd +++ b/osgi/common/bnd.bnd @@ -19,7 +19,7 @@ Bundle-License: Apache Licence version 2 Bundle-Vendor: Apache Software Foundation Bundle-ContactAddress: dev-tam...@incubator.apache.org Bundle-DocURL: http://tamaya.apache.org -Bundle-Activator: org.apache.tamaya.osgi.Activator +Bundle-Activator: org.apache.tamaya.osgi.updater.Activator Export-Package: \ org.apache.tamaya.osgi Import-Package: \ http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/78554829/osgi/common/src/main/java/org/apache/tamaya/osgi/ConfigChanger.java -- diff --git a/osgi/common/src/main/java/org/apache/tamaya/osgi/ConfigChanger.java b/osgi/common/src/main/java/org/apache/tamaya/osgi/ConfigChanger.java index 29c4720..1d48fad 100644 --- a/osgi/common/src/main/java/org/apache/tamaya/osgi/ConfigChanger.java +++ b/osgi/common/src/main/java/org/apache/tamaya/osgi/ConfigChanger.java @@ -55,12 +55,18 @@ final class ConfigChanger { public void configure(String pid, Bundle bundle, OperationMode defaultOpMode) { OperationMode opMode = Objects.requireNonNull(defaultOpMode); -String opVal = bundle.getHeaders().get("Tamaya-OperationMode"); -if(opVal!=null){ -opMode = OperationMode.valueOf(opVal.toUpperCase()); +if(bundle!=null) { +String opVal = bundle.getHeaders().get("Tamaya-OperationMode"); +if (opVal != null) { +opMode = OperationMode.valueOf(opVal.toUpperCase()); +} } LOG.finest("Evaluating Tamaya Config for PID: " + pid); -ConfigHistory.configuring(pid, "operationMode="+opMode); +if(bundle!=null) { +ConfigHistory.configuring(pid, "bundle=" + bundle.getSymbolicName() + ", bundle-id=" + bundle.getBundleId() + ", operationMode=" + opMode); +}else{ +ConfigHistory.configuring(pid, "trigger=Tamaya, operationMode=" + opMode); +} org.apache.tamaya.Configuration tamayaConfig = configMapper().getConfiguration(pid); if (tamayaConfig == null) { LOG.finest("No Tamaya configuration for PID: " + pid); @@ -68,11 +74,15 @@ final class ConfigChanger { } try { // TODO Check for Bundle.getLocation() usage here... -Configuration osgiConfig = cm.getConfiguration(pid, bundle.getLocation()); +Configuration osgiConfig = cm.getConfiguration(pid, bundle!=null?bundle.getLocation():null); if(osgiConfig!=null){ Dictionary dictionary = osgiConfig.getProperties(); if(dictionary==null){ dictionary = new Hashtable<>(); +}else{ +if(!InitialState.contains(pid)){ +InitialState.set(pid, dictionary); +} } modifyConfiguration(pid, tamayaConfig, dictionary, opMode); if(!dictionary.isEmpty()) { http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/78554829/osgi/common/src/main/java/org/apache/tamaya/osgi/ConfigHistory.java -- diff --git a/osgi/common/src/main/java/org/apache/tamaya/osgi/ConfigHistory.java b/osgi/comm
[07/45] incubator-tamaya-sandbox git commit: TAMAYA-274: Moved to Java 8, set version to 0.4-incubating-SNAPSHOT
TAMAYA-274: Moved to Java 8, set version to 0.4-incubating-SNAPSHOT Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/commit/d9e2d541 Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/tree/d9e2d541 Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/diff/d9e2d541 Branch: refs/heads/master Commit: d9e2d541ed7fe5467955c20954f21c758a354542 Parents: a3e0181 Author: anatole Authored: Tue Aug 8 21:44:51 2017 +0200 Committer: anatole Committed: Tue Aug 8 21:44:51 2017 +0200 -- apache-commons/pom.xml | 2 +- camel/pom.xml | 2 +- configured-sysprops/pom.xml | 2 +- consul/pom.xml | 2 +- etcd/pom.xml| 2 +- hazelcast/pom.xml | 2 +- jodatime/pom.xml| 2 +- management/pom.xml | 2 +- metamodel/pom.xml | 2 +- microprofile/pom.xml| 46 +++- osgi/common/pom.xml | 2 +- osgi/karaf-features/pom.xml | 2 +- osgi/pom.xml| 4 ++-- pom.xml | 22 +-- propertysources/pom.xml | 2 +- remote/pom.xml | 2 +- server/pom.xml | 2 +- ui/base/pom.xml | 2 +- ui/events/pom.xml | 2 +- ui/mutableconfig/pom.xml| 2 +- ui/pom.xml | 2 +- uom/pom.xml | 2 +- usagetracker/pom.xml| 2 +- validation/pom.xml | 2 +- vertx/pom.xml | 2 +- 25 files changed, 75 insertions(+), 41 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/d9e2d541/apache-commons/pom.xml -- diff --git a/apache-commons/pom.xml b/apache-commons/pom.xml index 8f4d945..0ed033d 100644 --- a/apache-commons/pom.xml +++ b/apache-commons/pom.xml @@ -23,7 +23,7 @@ under the License. org.apache.tamaya.ext tamaya-sandbox -0.3-incubating-SNAPSHOT +0.4-incubating-SNAPSHOT .. tamaya-commons-config_beta http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/d9e2d541/camel/pom.xml -- diff --git a/camel/pom.xml b/camel/pom.xml index 2dcdc60..f4324bb 100644 --- a/camel/pom.xml +++ b/camel/pom.xml @@ -22,7 +22,7 @@ under the License. org.apache.tamaya.ext tamaya-sandbox -0.3-incubating-SNAPSHOT +0.4-incubating-SNAPSHOT .. http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/d9e2d541/configured-sysprops/pom.xml -- diff --git a/configured-sysprops/pom.xml b/configured-sysprops/pom.xml index 884007f..8384d04 100644 --- a/configured-sysprops/pom.xml +++ b/configured-sysprops/pom.xml @@ -23,7 +23,7 @@ under the License. org.apache.tamaya.ext tamaya-sandbox -0.3-incubating-SNAPSHOT +0.4-incubating-SNAPSHOT .. tamaya-sysprops_beta http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/d9e2d541/consul/pom.xml -- diff --git a/consul/pom.xml b/consul/pom.xml index 14dbe65..47ce340 100644 --- a/consul/pom.xml +++ b/consul/pom.xml @@ -22,7 +22,7 @@ under the License. org.apache.tamaya.ext tamaya-sandbox -0.3-incubating-SNAPSHOT +0.4-incubating-SNAPSHOT .. http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/d9e2d541/etcd/pom.xml -- diff --git a/etcd/pom.xml b/etcd/pom.xml index 376a469..31ea349 100644 --- a/etcd/pom.xml +++ b/etcd/pom.xml @@ -22,7 +22,7 @@ under the License. org.apache.tamaya.ext tamaya-sandbox -0.3-incubating-SNAPSHOT +0.4-incubating-SNAPSHOT .. http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/d9e2d541/hazelcast/pom.xml -- diff --git a/hazelcast/pom.xml b/hazelcast/pom.xml index 7f594cd..1052787 100644 --- a/hazelcast/pom.xml +++ b/hazelcast/pom.xml @@ -22,7 +22,7 @@ org.apache.tamaya.ext tamaya-sandbox -0.3-incubating-SNAPSHOT +0.4-incubating-SNAPSHOT .. http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/d9e2d541/jodatime/pom.xml -- diff --git a/jodatime/pom.xml b/jodatime/pom.xml index a1e99df..7ffbf23 100644 --- a/jodatime/pom.x
incubator-tamaya-sandbox git commit: Merged.
Repository: incubator-tamaya-sandbox Updated Branches: refs/heads/master 9fdd5dae7 -> 28d81b959 Merged. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/commit/28d81b95 Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/tree/28d81b95 Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/diff/28d81b95 Branch: refs/heads/master Commit: 28d81b959a85037f5198aa30f1cca10748c6bf83 Parents: 9fdd5da Author: Anatole Tresch Authored: Thu Sep 28 22:17:17 2017 +0200 Committer: Anatole Tresch Committed: Thu Sep 28 22:17:17 2017 +0200 -- osgi/pom.xml | 3 --- 1 file changed, 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/28d81b95/osgi/pom.xml -- diff --git a/osgi/pom.xml b/osgi/pom.xml index 1451957..9f0edf9 100644 --- a/osgi/pom.xml +++ b/osgi/pom.xml @@ -25,10 +25,7 @@ org.apache.tamaya.ext tamaya-sandbox 0.4-incubating-SNAPSHOT -<<< HEAD -=== .. ->>> java8 tamaya-osgi-all
[1/2] incubator-tamaya-extensions git commit: [TAMAYA-290] Mutation coverage is now 26%.
Repository: incubator-tamaya-extensions Updated Branches: refs/heads/master a9552da35 -> 8fc2efbdb [TAMAYA-290] Mutation coverage is now 26%. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/commit/175241f8 Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/tree/175241f8 Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/diff/175241f8 Branch: refs/heads/master Commit: 175241f83c842263b377fdf3b45c71ae6bd521ce Parents: a9552da Author: Oliver B. Fischer Authored: Sat Sep 23 21:31:58 2017 +0200 Committer: Oliver B. Fischer Committed: Thu Sep 28 23:43:09 2017 +0200 -- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/175241f8/pom.xml -- diff --git a/pom.xml b/pom.xml index 4e99f80..f939567 100644 --- a/pom.xml +++ b/pom.xml @@ -521,7 +521,7 @@ under the License. pitest-maven ${pitest-plugin.version} -24 +26 false org.apache.tamaya.*
[2/2] incubator-tamaya-extensions git commit: [TAMAYA-291] Added JUnit as dependency to the CDI module.
[TAMAYA-291] Added JUnit as dependency to the CDI module. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/commit/8fc2efbd Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/tree/8fc2efbd Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/diff/8fc2efbd Branch: refs/heads/master Commit: 8fc2efbdb4741b47745fe9151c8ee11370dc4f20 Parents: 175241f Author: Oliver B. Fischer Authored: Fri Sep 29 00:14:31 2017 +0200 Committer: Oliver B. Fischer Committed: Fri Sep 29 00:14:31 2017 +0200 -- modules/injection/cdi/pom.xml | 4 1 file changed, 4 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/8fc2efbd/modules/injection/cdi/pom.xml -- diff --git a/modules/injection/cdi/pom.xml b/modules/injection/cdi/pom.xml index b3ca6d6..ad11948 100644 --- a/modules/injection/cdi/pom.xml +++ b/modules/injection/cdi/pom.xml @@ -124,6 +124,10 @@ under the License. ${ds.version} test + +junit +junit +