diff --git a/cdi-config-extension/src/main/java/org/ndx/aadarchi/cdi/deltaspike/commons/CommonsConfigurationConfigProducer.java b/cdi-config-extension/src/main/java/org/ndx/aadarchi/cdi/deltaspike/commons/CommonsConfigurationConfigProducer.java index af9ce8aa..3ca065e4 100644 --- a/cdi-config-extension/src/main/java/org/ndx/aadarchi/cdi/deltaspike/commons/CommonsConfigurationConfigProducer.java +++ b/cdi-config-extension/src/main/java/org/ndx/aadarchi/cdi/deltaspike/commons/CommonsConfigurationConfigProducer.java @@ -5,6 +5,7 @@ import org.apache.commons.configuration2.EnvironmentConfiguration; import org.apache.commons.configuration2.FileBasedConfiguration; import org.apache.commons.configuration2.PropertiesConfiguration; +import org.apache.commons.configuration2.SystemConfiguration; import org.apache.commons.configuration2.builder.FileBasedConfigurationBuilder; import org.apache.commons.configuration2.builder.fluent.Parameters; import org.apache.commons.configuration2.ex.ConfigurationException; @@ -35,10 +36,15 @@ public class CommonsConfigurationConfigProducer { return new CommonsConfigurationConfigSource("apache-deltaspike.properties", 10, configuration); } @Produces @Dependent ConfigSource createEnvironmentSource() { - EnvironmentConfiguration environment = new EnvironmentConfiguration(); return new CommonsConfigurationConfigSource( "environment", 0, - environment); + new EnvironmentConfiguration()); + } + @Produces @Dependent ConfigSource createPropertiesSource() { + return new CommonsConfigurationConfigSource( + "properties", + 100, + new SystemConfiguration()); } } diff --git a/freemarker-cdi-producer/pom.xml b/freemarker-cdi-producer/pom.xml index 1028d7f3..e3e80c10 100644 --- a/freemarker-cdi-producer/pom.xml +++ b/freemarker-cdi-producer/pom.xml @@ -12,6 +12,11 @@ This CDI producer allows easy usage of Freemarker in a CDI-compatible application. + + ${project.groupId} + cdi-config-extension + ${project.version} + jakarta.enterprise jakarta.enterprise.cdi-api @@ -25,7 +30,7 @@ freemarker - io.github.Riduidel.aadarchi + ${project.groupId} aadarchi-test-utils ${project.version} test diff --git a/git-scm-handler-helper/pom.xml b/git-scm-handler-helper/pom.xml index 4789a117..378060ae 100644 --- a/git-scm-handler-helper/pom.xml +++ b/git-scm-handler-helper/pom.xml @@ -8,6 +8,8 @@ 0.1.15-SNAPSHOT git-scm-handler-helper + Aadarchi : Git SCM Handler helper + A small extension allowing easy git clone whatever provider is used org.eclipse.jgit diff --git a/gitlab-scm-handler/pom.xml b/gitlab-scm-handler/pom.xml index 9c367f8b..c36b66cc 100644 --- a/gitlab-scm-handler/pom.xml +++ b/gitlab-scm-handler/pom.xml @@ -34,10 +34,17 @@ gitlab-vfs ${project.version} + + + javax.annotation + javax.annotation-api + 1.3.2 + org.gitlab4j gitlab4j-api + org.jboss.weld weld-junit5 diff --git a/gitlab-scm-handler/src/main/java/org/ndx/aadarchi/gitlab/GitLabContainer.java b/gitlab-scm-handler/src/main/java/org/ndx/aadarchi/gitlab/GitLabContainer.java index f34e1cdc..9648e01b 100644 --- a/gitlab-scm-handler/src/main/java/org/ndx/aadarchi/gitlab/GitLabContainer.java +++ b/gitlab-scm-handler/src/main/java/org/ndx/aadarchi/gitlab/GitLabContainer.java @@ -1,12 +1,11 @@ package org.ndx.aadarchi.gitlab; -import jakarta.enterprise.context.ApplicationScoped; -import jakarta.enterprise.inject.Produces; -import jakarta.inject.Inject; - import org.gitlab4j.api.GitLabApi; import org.ndx.aadarchi.cdi.deltaspike.ConfigProperty; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; + /** * Since {@link GitLabApi} contains a public final method ( * {@link GitLabApi#duplicate()} ), it can be proxied by CDI. As a consequence, diff --git a/gitlab-scm-handler/src/main/java/org/ndx/aadarchi/gitlab/GitOperatorProducer.java b/gitlab-scm-handler/src/main/java/org/ndx/aadarchi/gitlab/GitOperatorProducer.java index 4035da6d..1f6743f5 100644 --- a/gitlab-scm-handler/src/main/java/org/ndx/aadarchi/gitlab/GitOperatorProducer.java +++ b/gitlab-scm-handler/src/main/java/org/ndx/aadarchi/gitlab/GitOperatorProducer.java @@ -1,28 +1,10 @@ package org.ndx.aadarchi.gitlab; -import java.io.File; -import java.io.IOException; -import java.util.Arrays; -import java.util.List; -import java.util.Set; -import java.util.logging.Logger; -import java.util.stream.Collectors; +import org.ndx.aadarchi.cdi.deltaspike.ConfigProperty; -import jakarta.enterprise.context.ApplicationScoped; import jakarta.enterprise.inject.Produces; -import jakarta.inject.Inject; import jakarta.inject.Named; -import org.eclipse.jgit.api.Git; -import org.eclipse.jgit.api.ListBranchCommand.ListMode; -import org.eclipse.jgit.api.errors.GitAPIException; -import org.eclipse.jgit.lib.Ref; -import org.eclipse.jgit.transport.UsernamePasswordCredentialsProvider; -import org.ndx.aadarchi.cdi.deltaspike.ConfigProperty; -import org.ndx.aadarchi.gitlab.GitOperator; - -import com.structurizr.annotation.Component; - /** * Component dedicated to low-level git operations * @author Nicolas diff --git a/gitlab-scm-handler/src/main/java/org/ndx/aadarchi/gitlab/vfs/GitLabFileSystemProvider.java b/gitlab-scm-handler/src/main/java/org/ndx/aadarchi/gitlab/vfs/GitLabFileSystemProvider.java index ebb317ca..398e48fc 100644 --- a/gitlab-scm-handler/src/main/java/org/ndx/aadarchi/gitlab/vfs/GitLabFileSystemProvider.java +++ b/gitlab-scm-handler/src/main/java/org/ndx/aadarchi/gitlab/vfs/GitLabFileSystemProvider.java @@ -1,7 +1,5 @@ package org.ndx.aadarchi.gitlab.vfs; -import jakarta.inject.Inject; - import org.apache.commons.vfs2.FileObject; import org.apache.commons.vfs2.FileSystemException; import org.apache.commons.vfs2.FileSystemManager; @@ -12,6 +10,8 @@ import org.ndx.aadarchi.gitlab.Constants; import org.ndx.aadarchi.vfs.gitlab.GitLabFileProvider; +import jakarta.inject.Inject; + /** * Load a pseudo-http file system dedicated to access to GitLab (by using our GitLab API) * @author nicolas-delsaux diff --git a/pom.xml b/pom.xml index cd8be024..885a9f38 100644 --- a/pom.xml +++ b/pom.xml @@ -24,6 +24,7 @@ cdi-in-maven-plugin-helper structurizr-components-detector aadarchi-test-utils + freemarker-cdi-producer 17 @@ -137,7 +138,7 @@ org.gitlab4j gitlab4j-api - 4.16.0 + 5.5.0 org.jboss.weld.se