Skip to content

Commit

Permalink
Seems like, this time, the move to Java 17 is possible ...
Browse files Browse the repository at this point in the history
  • Loading branch information
Riduidel committed Feb 28, 2024
1 parent 1ed5528 commit 1d40b81
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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());
}
}
7 changes: 6 additions & 1 deletion freemarker-cdi-producer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
<description>This CDI producer allows easy usage of Freemarker in a
CDI-compatible application.</description>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>cdi-config-extension</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>jakarta.enterprise</groupId>
<artifactId>jakarta.enterprise.cdi-api</artifactId>
Expand All @@ -25,7 +30,7 @@
<artifactId>freemarker</artifactId>
</dependency>
<dependency>
<groupId>io.github.Riduidel.aadarchi</groupId>
<groupId>${project.groupId}</groupId>
<artifactId>aadarchi-test-utils</artifactId>
<version>${project.version}</version>
<scope>test</scope>
Expand Down
2 changes: 2 additions & 0 deletions git-scm-handler-helper/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
<version>0.1.15-SNAPSHOT</version>
</parent>
<artifactId>git-scm-handler-helper</artifactId>
<name>Aadarchi : Git SCM Handler helper</name>
<description>A small extension allowing easy git clone whatever provider is used</description>
<dependencies>
<dependency>
<groupId>org.eclipse.jgit</groupId>
Expand Down
7 changes: 7 additions & 0 deletions gitlab-scm-handler/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,17 @@
<artifactId>gitlab-vfs</artifactId>
<version>${project.version}</version>
</dependency>
<!-- Strangely enough, some part of the gitlab api code requires the old javax.annotation.Priority -->
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>1.3.2</version>
</dependency>
<dependency>
<groupId>org.gitlab4j</groupId>
<artifactId>gitlab4j-api</artifactId>
</dependency>

<dependency>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-junit5</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<module>cdi-in-maven-plugin-helper</module>
<module>structurizr-components-detector</module>
<module>aadarchi-test-utils</module>
<module>freemarker-cdi-producer</module>
</modules>
<properties>
<java.version>17</java.version>
Expand Down Expand Up @@ -137,7 +138,7 @@
<dependency>
<groupId>org.gitlab4j</groupId>
<artifactId>gitlab4j-api</artifactId>
<version>4.16.0</version>
<version>5.5.0</version>
</dependency>
<dependency>
<groupId>org.jboss.weld.se</groupId>
Expand Down

0 comments on commit 1d40b81

Please sign in to comment.