Skip to content

Commit

Permalink
Added support for Java 21, migrated to Jakarta namespace, updated ver…
Browse files Browse the repository at this point in the history
…sions of dependencies to latest.
  • Loading branch information
divjad--- committed Nov 29, 2023
1 parent 00f5c27 commit f721691
Show file tree
Hide file tree
Showing 22 changed files with 61 additions and 62 deletions.
2 changes: 1 addition & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>kumuluzee-config-mp-parent</artifactId>
<groupId>com.kumuluz.ee.config</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>3.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
import com.kumuluz.ee.configuration.sources.FileConfigurationSource;
import com.kumuluz.ee.configuration.sources.SystemPropertyConfigurationSource;
import com.kumuluz.ee.configuration.utils.ConfigurationUtil;
import jakarta.annotation.Priority;
import org.eclipse.microprofile.config.Config;
import org.eclipse.microprofile.config.spi.ConfigBuilder;
import org.eclipse.microprofile.config.spi.ConfigSource;
import org.eclipse.microprofile.config.spi.Converter;

import javax.annotation.Priority;
import java.lang.reflect.Array;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
*/
package com.kumuluz.ee.config.microprofile.annotations;

import javax.inject.Qualifier;
import jakarta.inject.Qualifier;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,21 @@
* out of or in connection with the software or the use or other dealings in the
* software. See the License for the specific language governing permissions and
* limitations under the License.
*/
*/
package com.kumuluz.ee.config.microprofile.cdi;

import com.kumuluz.ee.config.microprofile.ConfigImpl;
import com.kumuluz.ee.config.microprofile.annotations.OptionalCollectionIP;
import com.kumuluz.ee.config.microprofile.utils.AlternativeTypesUtil;
import jakarta.enterprise.event.Observes;
import jakarta.enterprise.inject.spi.*;
import jakarta.enterprise.util.AnnotationLiteral;
import org.eclipse.microprofile.config.Config;
import org.eclipse.microprofile.config.ConfigProvider;
import org.eclipse.microprofile.config.ConfigValue;
import org.eclipse.microprofile.config.inject.ConfigProperties;
import org.eclipse.microprofile.config.inject.ConfigProperty;

import javax.enterprise.event.Observes;
import javax.enterprise.inject.spi.*;
import javax.enterprise.util.AnnotationLiteral;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.*;
Expand Down Expand Up @@ -73,7 +73,8 @@ public void collectConfigProducer(@Observes ProcessInjectionPoint<?, ?> pip) {
}
// add annotation if injection type is Optional<List<?>> or Optional<Set<?>>
if (isOptionalCollection(pip.getInjectionPoint().getType())) {
pip.configureInjectionPoint().addQualifier(new AnnotationLiteral<OptionalCollectionIP>() {});
pip.configureInjectionPoint().addQualifier(new AnnotationLiteral<OptionalCollectionIP>() {
});
}
injectionPoints.add(pip.getInjectionPoint());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* out of or in connection with the software or the use or other dealings in the
* software. See the License for the specific language governing permissions and
* limitations under the License.
*/
*/
package com.kumuluz.ee.config.microprofile.cdi;

import com.kumuluz.ee.config.microprofile.ConfigImpl;
Expand All @@ -28,10 +28,11 @@
import org.eclipse.microprofile.config.ConfigValue;
import org.eclipse.microprofile.config.inject.ConfigProperty;

import javax.annotation.PostConstruct;
import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.inject.Produces;
import javax.enterprise.inject.spi.InjectionPoint;
import jakarta.annotation.PostConstruct;
import jakarta.enterprise.context.ApplicationScoped;
import jakarta.enterprise.inject.Produces;
import jakarta.enterprise.inject.spi.InjectionPoint;

import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package com.kumuluz.ee.config.microprofile.cdi;

import com.kumuluz.ee.config.microprofile.ConfigImpl;
import jakarta.enterprise.context.Dependent;
import jakarta.enterprise.inject.spi.DeploymentException;
import jakarta.enterprise.inject.spi.InjectionPoint;
import org.eclipse.microprofile.config.ConfigProvider;
import org.eclipse.microprofile.config.inject.ConfigProperties;
import org.eclipse.microprofile.config.inject.ConfigProperty;

