@@ -79,7 +79,7 @@ * {@link #access(String, Class)} for accessing a configured value. * *
Configured values can also be accessed via injection.
- * See {@link javax.config.inject.ConfigProperty} for more information.
+ * See {@link jakarta.config.inject.ConfigProperty} for more information.
*
* @author Mark Struberg
* @author Gerhard Petracek
diff --git a/api/src/main/java/javax/config/ConfigAccessor.java b/api/src/main/java/jakarta/config/ConfigAccessor.java
similarity index 96%
rename from api/src/main/java/javax/config/ConfigAccessor.java
rename to api/src/main/java/jakarta/config/ConfigAccessor.java
index ddd4b6c..552c8b7 100644
--- a/api/src/main/java/javax/config/ConfigAccessor.java
+++ b/api/src/main/java/jakarta/config/ConfigAccessor.java
@@ -24,13 +24,13 @@
* Extracted the Config part out of DeltaSpike and proposed as Microprofile-Config 8ff76eb3bcfaf4fd
*
*******************************************************************************/
-package javax.config;
+package jakarta.config;
import java.time.Duration;
import java.util.Optional;
-import javax.config.spi.Converter;
+import jakarta.config.spi.Converter;
/**
@@ -90,7 +90,7 @@ public interface ConfigAccessor
@@ -45,13 +45,13 @@
* {@link Thread#getContextClassLoader()}).
*
*
- * A 'Configuration' consists of the information collected from the registered {@link javax.config.spi.ConfigSource ConfigSources}.
- * These {@link javax.config.spi.ConfigSource ConfigSources} get sorted according to
- * their ordinal defined via {@link javax.config.spi.ConfigSource#getOrdinal()}.
+ * A 'Configuration' consists of the information collected from the registered {@link jakarta.config.spi.ConfigSource ConfigSources}.
+ * These {@link jakarta.config.spi.ConfigSource ConfigSources} get sorted according to
+ * their ordinal defined via {@link jakarta.config.spi.ConfigSource#getOrdinal()}.
* Thus it is possible to overwrite configuration by providing in a ConfigSource with higher importance from outside.
*
*
- * It is also possible to register custom {@link javax.config.spi.ConfigSource ConfigSources} to flexibly
+ * It is also possible to register custom {@link jakarta.config.spi.ConfigSource ConfigSources} to flexibly
* extend the configuration mechanism. An example would be to pick up
* configuration values from a database table.
*
@@ -77,7 +77,7 @@ private ConfigProvider() {
}
/**
- * Provide a {@link Config} based on all {@link javax.config.spi.ConfigSource ConfigSources} of the
+ * Provide a {@link Config} based on all {@link jakarta.config.spi.ConfigSource ConfigSources} of the
* current Thread Context ClassLoader (TCCL)
* The {@link Config} will be stored for future retrieval.
*
@@ -90,7 +90,7 @@ public static Config getConfig() {
}
/**
- * Provide a {@link Config} based on all {@link javax.config.spi.ConfigSource ConfigSources} of the
+ * Provide a {@link Config} based on all {@link jakarta.config.spi.ConfigSource ConfigSources} of the
* specified ClassLoader
*
*
diff --git a/api/src/main/java/javax/config/ConfigSnapshot.java b/api/src/main/java/jakarta/config/ConfigSnapshot.java
similarity index 98%
rename from api/src/main/java/javax/config/ConfigSnapshot.java
rename to api/src/main/java/jakarta/config/ConfigSnapshot.java
index 04307fd..8e8f9bc 100644
--- a/api/src/main/java/javax/config/ConfigSnapshot.java
+++ b/api/src/main/java/jakarta/config/ConfigSnapshot.java
@@ -24,7 +24,7 @@
*
*******************************************************************************/
-package javax.config;
+package jakarta.config;
/**
* A value holder for ConfigAccessor values which all got resolved in a guaranteed atomic way.
diff --git a/api/src/main/java/javax/config/inject/ConfigProperty.java b/api/src/main/java/jakarta/config/inject/ConfigProperty.java
similarity index 92%
rename from api/src/main/java/javax/config/inject/ConfigProperty.java
rename to api/src/main/java/jakarta/config/inject/ConfigProperty.java
index be75b15..d34bf18 100644
--- a/api/src/main/java/javax/config/inject/ConfigProperty.java
+++ b/api/src/main/java/jakarta/config/inject/ConfigProperty.java
@@ -17,7 +17,7 @@
* limitations under the License.
*/
-package javax.config.inject;
+package jakarta.config.inject;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
@@ -32,6 +32,7 @@
import javax.enterprise.util.Nonbinding;
import javax.inject.Qualifier;
+
/**
* Binds the injection point with a configured value.
* Can be used to annotate injection points of type {@code TYPE}, {@code Optional Injecting a native value is recommended for a mandatory property and its value does not change at runtime or used by a bean with RequestScoped.
* A further recommendation is to use the built in {@code META-INF/javaconfig.properties} file mechanism
@@ -84,7 +85,7 @@
* If {@code ConfigProperty} is used with a type where no {@link javax.config.spi.Converter} exists,
+ * If {@code ConfigProperty} is used with a type where no {@link jakarta.config.spi.Converter} exists,
* a deployment error will be thrown.
*
* @author Ondrej Mihalyi
@@ -105,7 +106,7 @@
@Retention(RUNTIME)
@Target({METHOD, FIELD, PARAMETER, TYPE})
public @interface ConfigProperty {
- String UNCONFIGURED_VALUE="javax.config.configproperty.unconfigureddvalue";
+ String UNCONFIGURED_VALUE="jakarta.config.configproperty.unconfigureddvalue";
/**
* The key of the config property used to look up the configuration value.
@@ -122,7 +123,7 @@
/**
* The default value if the configured property value does not exist.
*
- * If the target Type is not String a proper {@link javax.config.spi.Converter} will get applied.
+ * If the target Type is not String a proper {@link jakarta.config.spi.Converter} will get applied.
* That means that any default value string should follow the formatting rules of the registered Converters.
*
*
@@ -132,7 +133,7 @@
String defaultValue() default UNCONFIGURED_VALUE;
/**
- * @see javax.config.ConfigAccessor.Builder#evaluateVariables(boolean)
+ * @see jakarta.config.ConfigAccessor.Builder#evaluateVariables(boolean)
* @return whether variable replacement is enabled. Defaults to {@code true}.
*/
@Nonbinding
diff --git a/api/src/main/java/javax/config/inject/package-info.java b/api/src/main/java/jakarta/config/inject/package-info.java
similarity index 84%
rename from api/src/main/java/javax/config/inject/package-info.java
rename to api/src/main/java/jakarta/config/inject/package-info.java
index bbeb242..348c1e2 100644
--- a/api/src/main/java/javax/config/inject/package-info.java
+++ b/api/src/main/java/jakarta/config/inject/package-info.java
@@ -31,12 +31,12 @@
* The following types can be injected:
* A 'Configuration' consists of the information collected from the registered
- * {@link javax.config.spi.ConfigSource ConfigSources}.
+ * {@link jakarta.config.spi.ConfigSource ConfigSources}.
* These {@code ConfigSources} get sorted according to their ordinal.
* That way it is possible to overwrite configuration with lower importance from outside.
*
@@ -50,13 +50,13 @@
* That means that one can put the default configuration in a {@code META-INF/javaconfig.properties} anywhere on the classpath.
* and the Operations team can later simply e.g set a system property to change this default configuration.
*
- * It is of course also possible to register own {@link javax.config.spi.ConfigSource ConfigSources}.
+ * It is of course also possible to register own {@link jakarta.config.spi.ConfigSource ConfigSources}.
* A {@code ConfigSource} could e.g. read configuration values from a database table, a remote server, etc
*
* The configuration of an application is represented by an instance of {@link javax.config.Config}.
- * The {@link javax.config.Config} can be accessed via the {@link javax.config.ConfigProvider}.
+ * The configuration of an application is represented by an instance of {@link jakarta.config.Config}.
+ * The {@link jakarta.config.Config} can be accessed via the {@link jakarta.config.ConfigProvider}.
*
* Custom ConfigSource will get picked up via the {@link java.util.ServiceLoader} mechanism and and can be registered by
* providing a file
* Adding a dynamic amount of custom config sources can be done programmatically via
- * {@link javax.config.spi.ConfigSourceProvider}.
+ * {@link ConfigSourceProvider}.
*
* If a ConfigSource implements the {@link AutoCloseable} interface
* then the {@link AutoCloseable#close()} method will be called when
- * the underlying {@link javax.config.Config} is being released.
+ * the underlying {@link jakarta.config.Config} is being released.
*
- * If you register the same {@code ConfigSource} instance within multiple {@link javax.config.Config} then non-portable behaviour results.
+ * If you register the same {@code ConfigSource} instance within multiple {@link jakarta.config.Config} then non-portable behaviour results.
*
* @author Mark Struberg
* @author Gerhard Petracek
@@ -174,10 +174,10 @@ default boolean isScannable() {
/**
* The callback should get invoked if an attribute change got detected inside the ConfigSource.
*
- * @param callback will be set by the {@link javax.config.Config} after this
+ * @param callback will be set by the {@link jakarta.config.Config} after this
* {@code ConfigSource} got created and before any configured values
* get served.
- * @return ChangeSupport informing the {@link javax.config.Config} implementation about support for changes by this source
+ * @return ChangeSupport informing the {@link jakarta.config.Config} implementation about support for changes by this source
* @see ChangeSupport
*/
default ChangeSupport setAttributeChangeCallback(Consumer
- * {@link javax.config.Config} implementations may use this information for internal optimizations.
+ * {@link jakarta.config.Config} implementations may use this information for internal optimizations.
*/
enum ChangeSupport {
/**
diff --git a/api/src/main/java/javax/config/spi/ConfigSourceProvider.java b/api/src/main/java/jakarta/config/spi/ConfigSourceProvider.java
similarity index 94%
rename from api/src/main/java/javax/config/spi/ConfigSourceProvider.java
rename to api/src/main/java/jakarta/config/spi/ConfigSourceProvider.java
index e9e29ba..cd1f52a 100644
--- a/api/src/main/java/javax/config/spi/ConfigSourceProvider.java
+++ b/api/src/main/java/jakarta/config/spi/ConfigSourceProvider.java
@@ -27,7 +27,8 @@
*
*******************************************************************************/
-package javax.config.spi;
+package jakarta.config.spi;
+
/**
* Implement this interfaces to provide multiple ConfigSources.
@@ -40,7 +41,7 @@
*
* A ConfigSourceProvider will get picked up via the
* {@link java.util.ServiceLoader} mechanism and can be registered by providing a
- * {@code META-INF/services/javax.config.spi.ConfigSourceProvider} file which contains
+ * {@code META-INF/services/ConfigSourceProvider} file which contains
* the fully qualified classname of the custom ConfigSourceProvider.
*
* @author Mark Struberg
@@ -55,7 +56,7 @@ public interface ConfigSourceProvider {
* For each e.g. property file, we return a single ConfigSource or an empty list if no ConfigSource exists.
*
* @param forClassLoader the classloader which should be used if any is needed
- * @return the {@link ConfigSource ConfigSources} to register within the {@link javax.config.Config}.
+ * @return the {@link ConfigSource ConfigSources} to register within the {@link jakarta.config.Config}.
*/
Iterable Interface for converting configured values from String to any Java type.
@@ -45,7 +45,7 @@
*
* Custom Converters will get picked up via the {@link java.util.ServiceLoader} mechanism and and can be registered by
* providing a file A Converter can specify a {@code javax.annotation.Priority}.
@@ -103,7 +103,7 @@
*
* If a Converter implements the {@link AutoCloseable} interface
* then the {@link AutoCloseable#close()} method will be called when
- * the underlying {@link javax.config.Config} is being released.
+ * the underlying {@link jakarta.config.Config} is being released.
*
* @author Ron Smeral
* @author Mark Struberg
diff --git a/api/src/main/java/javax/config/spi/package-info.java b/api/src/main/java/jakarta/config/spi/package-info.java
similarity index 83%
rename from api/src/main/java/javax/config/spi/package-info.java
rename to api/src/main/java/jakarta/config/spi/package-info.java
index 32de65b..7a2be46 100644
--- a/api/src/main/java/javax/config/spi/package-info.java
+++ b/api/src/main/java/jakarta/config/spi/package-info.java
@@ -20,13 +20,13 @@
/**
* This package contains classes which are used to extend the standard functionality in a portable way.
- * A user can provide own {@link javax.config.spi.ConfigSource ConfigSources} and
- * {@link javax.config.spi.Converter Converters} to extend the information available in the Config.
+ * A user can provide own {@link jakarta.config.spi.ConfigSource ConfigSources} and
+ * {@link jakarta.config.spi.Converter Converters} to extend the information available in the Config.
*
- * The package also contains the class {@link javax.config.spi.ConfigProviderResolver}
+ * The package also contains the class {@link jakarta.config.spi.ConfigProviderResolver}
* which is used to pick up the actual implementation.
* This is used to build up a builder and manually add {@link javax.config.spi.ConfigSource ConfigSources}.. This is used to build up a builder and manually add {@link jakarta.config.spi.ConfigSource ConfigSources}..Injecting Dynamic Values
*
* The next sample injects a Provider for the value of {@code my.long.property} property to resolve the property dynamically.
- * Each invocation to {@code Provider#get()} will resolve the latest value from underlying {@link javax.config.Config} again.
+ * Each invocation to {@code Provider#get()} will resolve the latest value from underlying {@link jakarta.config.Config} again.
* The existence of configured values will get checked during startup.
* Instances of {@code javax.inject.Provider
@@ -93,7 +94,7 @@
* private Provider<Long> longConfigValue;
*
*
- *
*
- *
*
@@ -45,5 +45,5 @@
*
*/
@org.osgi.annotation.versioning.Version("1.0")
-package javax.config.inject;
+package jakarta.config.inject;
diff --git a/api/src/main/java/javax/config/package-info.java b/api/src/main/java/jakarta/config/package-info.java
similarity index 90%
rename from api/src/main/java/javax/config/package-info.java
rename to api/src/main/java/jakarta/config/package-info.java
index b1e7c7f..8bc337c 100644
--- a/api/src/main/java/javax/config/package-info.java
+++ b/api/src/main/java/jakarta/config/package-info.java
@@ -34,7 +34,7 @@
* T where T is a Type where a {@link javax.config.spi.Converter} exists and the property must exist.T where T is a Type where a {@link jakarta.config.spi.Converter} exists and the property must exist.
- * Optional<T> where T is a Type where a {@link javax.config.spi.Converter} exists where the property may exist.
+ * Optional<T> where T is a Type where a {@link jakarta.config.spi.Converter} exists where the property may exist.
*
- * Provider<T> where T is a Type where a {@link javax.config.spi.Converter} exists where the property may exist.
+ * Provider<T> where T is a Type where a {@link jakarta.config.spi.Converter} exists where the property may exist.
* How it works
*
* Accessing and Using the Configuration
*
- *
* Config config = ConfigProvider#getConfig();
@@ -75,5 +75,5 @@
*
*/
@org.osgi.annotation.versioning.Version("1.0")
-package javax.config;
+package jakarta.config;
diff --git a/api/src/main/java/javax/config/spi/ConfigBuilder.java b/api/src/main/java/jakarta/config/spi/ConfigBuilder.java
similarity index 98%
rename from api/src/main/java/javax/config/spi/ConfigBuilder.java
rename to api/src/main/java/jakarta/config/spi/ConfigBuilder.java
index 4030d99..54c34c0 100644
--- a/api/src/main/java/javax/config/spi/ConfigBuilder.java
+++ b/api/src/main/java/jakarta/config/spi/ConfigBuilder.java
@@ -26,9 +26,9 @@
* API improvements + JavaDoc f53258b8eca1253fee52
*
*******************************************************************************/
-package javax.config.spi;
+package jakarta.config.spi;
-import javax.config.Config;
+import jakarta.config.Config;
/**
* Builder for manually creating an instance of a {@code Config}.
diff --git a/api/src/main/java/javax/config/spi/ConfigProviderResolver.java b/api/src/main/java/jakarta/config/spi/ConfigProviderResolver.java
similarity index 96%
rename from api/src/main/java/javax/config/spi/ConfigProviderResolver.java
rename to api/src/main/java/jakarta/config/spi/ConfigProviderResolver.java
index a6e8d18..df89f15 100644
--- a/api/src/main/java/javax/config/spi/ConfigProviderResolver.java
+++ b/api/src/main/java/jakarta/config/spi/ConfigProviderResolver.java
@@ -18,13 +18,13 @@
* limitations under the License.
*******************************************************************************/
-package javax.config.spi;
+package jakarta.config.spi;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.ServiceLoader;
-import javax.config.Config;
+import jakarta.config.Config;
/**
* This class is not intended to be used by end-users but for
@@ -44,13 +44,13 @@ protected ConfigProviderResolver() {
private static volatile ConfigProviderResolver instance = null;
/**
- * @see javax.config.ConfigProvider#getConfig()
+ * @see jakarta.config.ConfigProvider#getConfig()
* @return config the config object for the Thread Context Classloader
*/
public abstract Config getConfig();
/**
- * @see javax.config.ConfigProvider#getConfig(ClassLoader)
+ * @see jakarta.config.ConfigProvider#getConfig(ClassLoader)
* @param loader the classloader
* @return config the config object for the specified classloader
*/
@@ -96,7 +96,7 @@ protected ConfigProviderResolver() {
/**
* Creates a ConfigProviderResolver object
- * Only used internally from within {@link javax.config.ConfigProvider}
+ * Only used internally from within {@link jakarta.config.ConfigProvider}
* @return ConfigProviderResolver an instance of ConfigProviderResolver
*/
public static ConfigProviderResolver instance() {
diff --git a/api/src/main/java/javax/config/spi/ConfigSource.java b/api/src/main/java/jakarta/config/spi/ConfigSource.java
similarity index 93%
rename from api/src/main/java/javax/config/spi/ConfigSource.java
rename to api/src/main/java/jakarta/config/spi/ConfigSource.java
index 46e3dd1..48dc2f3 100644
--- a/api/src/main/java/javax/config/spi/ConfigSource.java
+++ b/api/src/main/java/jakarta/config/spi/ConfigSource.java
@@ -28,7 +28,7 @@
* Methods renamed, JavaDoc and cleanup
*
*******************************************************************************/
-package javax.config.spi;
+package jakarta.config.spi;
import java.util.Map;
import java.util.Set;
@@ -63,18 +63,18 @@
*
- * META-INF/services/javax.config.spi.ConfigSource
+ * META-INF/services/ConfigSource
*
* which contains the fully qualified {@code ConfigSource} implementation class name as content.
*
*
- * META-INF/services/javax.config.spi.Converter
+ * META-INF/services/Converter
* which contains the fully qualified {@code Converter} implementation class name as content.
*
* Usage
- *
@@ -49,4 +49,4 @@
*
*/
@org.osgi.annotation.versioning.Version("1.1")
-package javax.config.spi;
+package jakarta.config.spi;
diff --git a/pom.xml b/pom.xml
index 1e30752..b2125d1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -16,13 +16,11 @@