import javax.enterprise.context.Dependent;
import javax.enterprise.inject.spi.DeploymentException;
import javax.enterprise.inject.spi.InjectionPoint;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
Expand Down Expand Up @@ -51,7 +51,8 @@ public static Object getGenericPropertiesObject(Class<?> propertiesObjectType,

return propertiesObject;

} catch (InstantiationException | IllegalAccessException | InvocationTargetException | NoSuchMethodException e) {
} catch (InstantiationException | IllegalAccessException | InvocationTargetException |
NoSuchMethodException e) {
throw new DeploymentException("Could not instantiate a @ConfigProperties object " + propertiesObjectType, e);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
import org.eclipse.microprofile.config.ConfigValue;
import org.eclipse.microprofile.config.inject.ConfigProperty;

import javax.enterprise.context.Dependent;
import javax.enterprise.inject.spi.AnnotatedMember;
import javax.enterprise.inject.spi.DeploymentException;
import javax.enterprise.inject.spi.InjectionPoint;
import jakarta.enterprise.context.Dependent;
import jakarta.enterprise.inject.spi.AnnotatedMember;
import jakarta.enterprise.inject.spi.DeploymentException;
import jakarta.enterprise.inject.spi.InjectionPoint;
import java.util.Optional;
import java.util.OptionalDouble;
import java.util.OptionalInt;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@
* out of or in connection with the software or the use or other dealings in the
* software. See the License for the specific language governing permissions and
* limitations under the License.
*/
*/
package com.kumuluz.ee.config.microprofile.cdi;

import javax.enterprise.inject.spi.BeanAttributes;
import jakarta.enterprise.inject.spi.BeanAttributes;

import java.lang.annotation.Annotation;
import java.util.Set;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,12 @@
* out of or in connection with the software or the use or other dealings in the
* software. See the License for the specific language governing permissions and
* limitations under the License.
*/
*/
package com.kumuluz.ee.config.microprofile.converters;

import jakarta.annotation.Priority;
import org.eclipse.microprofile.config.spi.Converter;

import javax.annotation.Priority;

/**
* Boolean converter.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@
*/
package com.kumuluz.ee.config.microprofile.converters;

import jakarta.annotation.Priority;
import org.eclipse.microprofile.config.spi.Converter;

import javax.annotation.Priority;

/**
* Byte converter.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@
*/
package com.kumuluz.ee.config.microprofile.converters;

import jakarta.annotation.Priority;
import org.eclipse.microprofile.config.spi.Converter;

import javax.annotation.Priority;

/**
* Character converter.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

import org.eclipse.microprofile.config.spi.Converter;

import javax.annotation.Priority;
import jakarta.annotation.Priority;

/**
* Class converter based on Class.forName.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,12 @@
* out of or in connection with the software or the use or other dealings in the
* software. See the License for the specific language governing permissions and
* limitations under the License.
*/
*/
package com.kumuluz.ee.config.microprofile.converters;

import jakarta.annotation.Priority;
import org.eclipse.microprofile.config.spi.Converter;

import javax.annotation.Priority;


/**
* Double converter.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,12 @@
* out of or in connection with the software or the use or other dealings in the
* software. See the License for the specific language governing permissions and
* limitations under the License.
*/
*/
package com.kumuluz.ee.config.microprofile.converters;

import jakarta.annotation.Priority;
import org.eclipse.microprofile.config.spi.Converter;

import javax.annotation.Priority;

/**
* Float converter.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,12 @@
* out of or in connection with the software or the use or other dealings in the
* software. See the License for the specific language governing permissions and
* limitations under the License.
*/
*/
package com.kumuluz.ee.config.microprofile.converters;

import jakarta.annotation.Priority;
import org.eclipse.microprofile.config.spi.Converter;

import javax.annotation.Priority;

/**
* Integer converter.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,12 @@
* out of or in connection with the software or the use or other dealings in the
* software. See the License for the specific language governing permissions and
* limitations under the License.
*/
*/
package com.kumuluz.ee.config.microprofile.converters;

import jakarta.annotation.Priority;
import org.eclipse.microprofile.config.spi.Converter;

import javax.annotation.Priority;


/**
* Long converter.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@

import org.eclipse.microprofile.config.spi.Converter;

import javax.annotation.Priority;
import jakarta.annotation.Priority;

import java.util.OptionalDouble;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@

import org.eclipse.microprofile.config.spi.Converter;

import javax.annotation.Priority;
import jakarta.annotation.Priority;

import java.util.OptionalInt;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
*/
package com.kumuluz.ee.config.microprofile.converters;

import jakarta.annotation.Priority;
import org.eclipse.microprofile.config.spi.Converter;

import javax.annotation.Priority;
import java.util.OptionalLong;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@
*/
package com.kumuluz.ee.config.microprofile.converters;

import jakarta.annotation.Priority;
import org.eclipse.microprofile.config.spi.Converter;

import javax.annotation.Priority;

/**
* Short converter.
*
Expand Down
26 changes: 13 additions & 13 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<groupId>com.kumuluz.ee.config</groupId>
<artifactId>kumuluzee-config-mp-parent</artifactId>
<packaging>pom</packaging>
<version>2.1.0-SNAPSHOT</version>
<version>3.0.0-SNAPSHOT</version>
<modules>
<module>core</module>
<module>tck</module>
Expand All @@ -23,22 +23,22 @@
<url>https://ee.kumuluz.com</url>

<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

<kumuluzee.version>4.1.0</kumuluzee.version>
<kumuluzee.version>5.0.0-SNAPSHOT</kumuluzee.version>

<microprofile-config.version>2.0</microprofile-config.version>
<microprofile-config.version>3.1</microprofile-config.version>
<hamcrest.version>1.3</hamcrest.version>
<testng.version>6.14.3</testng.version>
<arquillian.version>1.6.0.Final</arquillian.version>
<kumuluzee-arquillian-container.version>1.1.1</kumuluzee-arquillian-container.version>

<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
<nexus.staging.plugin.version>1.6.8</nexus.staging.plugin.version>
<gpg.plugin.version>1.6</gpg.plugin.version>
<surefire.plugin.version>2.22.2</surefire.plugin.version>
<testng.version>7.8.0</testng.version>
<arquillian.version>1.8.0.Final</arquillian.version>
<kumuluzee-arquillian-container.version>2.0.0-SNAPSHOT</kumuluzee-arquillian-container.version>

<maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version>
<nexus.staging.plugin.version>1.6.13</nexus.staging.plugin.version>
<gpg.plugin.version>3.1.0</gpg.plugin.version>
<surefire.plugin.version>3.2.2</surefire.plugin.version>
</properties>

<scm>
Expand Down
2 changes: 1 addition & 1 deletion tck/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>kumuluzee-config-mp-parent</artifactId>
<groupId>com.kumuluz.ee.config</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>3.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down

0 comments on commit f721691

Please sign in to comment.