diff --git a/aadarchi-maven-plugin/src/main/java/org/ndx/aadarchi/maven/plugin/AvailablePropertiesMojo.java b/aadarchi-maven-plugin/src/main/java/org/ndx/aadarchi/maven/plugin/AvailablePropertiesMojo.java index a669ba01..922eae11 100644 --- a/aadarchi-maven-plugin/src/main/java/org/ndx/aadarchi/maven/plugin/AvailablePropertiesMojo.java +++ b/aadarchi-maven-plugin/src/main/java/org/ndx/aadarchi/maven/plugin/AvailablePropertiesMojo.java @@ -1,18 +1,19 @@ package org.ndx.aadarchi.maven.plugin; import com.structurizr.annotation.Component; -import org.apache.deltaspike.core.api.config.ConfigProperty; + import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; import org.apache.maven.plugins.annotations.LifecyclePhase; import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.ResolutionScope; +import org.ndx.aadarchi.cdi.deltaspike.ConfigProperty; import org.ndx.aadarchi.maven.cdi.helper.wrappers.AbstractCDIStarterMojo; -import javax.enterprise.inject.spi.Bean; -import javax.enterprise.inject.spi.BeanManager; -import javax.enterprise.inject.spi.InjectionPoint; -import javax.inject.Inject; +import jakarta.enterprise.inject.spi.Bean; +import jakarta.enterprise.inject.spi.BeanManager; +import jakarta.enterprise.inject.spi.InjectionPoint; +import jakarta.inject.Inject; import java.util.Arrays; import java.util.Map; import java.util.Map.Entry; @@ -40,7 +41,7 @@ public static class ListAvailableProperties implements Runnable { */ Set filteredPackages = new TreeSet<>(Arrays.asList( "org.jboss.weld", - "javax.enterprise.inject", + "jakarta.enterprise.inject", "org.apache.deltaspike")); private boolean isInFilteredPackage(String packageName) { diff --git a/aadarchi-maven-plugin/src/main/java/org/ndx/aadarchi/maven/plugin/GenerateDiagramsRunnable.java b/aadarchi-maven-plugin/src/main/java/org/ndx/aadarchi/maven/plugin/GenerateDiagramsRunnable.java index c6e3c5a0..d5b08219 100644 --- a/aadarchi-maven-plugin/src/main/java/org/ndx/aadarchi/maven/plugin/GenerateDiagramsRunnable.java +++ b/aadarchi-maven-plugin/src/main/java/org/ndx/aadarchi/maven/plugin/GenerateDiagramsRunnable.java @@ -3,8 +3,8 @@ import java.io.IOException; import java.util.logging.Logger; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; import org.ndx.aadarchi.base.ArchitectureDocumentationBuilder; diff --git a/aadarchi-test-utils/pom.xml b/aadarchi-test-utils/pom.xml index 0bb67fc6..b00f8e11 100644 --- a/aadarchi-test-utils/pom.xml +++ b/aadarchi-test-utils/pom.xml @@ -13,13 +13,13 @@ Mainly contains tools allowing easy injection of Maven properties into tests - jakarta.enterprise - jakarta.enterprise.cdi-api + ${project.groupId} + cdi-config-extension + ${project.version} - - org.apache.deltaspike.core - deltaspike-core-impl + jakarta.enterprise + jakarta.enterprise.cdi-api diff --git a/aadarchi-test-utils/src/main/java/org/ndx/aadarchi/maven/cdi/faker/properties/ExposeMavenPropertiesAsConfigProperties.java b/aadarchi-test-utils/src/main/java/org/ndx/aadarchi/maven/cdi/faker/properties/ExposeMavenPropertiesAsConfigProperties.java index bae51c4e..178e5161 100644 --- a/aadarchi-test-utils/src/main/java/org/ndx/aadarchi/maven/cdi/faker/properties/ExposeMavenPropertiesAsConfigProperties.java +++ b/aadarchi-test-utils/src/main/java/org/ndx/aadarchi/maven/cdi/faker/properties/ExposeMavenPropertiesAsConfigProperties.java @@ -3,27 +3,65 @@ import java.io.File; import java.io.IOException; import java.util.Map; +import java.util.Optional; import java.util.function.Predicate; import java.util.logging.Logger; -import javax.inject.Inject; +import org.ndx.aadarchi.cdi.deltaspike.ConfigSource; -import org.apache.deltaspike.core.api.config.Source; -import org.apache.deltaspike.core.api.projectstage.ProjectStage; -import org.apache.deltaspike.core.spi.config.ConfigSource; +import jakarta.enterprise.context.ApplicationScoped; -@Source +@ApplicationScoped public class ExposeMavenPropertiesAsConfigProperties implements ConfigSource { private static final Logger logger = Logger.getLogger(ExposeMavenPropertiesAsConfigProperties.class.getName()); private static final int DELTASPIKE_PRIORITY = 1000; + + public static enum Keys { + BASE_DIR("project.basedir") { + + @Override + public String getComputedValue() { + return computeBasedir(); + } + + }, + BUILD_DIR("project.build.directory") { + + @Override + public String getComputedValue() { + return computeBuildDirectory(); + } + + }; + + private final String propertyKey; + + private Keys(String propertyKey) { + this.propertyKey = propertyKey; + } + + static Optional getEnumValueFor(String key) { + for(Keys k : values()) { + if(k.getPropertyKey().equals(key)) { + return Optional.ofNullable(k.getComputedValue()); + } + } + return Optional.empty(); + } + + String getPropertyKey() { + return propertyKey; + } + + public abstract String getComputedValue(); + + } public ExposeMavenPropertiesAsConfigProperties() { super(); } - @Inject ProjectStage projectStage; - @Override public String getConfigName() { return "maven-fake-properties"; @@ -36,25 +74,19 @@ public Map getProperties() { @Override public String getPropertyValue(String key) { - switch(key) { - case "project.basedir": - return computeBasedir(); - case "project.build.directory": - return computeBuildDirectory(); - default: - return null; - } + return Keys.getEnumValueFor(key) + .orElse(null); } - private String computeBuildDirectory() { + static String computeBuildDirectory() { return computePathMatching(file -> new File(file, "target").exists() && new File(file, "target").isDirectory())+"/target"; } - private String computeBasedir() { + static String computeBasedir() { return computePathMatching(file -> new File(file, ".git").exists()); } - private String computePathMatching(Predicate predicate) { + static private String computePathMatching(Predicate predicate) { File current = new File("."); try { current = current.getCanonicalFile(); @@ -64,7 +96,7 @@ private String computePathMatching(Predicate predicate) { } } - private String computeParentPathMatching(File current, Predicate test) { + static private String computeParentPathMatching(File current, Predicate test) { if(test.test(current)) return current.getAbsolutePath(); else diff --git a/aadarchi-test-utils/src/main/java/org/ndx/aadarchi/maven/cdi/faker/properties/FilterMavenPropertiesInValues.java b/aadarchi-test-utils/src/main/java/org/ndx/aadarchi/maven/cdi/faker/properties/FilterMavenPropertiesInValues.java new file mode 100644 index 00000000..c6a8e738 --- /dev/null +++ b/aadarchi-test-utils/src/main/java/org/ndx/aadarchi/maven/cdi/faker/properties/FilterMavenPropertiesInValues.java @@ -0,0 +1,37 @@ +package org.ndx.aadarchi.maven.cdi.faker.properties; + +import org.apache.commons.lang3.StringUtils; +import org.ndx.aadarchi.cdi.deltaspike.ConfigFilter; + +import jakarta.inject.Inject; + +public class FilterMavenPropertiesInValues implements ConfigFilter { + + @Inject ExposeMavenPropertiesAsConfigProperties configSource; + + @Override + public String filterValue(String key, String value) { + String updatedValue = value; + for(ExposeMavenPropertiesAsConfigProperties.Keys k : ExposeMavenPropertiesAsConfigProperties.Keys.values()) { + String initial = String.format("${%s}", k.getPropertyKey()); + String replaced = k.getComputedValue(); + updatedValue = updatedValue.replace(initial, replaced); + } + return updatedValue; + } + + @Override + public String filterValueForLog(String key, String value) { + String updatedValue = value; + for(ExposeMavenPropertiesAsConfigProperties.Keys k : ExposeMavenPropertiesAsConfigProperties.Keys.values()) { + String initial = String.format("${%s}", k.getPropertyKey()); + String replaced = k.getComputedValue(); + if(k.getPropertyKey().contains("password")) { + replaced = StringUtils.repeat('*', replaced.length()); + } + updatedValue = updatedValue.replace(initial, replaced); + } + return updatedValue; + } + +} diff --git a/adr-tickets-extractor/src/main/java/org/ndx/aadarchi/tickets/ADRExtractor.java b/adr-tickets-extractor/src/main/java/org/ndx/aadarchi/tickets/ADRExtractor.java index d743f4f9..1c48df05 100644 --- a/adr-tickets-extractor/src/main/java/org/ndx/aadarchi/tickets/ADRExtractor.java +++ b/adr-tickets-extractor/src/main/java/org/ndx/aadarchi/tickets/ADRExtractor.java @@ -13,12 +13,11 @@ import java.util.logging.Logger; import java.util.stream.Collectors; -import javax.enterprise.context.ApplicationScoped; -import javax.enterprise.inject.Instance; -import javax.inject.Inject; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.enterprise.inject.Instance; +import jakarta.inject.Inject; import org.apache.commons.vfs2.FileObject; -import org.apache.deltaspike.core.api.config.ConfigProperty; import org.ndx.aadarchi.base.AgileArchitectureSection; import org.ndx.aadarchi.base.Enhancer; import org.ndx.aadarchi.base.OutputBuilder; @@ -28,6 +27,7 @@ import org.ndx.aadarchi.base.enhancers.tickets.Ticket; import org.ndx.aadarchi.base.enhancers.tickets.TicketStatus; import org.ndx.aadarchi.base.enhancers.tickets.TicketsHandler; +import org.ndx.aadarchi.cdi.deltaspike.ConfigProperty; import com.structurizr.annotation.Component; import com.structurizr.model.Element; diff --git a/architecture-documentation/src/main/java/org/ndx/aadarchi/architecture/doumentatiocn/EnhancerLister.java b/architecture-documentation/src/main/java/org/ndx/aadarchi/architecture/doumentatiocn/EnhancerLister.java index deef2a8b..77b959e5 100644 --- a/architecture-documentation/src/main/java/org/ndx/aadarchi/architecture/doumentatiocn/EnhancerLister.java +++ b/architecture-documentation/src/main/java/org/ndx/aadarchi/architecture/doumentatiocn/EnhancerLister.java @@ -8,8 +8,8 @@ import org.ndx.aadarchi.base.OutputBuilder; import org.ndx.aadarchi.base.enhancers.ModelElementAdapter; -import javax.enterprise.inject.Instance; -import javax.inject.Inject; +import jakarta.enterprise.inject.Instance; +import jakarta.inject.Inject; import java.io.File; import java.io.IOException; import java.util.Comparator; diff --git a/base/src/main/java/org/ndx/aadarchi/base/ArchitectureDocumentationBuilder.java b/base/src/main/java/org/ndx/aadarchi/base/ArchitectureDocumentationBuilder.java index 0c6327a6..7981eb31 100644 --- a/base/src/main/java/org/ndx/aadarchi/base/ArchitectureDocumentationBuilder.java +++ b/base/src/main/java/org/ndx/aadarchi/base/ArchitectureDocumentationBuilder.java @@ -4,12 +4,12 @@ import java.util.logging.Level; import java.util.logging.Logger; -import javax.enterprise.context.ApplicationScoped; -import javax.enterprise.inject.Any; -import javax.enterprise.inject.Instance; -import javax.enterprise.inject.se.SeContainer; -import javax.enterprise.inject.se.SeContainerInitializer; -import javax.inject.Inject; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.enterprise.inject.Any; +import jakarta.enterprise.inject.Instance; +import jakarta.enterprise.inject.se.SeContainer; +import jakarta.enterprise.inject.se.SeContainerInitializer; +import jakarta.inject.Inject; import org.jboss.weld.config.ConfigurationKey; import org.ndx.aadarchi.base.providers.FromDsl; diff --git a/base/src/main/java/org/ndx/aadarchi/base/ArchitectureEnhancer.java b/base/src/main/java/org/ndx/aadarchi/base/ArchitectureEnhancer.java index 26e9b5ce..fb0c4b09 100644 --- a/base/src/main/java/org/ndx/aadarchi/base/ArchitectureEnhancer.java +++ b/base/src/main/java/org/ndx/aadarchi/base/ArchitectureEnhancer.java @@ -12,18 +12,18 @@ import java.util.stream.Stream; import java.util.stream.StreamSupport; -import javax.annotation.PostConstruct; -import javax.enterprise.context.ApplicationScoped; -import javax.enterprise.inject.Instance; -import javax.inject.Inject; +import jakarta.annotation.PostConstruct; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.enterprise.inject.Instance; +import jakarta.inject.Inject; import org.apache.commons.lang3.stream.Streams; import org.apache.commons.lang3.time.StopWatch; import org.apache.commons.vfs2.FileObject; -import org.apache.deltaspike.core.api.config.ConfigProperty; import org.ndx.aadarchi.base.enhancers.ModelElementKeys.ConfigProperties.DisabledEnhancers; import org.ndx.aadarchi.base.enhancers.ModelElementKeys.ConfigProperties.EnhancementsDir; import org.ndx.aadarchi.base.utils.SimpleOutputBuilder; +import org.ndx.aadarchi.cdi.deltaspike.ConfigProperty; import com.structurizr.Workspace; import com.structurizr.annotation.UsesComponent; diff --git a/base/src/main/java/org/ndx/aadarchi/base/enhancers/ToDsl.java b/base/src/main/java/org/ndx/aadarchi/base/enhancers/ToDsl.java index a74663d2..d2d3c016 100644 --- a/base/src/main/java/org/ndx/aadarchi/base/enhancers/ToDsl.java +++ b/base/src/main/java/org/ndx/aadarchi/base/enhancers/ToDsl.java @@ -11,17 +11,17 @@ import java.util.logging.Logger; import java.util.stream.Collectors; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.apache.commons.io.FileUtils; import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.vfs2.FileObject; -import org.apache.deltaspike.core.api.config.ConfigProperty; import org.ndx.aadarchi.base.AgileArchitectureException; import org.ndx.aadarchi.base.ModelEnhancer; import org.ndx.aadarchi.base.OutputBuilder; import org.ndx.aadarchi.base.ViewEnhancer; +import org.ndx.aadarchi.cdi.deltaspike.ConfigProperty; import com.structurizr.Workspace; import com.structurizr.model.Component; diff --git a/base/src/main/java/org/ndx/aadarchi/base/enhancers/collector/DocumentsCollector.java b/base/src/main/java/org/ndx/aadarchi/base/enhancers/collector/DocumentsCollector.java index c191fbcd..f83c18c8 100644 --- a/base/src/main/java/org/ndx/aadarchi/base/enhancers/collector/DocumentsCollector.java +++ b/base/src/main/java/org/ndx/aadarchi/base/enhancers/collector/DocumentsCollector.java @@ -12,20 +12,20 @@ import java.util.stream.Collectors; import java.util.stream.Stream; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.vfs2.FileExtensionSelector; import org.apache.commons.vfs2.FileObject; import org.apache.commons.vfs2.FileSystemException; -import org.apache.deltaspike.core.api.config.ConfigProperty; import org.ndx.aadarchi.base.AgileArchitectureSection; import org.ndx.aadarchi.base.ModelEnhancer; import org.ndx.aadarchi.base.OutputBuilder; import org.ndx.aadarchi.base.enhancers.ModelElementKeys.ConfigProperties.EnhancementsDir; import org.ndx.aadarchi.base.utils.CantToResolvePath; import org.ndx.aadarchi.base.utils.StructurizrUtils; +import org.ndx.aadarchi.cdi.deltaspike.ConfigProperty; import com.structurizr.Workspace; import com.structurizr.model.Component; diff --git a/base/src/main/java/org/ndx/aadarchi/base/enhancers/dependencies/AddDependenciesFromProperties.java b/base/src/main/java/org/ndx/aadarchi/base/enhancers/dependencies/AddDependenciesFromProperties.java index d45c5961..864fbc6c 100644 --- a/base/src/main/java/org/ndx/aadarchi/base/enhancers/dependencies/AddDependenciesFromProperties.java +++ b/base/src/main/java/org/ndx/aadarchi/base/enhancers/dependencies/AddDependenciesFromProperties.java @@ -4,7 +4,7 @@ import java.util.logging.Logger; import java.util.stream.Collectors; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.apache.commons.text.similarity.LevenshteinDistance; import org.ndx.aadarchi.base.OutputBuilder; diff --git a/base/src/main/java/org/ndx/aadarchi/base/enhancers/graph/GraphEmitter.java b/base/src/main/java/org/ndx/aadarchi/base/enhancers/graph/GraphEmitter.java index e9cc5f25..637b9b3d 100644 --- a/base/src/main/java/org/ndx/aadarchi/base/enhancers/graph/GraphEmitter.java +++ b/base/src/main/java/org/ndx/aadarchi/base/enhancers/graph/GraphEmitter.java @@ -5,19 +5,19 @@ import java.nio.charset.Charset; import java.util.logging.Logger; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; import org.apache.commons.io.IOUtils; import org.apache.commons.vfs2.FileObject; import org.apache.commons.vfs2.FileSystemException; -import org.apache.deltaspike.core.api.config.ConfigProperty; import org.ndx.aadarchi.base.OutputBuilder; import org.ndx.aadarchi.base.ViewEnhancer; import org.ndx.aadarchi.base.enhancers.ModelElementKeys; import org.ndx.aadarchi.base.enhancers.ModelElementKeys.ConfigProperties.DiagramsDir; import org.ndx.aadarchi.base.enhancers.ModelElementKeys.ConfigProperties.Force; import org.ndx.aadarchi.base.utils.CantToResolvePath; +import org.ndx.aadarchi.cdi.deltaspike.ConfigProperty; import com.structurizr.Workspace; import com.structurizr.annotation.Component; diff --git a/base/src/main/java/org/ndx/aadarchi/base/enhancers/graph/ViewUpdater.java b/base/src/main/java/org/ndx/aadarchi/base/enhancers/graph/ViewUpdater.java index 258d2a5b..b7f82081 100644 --- a/base/src/main/java/org/ndx/aadarchi/base/enhancers/graph/ViewUpdater.java +++ b/base/src/main/java/org/ndx/aadarchi/base/enhancers/graph/ViewUpdater.java @@ -10,7 +10,7 @@ import org.ndx.aadarchi.base.enhancers.ModelElementKeys; import org.ndx.aadarchi.base.enhancers.ViewEnhancerAdapter; -import javax.inject.Inject; +import jakarta.inject.Inject; import java.util.logging.Logger; public class ViewUpdater extends ViewEnhancerAdapter { diff --git a/base/src/main/java/org/ndx/aadarchi/base/enhancers/includes/ImplicitIncludeManager.java b/base/src/main/java/org/ndx/aadarchi/base/enhancers/includes/ImplicitIncludeManager.java index 4797e28f..ceb6bdf0 100644 --- a/base/src/main/java/org/ndx/aadarchi/base/enhancers/includes/ImplicitIncludeManager.java +++ b/base/src/main/java/org/ndx/aadarchi/base/enhancers/includes/ImplicitIncludeManager.java @@ -4,11 +4,10 @@ import java.io.IOException; import java.nio.file.Path; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.apache.commons.vfs2.FileObject; import org.apache.commons.vfs2.FileSystemException; -import org.apache.deltaspike.core.api.config.ConfigProperty; import org.ndx.aadarchi.base.AgileArchitectureSection; import org.ndx.aadarchi.base.OutputBuilder; import org.ndx.aadarchi.base.enhancers.ModelElementAdapter; @@ -16,6 +15,7 @@ import org.ndx.aadarchi.base.utils.CantAccessPath; import org.ndx.aadarchi.base.utils.SimpleOutputBuilder; import org.ndx.aadarchi.base.utils.StructurizrUtils; +import org.ndx.aadarchi.cdi.deltaspike.ConfigProperty; import com.structurizr.annotation.Component; import com.structurizr.model.Element; diff --git a/base/src/main/java/org/ndx/aadarchi/base/enhancers/scm/ReadmeReader.java b/base/src/main/java/org/ndx/aadarchi/base/enhancers/scm/ReadmeReader.java index cfe51f83..1e18c654 100644 --- a/base/src/main/java/org/ndx/aadarchi/base/enhancers/scm/ReadmeReader.java +++ b/base/src/main/java/org/ndx/aadarchi/base/enhancers/scm/ReadmeReader.java @@ -7,7 +7,6 @@ import org.apache.commons.io.IOUtils; import org.apache.commons.vfs2.FileObject; import org.apache.commons.vfs2.filter.RegexFileFilter; -import org.apache.deltaspike.core.api.config.ConfigProperty; import org.ndx.aadarchi.base.AgileArchitectureSection; import org.ndx.aadarchi.base.OutputBuilder; import org.ndx.aadarchi.base.OutputBuilder.Format; @@ -15,8 +14,9 @@ import org.ndx.aadarchi.base.utils.FileContentCache; import org.ndx.aadarchi.base.utils.StructurizrUtils; import org.ndx.aadarchi.base.utils.commonsvfs.FileObjectDetector; +import org.ndx.aadarchi.cdi.deltaspike.ConfigProperty; -import javax.inject.Inject; +import jakarta.inject.Inject; import java.util.logging.Logger; /** diff --git a/base/src/main/java/org/ndx/aadarchi/base/enhancers/scm/SCMHandler.java b/base/src/main/java/org/ndx/aadarchi/base/enhancers/scm/SCMHandler.java index b7aeb88c..92de7708 100644 --- a/base/src/main/java/org/ndx/aadarchi/base/enhancers/scm/SCMHandler.java +++ b/base/src/main/java/org/ndx/aadarchi/base/enhancers/scm/SCMHandler.java @@ -8,7 +8,7 @@ import java.util.Collection; import java.util.function.Predicate; -import javax.enterprise.inject.Instance; +import jakarta.enterprise.inject.Instance; import org.apache.commons.vfs2.FileObject; diff --git a/base/src/main/java/org/ndx/aadarchi/base/enhancers/scm/SCMLinkGenerator.java b/base/src/main/java/org/ndx/aadarchi/base/enhancers/scm/SCMLinkGenerator.java index 221f0b71..5a624ff3 100644 --- a/base/src/main/java/org/ndx/aadarchi/base/enhancers/scm/SCMLinkGenerator.java +++ b/base/src/main/java/org/ndx/aadarchi/base/enhancers/scm/SCMLinkGenerator.java @@ -5,17 +5,17 @@ import java.util.logging.Logger; import java.util.stream.Collectors; -import javax.enterprise.context.ApplicationScoped; -import javax.enterprise.inject.Instance; -import javax.inject.Inject; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.enterprise.inject.Instance; +import jakarta.inject.Inject; import org.apache.commons.io.FileUtils; -import org.apache.deltaspike.core.api.config.ConfigProperty; import org.ndx.aadarchi.base.AgileArchitectureSection; import org.ndx.aadarchi.base.OutputBuilder; import org.ndx.aadarchi.base.enhancers.ModelElementAdapter; import org.ndx.aadarchi.base.enhancers.ModelElementKeys.Scm; import org.ndx.aadarchi.base.utils.StructurizrUtils; +import org.ndx.aadarchi.cdi.deltaspike.ConfigProperty; import com.structurizr.annotation.Component; import com.structurizr.annotation.UsesComponent; diff --git a/base/src/main/java/org/ndx/aadarchi/base/enhancers/scm/SCMModelElementAdapter.java b/base/src/main/java/org/ndx/aadarchi/base/enhancers/scm/SCMModelElementAdapter.java index 7113a0ab..97e24940 100644 --- a/base/src/main/java/org/ndx/aadarchi/base/enhancers/scm/SCMModelElementAdapter.java +++ b/base/src/main/java/org/ndx/aadarchi/base/enhancers/scm/SCMModelElementAdapter.java @@ -3,8 +3,8 @@ import java.util.Optional; import java.util.logging.Logger; -import javax.enterprise.inject.Instance; -import javax.inject.Inject; +import jakarta.enterprise.inject.Instance; +import jakarta.inject.Inject; import org.ndx.aadarchi.base.enhancers.ModelElementAdapter; diff --git a/base/src/main/java/org/ndx/aadarchi/base/enhancers/scm/SCMProjectCheckouter.java b/base/src/main/java/org/ndx/aadarchi/base/enhancers/scm/SCMProjectCheckouter.java index e9137996..8ca49dc2 100644 --- a/base/src/main/java/org/ndx/aadarchi/base/enhancers/scm/SCMProjectCheckouter.java +++ b/base/src/main/java/org/ndx/aadarchi/base/enhancers/scm/SCMProjectCheckouter.java @@ -5,14 +5,14 @@ import java.util.Map; import java.util.logging.Logger; -import javax.enterprise.inject.Instance; -import javax.inject.Inject; +import jakarta.enterprise.inject.Instance; +import jakarta.inject.Inject; -import org.apache.deltaspike.core.api.config.ConfigProperty; import org.ndx.aadarchi.base.OutputBuilder; import org.ndx.aadarchi.base.enhancers.ModelElementAdapter; import org.ndx.aadarchi.base.enhancers.ModelElementKeys; import org.ndx.aadarchi.base.enhancers.ModelElementKeys.Scm.CheckoutEnabled; +import org.ndx.aadarchi.cdi.deltaspike.ConfigProperty; import com.structurizr.annotation.UsesComponent; import com.structurizr.model.StaticStructureElement; diff --git a/base/src/main/java/org/ndx/aadarchi/base/providers/FromDsl.java b/base/src/main/java/org/ndx/aadarchi/base/providers/FromDsl.java index 33ea29e0..af357977 100644 --- a/base/src/main/java/org/ndx/aadarchi/base/providers/FromDsl.java +++ b/base/src/main/java/org/ndx/aadarchi/base/providers/FromDsl.java @@ -2,16 +2,16 @@ import java.io.File; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.inject.Named; import org.apache.commons.vfs2.FileObject; import org.apache.commons.vfs2.FileSystemException; -import org.apache.deltaspike.core.api.config.ConfigProperty; import org.ndx.aadarchi.base.ArchitectureModelProvider; import org.ndx.aadarchi.base.enhancers.ModelElementKeys.ConfigProperties.WorkspaceDsl; import org.ndx.aadarchi.base.utils.CantAccessPath; +import org.ndx.aadarchi.cdi.deltaspike.ConfigProperty; import com.structurizr.Workspace; import com.structurizr.dsl.StructurizrDslParser; diff --git a/base/src/main/java/org/ndx/aadarchi/base/utils/FileContentCache.java b/base/src/main/java/org/ndx/aadarchi/base/utils/FileContentCache.java index 396fde41..ca77bf74 100644 --- a/base/src/main/java/org/ndx/aadarchi/base/utils/FileContentCache.java +++ b/base/src/main/java/org/ndx/aadarchi/base/utils/FileContentCache.java @@ -6,16 +6,16 @@ import java.net.URL; import java.util.function.Function; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; import org.apache.commons.io.IOUtils; import org.apache.commons.vfs2.FileObject; import org.apache.commons.vfs2.FileSystemException; import org.apache.commons.vfs2.provider.local.LocalFile; -import org.apache.deltaspike.core.api.config.ConfigProperty; import org.ndx.aadarchi.base.enhancers.ModelElementKeys; import org.ndx.aadarchi.base.enhancers.ModelElementKeys.ConfigProperties.Force; +import org.ndx.aadarchi.cdi.deltaspike.ConfigProperty; import com.pivovarit.function.ThrowingFunction; diff --git a/base/src/main/java/org/ndx/aadarchi/base/utils/commonsvfs/FileObjectDetector.java b/base/src/main/java/org/ndx/aadarchi/base/utils/commonsvfs/FileObjectDetector.java index 852249d2..0e11553f 100644 --- a/base/src/main/java/org/ndx/aadarchi/base/utils/commonsvfs/FileObjectDetector.java +++ b/base/src/main/java/org/ndx/aadarchi/base/utils/commonsvfs/FileObjectDetector.java @@ -9,9 +9,9 @@ import java.util.logging.Level; import java.util.logging.Logger; -import javax.enterprise.context.ApplicationScoped; -import javax.enterprise.inject.Instance; -import javax.inject.Inject; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.enterprise.inject.Instance; +import jakarta.inject.Inject; import org.apache.commons.vfs2.FileFilter; import org.apache.commons.vfs2.FileFilterSelector; diff --git a/base/src/main/java/org/ndx/aadarchi/base/utils/descriptions/RelationshipDescriptionProvider.java b/base/src/main/java/org/ndx/aadarchi/base/utils/descriptions/RelationshipDescriptionProvider.java index 76269f87..fca50341 100644 --- a/base/src/main/java/org/ndx/aadarchi/base/utils/descriptions/RelationshipDescriptionProvider.java +++ b/base/src/main/java/org/ndx/aadarchi/base/utils/descriptions/RelationshipDescriptionProvider.java @@ -11,20 +11,21 @@ import java.util.logging.Level; import java.util.logging.Logger; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; - -import org.apache.deltaspike.core.api.config.ConfigResolver.ConfigProvider; +import org.apache.commons.configuration2.builder.fluent.Configurations; import org.ndx.aadarchi.base.enhancers.ModelElementKeys; +import org.ndx.aadarchi.cdi.deltaspike.ConfigProvider; import com.structurizr.Workspace; import com.structurizr.model.StaticStructureElement; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; + @ApplicationScoped public class RelationshipDescriptionProvider { @Inject Logger logger; - @Inject ConfigProvider config; + @Inject ConfigProvider configProvider; public class RelationshipFinder { @@ -75,12 +76,7 @@ private RelationshipFinder createRelationshipDescriptionFinder(Workspace workspa } private File getDescriptionsPropertiesFile(String relationshipPath) { - String propertiesPath = config - .getConfig() - .resolve(relationshipPath) - .evaluateVariables(true) - .withCurrentProjectStage(false) - .getValue() + String propertiesPath = configProvider.resolve(null, relationshipPath); ; if(propertiesPath==null) { /* diff --git a/base/src/main/java/org/ndx/aadarchi/base/utils/icon/FontIcon.java b/base/src/main/java/org/ndx/aadarchi/base/utils/icon/FontIcon.java index cfced980..500bde7b 100644 --- a/base/src/main/java/org/ndx/aadarchi/base/utils/icon/FontIcon.java +++ b/base/src/main/java/org/ndx/aadarchi/base/utils/icon/FontIcon.java @@ -5,8 +5,8 @@ import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -import javax.enterprise.util.Nonbinding; -import javax.inject.Qualifier; +import jakarta.enterprise.util.Nonbinding; +import jakarta.inject.Qualifier; /** * Describes the font icon as an annotation for content to be injected later diff --git a/base/src/main/java/org/ndx/aadarchi/base/utils/icon/IconProducer.java b/base/src/main/java/org/ndx/aadarchi/base/utils/icon/IconProducer.java index a5a59169..81026bf5 100644 --- a/base/src/main/java/org/ndx/aadarchi/base/utils/icon/IconProducer.java +++ b/base/src/main/java/org/ndx/aadarchi/base/utils/icon/IconProducer.java @@ -1,10 +1,10 @@ package org.ndx.aadarchi.base.utils.icon; -import javax.enterprise.context.ApplicationScoped; -import javax.enterprise.inject.Produces; -import javax.enterprise.inject.spi.Annotated; -import javax.enterprise.inject.spi.InjectionPoint; -import javax.inject.Inject; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.enterprise.inject.Produces; +import jakarta.enterprise.inject.spi.Annotated; +import jakarta.enterprise.inject.spi.InjectionPoint; +import jakarta.inject.Inject; import com.structurizr.annotation.UsesComponent; diff --git a/base/src/main/java/org/ndx/aadarchi/base/utils/icon/IconProvider.java b/base/src/main/java/org/ndx/aadarchi/base/utils/icon/IconProvider.java index 999dc46f..28e53e7e 100644 --- a/base/src/main/java/org/ndx/aadarchi/base/utils/icon/IconProvider.java +++ b/base/src/main/java/org/ndx/aadarchi/base/utils/icon/IconProvider.java @@ -2,11 +2,11 @@ import java.util.function.Supplier; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; -import org.apache.deltaspike.core.api.config.ConfigProperty; import org.ndx.aadarchi.base.enhancers.ModelElementKeys; +import org.ndx.aadarchi.cdi.deltaspike.ConfigProperty; /** * A specialized component providing icons from font-awesome when needed diff --git a/base/src/test/java/org/ndx/aadarchi/base/enhancers/scm/ReadmeReaderTest.java b/base/src/test/java/org/ndx/aadarchi/base/enhancers/scm/ReadmeReaderTest.java index 9314e76f..8aa43552 100644 --- a/base/src/test/java/org/ndx/aadarchi/base/enhancers/scm/ReadmeReaderTest.java +++ b/base/src/test/java/org/ndx/aadarchi/base/enhancers/scm/ReadmeReaderTest.java @@ -1,6 +1,6 @@ package org.ndx.aadarchi.base.enhancers.scm; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.assertj.core.util.Arrays; import org.jboss.weld.junit5.EnableWeld; diff --git a/base/src/test/java/org/ndx/aadarchi/base/utils/FileContentCacheTest.java b/base/src/test/java/org/ndx/aadarchi/base/utils/FileContentCacheTest.java index f21511e4..2d7ea00f 100644 --- a/base/src/test/java/org/ndx/aadarchi/base/utils/FileContentCacheTest.java +++ b/base/src/test/java/org/ndx/aadarchi/base/utils/FileContentCacheTest.java @@ -2,10 +2,9 @@ import java.io.IOException; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.apache.commons.vfs2.FileObject; -import org.apache.deltaspike.core.api.config.ConfigProperty; import org.assertj.core.api.Assertions; import org.jboss.weld.junit5.EnableWeld; import org.jboss.weld.junit5.WeldInitiator; @@ -13,6 +12,7 @@ import org.junit.jupiter.api.Test; import org.junit.platform.commons.util.Preconditions; import org.ndx.aadarchi.base.enhancers.ModelElementKeys.ConfigProperties.BasePath; +import org.ndx.aadarchi.cdi.deltaspike.ConfigProperty; @EnableWeld class FileContentCacheTest { diff --git a/cdi-config-extension/pom.xml b/cdi-config-extension/pom.xml index 8c5d3846..b82ae519 100644 --- a/cdi-config-extension/pom.xml +++ b/cdi-config-extension/pom.xml @@ -11,24 +11,23 @@ Aadarchi : CDI Config extension Some CDI extensions + + commons-beanutils + commons-beanutils + 1.9.4 + jakarta.enterprise jakarta.enterprise.cdi-api - org.apache.commons - commons-vfs2 + commons-configuration2 + 2.9.0 - org.apache.deltaspike.core - deltaspike-core-impl - - - javax.enterprise - cdi-api - 2.0.SP1 - provided + org.apache.commons + commons-vfs2 diff --git a/cdi-config-extension/src/main/java/org/ndx/aadarchi/cdi/CommonsVfsFactoryProducer.java b/cdi-config-extension/src/main/java/org/ndx/aadarchi/cdi/CommonsVfsFactoryProducer.java index a825f385..9fdc2557 100644 --- a/cdi-config-extension/src/main/java/org/ndx/aadarchi/cdi/CommonsVfsFactoryProducer.java +++ b/cdi-config-extension/src/main/java/org/ndx/aadarchi/cdi/CommonsVfsFactoryProducer.java @@ -3,8 +3,8 @@ import java.io.File; import java.io.IOException; -import javax.enterprise.inject.Produces; -import javax.inject.Singleton; +import jakarta.enterprise.inject.Produces; +import jakarta.inject.Singleton; import org.apache.commons.vfs2.FileSystemManager; import org.apache.commons.vfs2.VFS; diff --git a/cdi-config-extension/src/main/java/org/ndx/aadarchi/cdi/FileConfigPropertyProducer.java b/cdi-config-extension/src/main/java/org/ndx/aadarchi/cdi/FileConfigPropertyProducer.java index 37a31e75..03e86454 100644 --- a/cdi-config-extension/src/main/java/org/ndx/aadarchi/cdi/FileConfigPropertyProducer.java +++ b/cdi-config-extension/src/main/java/org/ndx/aadarchi/cdi/FileConfigPropertyProducer.java @@ -1,19 +1,22 @@ package org.ndx.aadarchi.cdi; -import javax.enterprise.context.ApplicationScoped; -import javax.enterprise.context.Dependent; -import javax.enterprise.inject.Produces; -import javax.enterprise.inject.spi.InjectionPoint; -import javax.inject.Inject; +import java.util.logging.Logger; import org.apache.commons.vfs2.FileObject; import org.apache.commons.vfs2.FileSystemException; import org.apache.commons.vfs2.FileSystemManager; -import org.apache.deltaspike.core.api.config.ConfigProperty; -import org.apache.deltaspike.core.spi.config.BaseConfigPropertyProducer; +import org.ndx.aadarchi.cdi.deltaspike.BaseConfigPropertyProducer; +import org.ndx.aadarchi.cdi.deltaspike.ConfigProperty; + +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.enterprise.context.Dependent; +import jakarta.enterprise.inject.Produces; +import jakarta.enterprise.inject.spi.InjectionPoint; +import jakarta.inject.Inject; @ApplicationScoped public class FileConfigPropertyProducer extends BaseConfigPropertyProducer { + private static final Logger logger = Logger.getLogger(FileConfigPropertyProducer.class.getName()); @Inject FileSystemManager fsManager; /** @@ -27,6 +30,7 @@ public class FileConfigPropertyProducer extends BaseConfigPropertyProducer { @Dependent @ConfigProperty(name = "ignored") // we actually don't need the name public FileObject produceLocationId(InjectionPoint injectionPoint) throws FileSystemException { + logger.info("Getting FileObject property value of "+injectionPoint); String configuredValue = getStringPropertyValue(injectionPoint); if(configuredValue==null) { diff --git a/cdi-config-extension/src/main/java/org/ndx/aadarchi/cdi/LogProducer.java b/cdi-config-extension/src/main/java/org/ndx/aadarchi/cdi/LogProducer.java index b305f3e9..7130324c 100644 --- a/cdi-config-extension/src/main/java/org/ndx/aadarchi/cdi/LogProducer.java +++ b/cdi-config-extension/src/main/java/org/ndx/aadarchi/cdi/LogProducer.java @@ -2,12 +2,12 @@ import java.util.logging.Logger; -import javax.enterprise.context.ApplicationScoped; -import javax.enterprise.context.Dependent; -import javax.enterprise.inject.Produces; -import javax.enterprise.inject.spi.InjectionPoint; +import org.ndx.aadarchi.cdi.deltaspike.BaseConfigPropertyProducer; -import org.apache.deltaspike.core.spi.config.BaseConfigPropertyProducer; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.enterprise.context.Dependent; +import jakarta.enterprise.inject.Produces; +import jakarta.enterprise.inject.spi.InjectionPoint; @ApplicationScoped public class LogProducer extends BaseConfigPropertyProducer { diff --git a/cdi-config-extension/src/main/java/org/ndx/aadarchi/cdi/deltaspike/BaseConfigPropertyProducer.java b/cdi-config-extension/src/main/java/org/ndx/aadarchi/cdi/deltaspike/BaseConfigPropertyProducer.java new file mode 100644 index 00000000..85a966ea --- /dev/null +++ b/cdi-config-extension/src/main/java/org/ndx/aadarchi/cdi/deltaspike/BaseConfigPropertyProducer.java @@ -0,0 +1,96 @@ +package org.ndx.aadarchi.cdi.deltaspike; + +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.logging.Logger; + +import jakarta.enterprise.context.Dependent; +import jakarta.enterprise.inject.Produces; +import jakarta.enterprise.inject.spi.InjectionPoint; +import jakarta.inject.Inject; + +public class BaseConfigPropertyProducer { + private static final Logger logger = Logger.getLogger(BaseConfigPropertyProducer.class.getName()); + @Inject ConfigProvider configProvider; + + /** + * Get the value of ConfigProperty as a String + * @param injectionPoint the injection point to get a value for + * @return the value of the {@link ConfigProperty} annotation at the injection point as string. + */ + protected String getStringPropertyValue(InjectionPoint injectionPoint) { + ConfigProperty property = injectionPoint.getAnnotated().getAnnotation(ConfigProperty.class); + return configProvider.getValueOf(property); + } + + @Produces + @Dependent + @ConfigProperty(name = "ignored") // we actually don't need the name + public String produceString(InjectionPoint injectionPoint) { + logger.info("Getting string property value of "+injectionPoint); + return getStringPropertyValue(injectionPoint); + } + + @Produces + @Dependent + @ConfigProperty(name = "ignored") // we actually don't need the name + public BigDecimal produceBigDecimal(InjectionPoint injectionPoint) { + return BigDecimal.valueOf(produceDouble(injectionPoint)); + } + + @Produces + @Dependent + @ConfigProperty(name = "ignored") // we actually don't need the name + public BigInteger produceBigInteger(InjectionPoint injectionPoint) { + return BigInteger.valueOf(produceLong(injectionPoint)); + } + + @Produces + @Dependent + @ConfigProperty(name = "ignored") // we actually don't need the name + public Byte produceByte(InjectionPoint injectionPoint) { + return Byte.parseByte(getStringPropertyValue(injectionPoint)); + } + + @Produces + @Dependent + @ConfigProperty(name = "ignored") // we actually don't need the name + public Boolean produceBoolean(InjectionPoint injectionPoint) { + return Boolean.parseBoolean(getStringPropertyValue(injectionPoint)); + } + + @Produces + @Dependent + @ConfigProperty(name = "ignored") // we actually don't need the name + public Double produceDouble(InjectionPoint injectionPoint) { + return Double.parseDouble(getStringPropertyValue(injectionPoint)); + } + + @Produces + @Dependent + @ConfigProperty(name = "ignored") // we actually don't need the name + public Float produceFloat(InjectionPoint injectionPoint) { + return Float.parseFloat(getStringPropertyValue(injectionPoint)); + } + + @Produces + @Dependent + @ConfigProperty(name = "ignored") // we actually don't need the name + public Integer produceInteger(InjectionPoint injectionPoint) { + return Integer.parseInt(getStringPropertyValue(injectionPoint)); + } + + @Produces + @Dependent + @ConfigProperty(name = "ignored") // we actually don't need the name + public Long produceLong(InjectionPoint injectionPoint) { + return Long.parseLong(getStringPropertyValue(injectionPoint)); + } + + @Produces + @Dependent + @ConfigProperty(name = "ignored") // we actually don't need the name + public Short produceShort(InjectionPoint injectionPoint) { + return Short.parseShort(getStringPropertyValue(injectionPoint)); + } +} diff --git a/cdi-config-extension/src/main/java/org/ndx/aadarchi/cdi/deltaspike/ConfigFilter.java b/cdi-config-extension/src/main/java/org/ndx/aadarchi/cdi/deltaspike/ConfigFilter.java new file mode 100644 index 00000000..f2dad19d --- /dev/null +++ b/cdi-config-extension/src/main/java/org/ndx/aadarchi/cdi/deltaspike/ConfigFilter.java @@ -0,0 +1,9 @@ +package org.ndx.aadarchi.cdi.deltaspike; + +public interface ConfigFilter { + + String filterValue(String key, String value); + + String filterValueForLog(String key, String value); + +} diff --git a/cdi-config-extension/src/main/java/org/ndx/aadarchi/cdi/deltaspike/ConfigProperty.java b/cdi-config-extension/src/main/java/org/ndx/aadarchi/cdi/deltaspike/ConfigProperty.java new file mode 100644 index 00000000..27d4d020 --- /dev/null +++ b/cdi-config-extension/src/main/java/org/ndx/aadarchi/cdi/deltaspike/ConfigProperty.java @@ -0,0 +1,36 @@ +package org.ndx.aadarchi.cdi.deltaspike; + +import java.lang.annotation.Documented; +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import static java.lang.annotation.ElementType.*; +import static java.lang.annotation.RetentionPolicy.*; + +import jakarta.enterprise.util.Nonbinding; +import jakarta.inject.Qualifier; + +/** + * This annotation is an extraction from Deltaspike, because that's the only + * part of Deltaspike we use here. + * + * @see + */ +@Target(value={PARAMETER,FIELD,METHOD,CONSTRUCTOR,ANNOTATION_TYPE}) +@Retention(value=RUNTIME) +@Documented +@Qualifier +public @interface ConfigProperty { + public static final String NULL = "org.apache.deltaspike.NullValueMarker"; + /** + * @return Name of the property to get value for + */ + @Nonbinding + String name(); + + /** + * @return the default value of the property + */ + @Nonbinding + String defaultValue() default NULL; +} diff --git a/cdi-config-extension/src/main/java/org/ndx/aadarchi/cdi/deltaspike/ConfigProvider.java b/cdi-config-extension/src/main/java/org/ndx/aadarchi/cdi/deltaspike/ConfigProvider.java new file mode 100644 index 00000000..44a853eb --- /dev/null +++ b/cdi-config-extension/src/main/java/org/ndx/aadarchi/cdi/deltaspike/ConfigProvider.java @@ -0,0 +1,66 @@ +package org.ndx.aadarchi.cdi.deltaspike; + +import java.util.Comparator; +import java.util.Objects; +import java.util.Set; +import java.util.TreeSet; +import java.util.logging.Logger; + +import jakarta.enterprise.inject.Instance; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; + +@Singleton +public class ConfigProvider { + private static final Logger logger = Logger.getLogger(ConfigProvider.class.getName()); + private Set loadedSources = new TreeSet<>( + new ByOrdinalComparator() + ); + + public static class ByOrdinalComparator implements Comparator { + + @Override + public int compare(ConfigSource o1, ConfigSource o2) { + int returned = 0; + returned = -1 * Integer.compare(o1.getOrdinal(), o2.getOrdinal()); + if(returned==0) + returned = o1.getConfigName().compareTo(o2.getConfigName()); + return returned; + } + + } + @Inject Instance configFilterList; + /** + * Load each configuration in its ordinal order + * @param configSources + */ + @Inject + public void loadConfigSources(Instance configSources) { + configSources.stream() + .filter(Objects::nonNull) + .forEach(loadedSources::add); + } + public String getValueOf(ConfigProperty property) { + String foundValue = findValueOf(property); + return resolve(property.name(), foundValue); + } + public String resolve(String name, String value) { + return filterValueOf(name, value); + } + private String filterValueOf(String name, String foundValue) { + String filtered = foundValue; + for(ConfigFilter filter : configFilterList) { + logger.info(String.format("Filtering %s=%s", name, filtered)); + filtered = filter.filterValue(name, filtered); + } + logger.info(String.format("Filtered %s=%s", name, filtered)); + return filtered; + } + private String findValueOf(ConfigProperty property) { + return loadedSources.stream() + .map(source -> source.getPropertyValue(property.name())) + .filter(Objects::nonNull) + .findFirst() + .orElse(property.defaultValue()); + } +} diff --git a/cdi-config-extension/src/main/java/org/ndx/aadarchi/cdi/deltaspike/ConfigSource.java b/cdi-config-extension/src/main/java/org/ndx/aadarchi/cdi/deltaspike/ConfigSource.java new file mode 100644 index 00000000..432a6159 --- /dev/null +++ b/cdi-config-extension/src/main/java/org/ndx/aadarchi/cdi/deltaspike/ConfigSource.java @@ -0,0 +1,43 @@ + +package org.ndx.aadarchi.cdi.deltaspike; + +import java.util.Map; + +/** + * Classes implementing that interface are responsible for providing + * values. + */ +public interface ConfigSource { + /** + * Get the config name, allowing to distinguish various configuration sources + * @return + */ + String getConfigName(); + + /** + * Get the list of properties resolved at startup. + * Those properties won't be reloaded. + * @return + */ + Map getProperties(); + + /** + * Get the value of the property having the given key + * @param key property key + * @return property value if present, null otherwise + */ + String getPropertyValue(String key); + + /** + * Get priority level of config source + * @return any integer value will do. But higher ordinal values will be read first + */ + int getOrdinal(); + + /** + * I don't yet know what it does + * @return + */ + boolean isScannable(); + +} 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 new file mode 100644 index 00000000..af9ce8aa --- /dev/null +++ b/cdi-config-extension/src/main/java/org/ndx/aadarchi/cdi/deltaspike/commons/CommonsConfigurationConfigProducer.java @@ -0,0 +1,44 @@ +package org.ndx.aadarchi.cdi.deltaspike.commons; + +import java.nio.file.NoSuchFileException; + +import org.apache.commons.configuration2.EnvironmentConfiguration; +import org.apache.commons.configuration2.FileBasedConfiguration; +import org.apache.commons.configuration2.PropertiesConfiguration; +import org.apache.commons.configuration2.builder.FileBasedConfigurationBuilder; +import org.apache.commons.configuration2.builder.fluent.Parameters; +import org.apache.commons.configuration2.ex.ConfigurationException; +import org.apache.commons.configuration2.io.ClasspathLocationStrategy; +import org.ndx.aadarchi.cdi.deltaspike.ConfigSource; + +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.enterprise.context.Dependent; +import jakarta.enterprise.inject.Produces; + +public class CommonsConfigurationConfigProducer { + private static final String DELTASPIKE_PROPERTIES_PATH = "META-INF/apache-deltaspike.properties"; + @Produces @Dependent ConfigSource createDeltaspikePropertiesSource() throws ConfigurationException { + Thread.currentThread().setContextClassLoader(getClass().getClassLoader()); + + if(getClass().getClassLoader().getResource(DELTASPIKE_PROPERTIES_PATH)==null) { + return null; + } + + Parameters params = new Parameters(); + FileBasedConfigurationBuilder builder = + new FileBasedConfigurationBuilder(PropertiesConfiguration.class) + .configure(params.properties() + .setLocationStrategy(new ClasspathLocationStrategy()) + .setFileName(DELTASPIKE_PROPERTIES_PATH)); + FileBasedConfiguration configuration = builder.getConfiguration(); + + return new CommonsConfigurationConfigSource("apache-deltaspike.properties", 10, configuration); + } + @Produces @Dependent ConfigSource createEnvironmentSource() { + EnvironmentConfiguration environment = new EnvironmentConfiguration(); + return new CommonsConfigurationConfigSource( + "environment", + 0, + environment); + } +} diff --git a/cdi-config-extension/src/main/java/org/ndx/aadarchi/cdi/deltaspike/commons/CommonsConfigurationConfigSource.java b/cdi-config-extension/src/main/java/org/ndx/aadarchi/cdi/deltaspike/commons/CommonsConfigurationConfigSource.java new file mode 100644 index 00000000..e9e59666 --- /dev/null +++ b/cdi-config-extension/src/main/java/org/ndx/aadarchi/cdi/deltaspike/commons/CommonsConfigurationConfigSource.java @@ -0,0 +1,48 @@ +package org.ndx.aadarchi.cdi.deltaspike.commons; + +import java.util.Map; + +import org.apache.commons.configuration2.Configuration; +import org.ndx.aadarchi.cdi.deltaspike.ConfigSource; + +/** + * A bridge to allow usage of commons configurations config as Deltaspike-like one + */ +public class CommonsConfigurationConfigSource implements ConfigSource { + private String name; + private int ordinal; + private Configuration configuration; + + public CommonsConfigurationConfigSource(String name, int ordinal, Configuration configuration) { + super(); + this.name = name; + this.ordinal = ordinal; + this.configuration = configuration; + } + + @Override + public String getConfigName() { + return name; + } + + @Override + public Map getProperties() { + return null; + } + + @Override + public String getPropertyValue(String key) { + return configuration.getString(key); + } + + @Override + public int getOrdinal() { + return ordinal; + } + + @Override + public boolean isScannable() { + return false; + } + +} diff --git a/cdi-in-maven-plugin-helper/pom.xml b/cdi-in-maven-plugin-helper/pom.xml index 982e41ad..bd80a06b 100644 --- a/cdi-in-maven-plugin-helper/pom.xml +++ b/cdi-in-maven-plugin-helper/pom.xml @@ -11,12 +11,11 @@ Aadarchi : CDI in Maven helper This small java library provides a simple way to have a maven Mojo use CDI for bean injection - - org.apache.deltaspike.core - deltaspike-core-impl + ${project.groupId} + cdi-config-extension + ${project.version} - org.apache.maven maven-core diff --git a/cdi-in-maven-plugin-helper/src/main/java/org/ndx/aadarchi/maven/cdi/helper/properties/ExposeMavenPropertiesAsConfigProperties.java b/cdi-in-maven-plugin-helper/src/main/java/org/ndx/aadarchi/maven/cdi/helper/properties/ExposeMavenPropertiesAsConfigProperties.java index 50e25c75..041b4bd6 100644 --- a/cdi-in-maven-plugin-helper/src/main/java/org/ndx/aadarchi/maven/cdi/helper/properties/ExposeMavenPropertiesAsConfigProperties.java +++ b/cdi-in-maven-plugin-helper/src/main/java/org/ndx/aadarchi/maven/cdi/helper/properties/ExposeMavenPropertiesAsConfigProperties.java @@ -4,16 +4,15 @@ import java.util.logging.Level; import java.util.logging.Logger; -import javax.inject.Inject; - -import org.apache.deltaspike.core.api.config.Source; -import org.apache.deltaspike.core.api.projectstage.ProjectStage; -import org.apache.deltaspike.core.spi.config.ConfigSource; import org.apache.maven.execution.MavenSession; import org.apache.maven.plugin.MojoExecution; import org.apache.maven.plugin.PluginParameterExpressionEvaluator; +import org.ndx.aadarchi.cdi.deltaspike.ConfigSource; + +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; -@Source +@ApplicationScoped public class ExposeMavenPropertiesAsConfigProperties implements ConfigSource { private static final Logger logger = Logger.getLogger(ExposeMavenPropertiesAsConfigProperties.class.getName()); @@ -25,8 +24,6 @@ public ExposeMavenPropertiesAsConfigProperties() { super(); } - @Inject ProjectStage projectStage; - @Inject public void createMavenExpressionEvaluator(MavenSession mavenSession, MojoExecution execution) { evaluator = new PluginParameterExpressionEvaluator(mavenSession, execution); diff --git a/cdi-in-maven-plugin-helper/src/main/java/org/ndx/aadarchi/maven/cdi/helper/properties/FilterMavenPropertiesInValues.java b/cdi-in-maven-plugin-helper/src/main/java/org/ndx/aadarchi/maven/cdi/helper/properties/FilterMavenPropertiesInValues.java index 0d543649..6c493164 100644 --- a/cdi-in-maven-plugin-helper/src/main/java/org/ndx/aadarchi/maven/cdi/helper/properties/FilterMavenPropertiesInValues.java +++ b/cdi-in-maven-plugin-helper/src/main/java/org/ndx/aadarchi/maven/cdi/helper/properties/FilterMavenPropertiesInValues.java @@ -1,17 +1,19 @@ package org.ndx.aadarchi.maven.cdi.helper.properties; -import javax.inject.Inject; +import java.util.logging.Logger; -import org.apache.deltaspike.core.api.config.Filter; -import org.apache.deltaspike.core.api.projectstage.ProjectStage; -import org.apache.deltaspike.core.spi.config.ConfigFilter; import org.apache.maven.execution.MavenSession; import org.apache.maven.plugin.MojoExecution; import org.apache.maven.plugin.PluginParameterExpressionEvaluator; import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluationException; +import org.ndx.aadarchi.cdi.deltaspike.ConfigFilter; -@Filter +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; + +@ApplicationScoped public class FilterMavenPropertiesInValues implements ConfigFilter { + private static final Logger logger = Logger.getLogger(FilterMavenPropertiesInValues.class.getName()); private PluginParameterExpressionEvaluator evaluator; @@ -26,8 +28,9 @@ public void createMavenExpressionEvaluator(MavenSession mavenSession, MojoExecut @Override public String filterValue(String key, String value) { + logger.info("Filtering value "+key); try { - return (String) evaluator.evaluate(value); + return evaluator.evaluate(value).toString(); } catch (ExpressionEvaluationException e) { return value; } diff --git a/cdi-in-maven-plugin-helper/src/main/java/org/ndx/aadarchi/maven/cdi/helper/wrappers/AbstractCDIStarterMojo.java b/cdi-in-maven-plugin-helper/src/main/java/org/ndx/aadarchi/maven/cdi/helper/wrappers/AbstractCDIStarterMojo.java index 2f910bb9..75eb8423 100644 --- a/cdi-in-maven-plugin-helper/src/main/java/org/ndx/aadarchi/maven/cdi/helper/wrappers/AbstractCDIStarterMojo.java +++ b/cdi-in-maven-plugin-helper/src/main/java/org/ndx/aadarchi/maven/cdi/helper/wrappers/AbstractCDIStarterMojo.java @@ -10,11 +10,11 @@ import java.util.Optional; import java.util.Set; -import javax.enterprise.event.Observes; -import javax.enterprise.inject.se.SeContainer; -import javax.enterprise.inject.spi.AfterBeanDiscovery; -import javax.enterprise.inject.spi.BeanManager; -import javax.enterprise.inject.spi.Extension; +import jakarta.enterprise.event.Observes; +import jakarta.enterprise.inject.se.SeContainer; +import jakarta.enterprise.inject.spi.AfterBeanDiscovery; +import jakarta.enterprise.inject.spi.BeanManager; +import jakarta.enterprise.inject.spi.Extension; import org.apache.maven.artifact.Artifact; import org.apache.maven.execution.MavenSession; diff --git a/cdi-in-maven-plugin-helper/src/main/java/org/ndx/aadarchi/maven/cdi/helper/wrappers/CDIUtil.java b/cdi-in-maven-plugin-helper/src/main/java/org/ndx/aadarchi/maven/cdi/helper/wrappers/CDIUtil.java index 1a503fec..97b68226 100644 --- a/cdi-in-maven-plugin-helper/src/main/java/org/ndx/aadarchi/maven/cdi/helper/wrappers/CDIUtil.java +++ b/cdi-in-maven-plugin-helper/src/main/java/org/ndx/aadarchi/maven/cdi/helper/wrappers/CDIUtil.java @@ -5,7 +5,6 @@ import java.lang.annotation.Annotation; import java.lang.reflect.AccessibleObject; import java.nio.file.Files; -import java.nio.file.Paths; import java.util.Collections; import java.util.Enumeration; import java.util.HashSet; @@ -14,11 +13,7 @@ import java.util.jar.JarFile; import java.util.stream.Collectors; -import javax.inject.Qualifier; - -import org.apache.commons.io.FileUtils; import org.apache.commons.io.FilenameUtils; -import org.apache.deltaspike.core.api.literal.DefaultLiteral; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.logging.Log; import org.jboss.weld.environment.se.Weld; @@ -40,15 +35,7 @@ public class CDIUtil { */ public static Set getCdiQualifiers(AccessibleObject x) { Set qualifiers = new HashSet(); - for (Annotation annotation : x.getAnnotations()) { - if (annotation.annotationType().isAnnotationPresent(Qualifier.class)) { - qualifiers.add(annotation); - } - } - if (qualifiers.isEmpty()) { - qualifiers.add(new DefaultLiteral()); - } - return qualifiers; + return CdiProducerBean.getCdiQualifiers(x.getAnnotations()); } /** diff --git a/cdi-in-maven-plugin-helper/src/main/java/org/ndx/aadarchi/maven/cdi/helper/wrappers/CdiBeanWrapper.java b/cdi-in-maven-plugin-helper/src/main/java/org/ndx/aadarchi/maven/cdi/helper/wrappers/CdiBeanWrapper.java index cf4663b0..739a285a 100644 --- a/cdi-in-maven-plugin-helper/src/main/java/org/ndx/aadarchi/maven/cdi/helper/wrappers/CdiBeanWrapper.java +++ b/cdi-in-maven-plugin-helper/src/main/java/org/ndx/aadarchi/maven/cdi/helper/wrappers/CdiBeanWrapper.java @@ -5,10 +5,10 @@ import java.util.Collections; import java.util.Set; -import javax.enterprise.context.Dependent; -import javax.enterprise.context.spi.CreationalContext; -import javax.enterprise.inject.spi.Bean; -import javax.enterprise.inject.spi.InjectionPoint; +import jakarta.enterprise.context.Dependent; +import jakarta.enterprise.context.spi.CreationalContext; +import jakarta.enterprise.inject.spi.Bean; +import jakarta.enterprise.inject.spi.InjectionPoint; public class CdiBeanWrapper implements Bean { @@ -72,9 +72,4 @@ public Class getBeanClass() { public Set getInjectionPoints() { return Collections.emptySet(); } - - @Override - public boolean isNullable() { - return true; - } } diff --git a/cdi-in-maven-plugin-helper/src/main/java/org/ndx/aadarchi/maven/cdi/helper/wrappers/CdiProducerBean.java b/cdi-in-maven-plugin-helper/src/main/java/org/ndx/aadarchi/maven/cdi/helper/wrappers/CdiProducerBean.java index 82bb32f5..fadf5097 100644 --- a/cdi-in-maven-plugin-helper/src/main/java/org/ndx/aadarchi/maven/cdi/helper/wrappers/CdiProducerBean.java +++ b/cdi-in-maven-plugin-helper/src/main/java/org/ndx/aadarchi/maven/cdi/helper/wrappers/CdiProducerBean.java @@ -7,19 +7,17 @@ import java.util.Collections; import java.util.Set; -import javax.enterprise.context.Dependent; -import javax.enterprise.context.spi.CreationalContext; -import javax.enterprise.inject.Typed; -import javax.enterprise.inject.spi.Bean; -import javax.enterprise.inject.spi.BeanManager; -import javax.enterprise.inject.spi.InjectionPoint; -import javax.inject.Qualifier; - -import org.apache.deltaspike.core.api.literal.DefaultLiteral; - import com.google.common.collect.Iterables; import com.google.common.collect.Sets; +import jakarta.enterprise.context.Dependent; +import jakarta.enterprise.context.spi.CreationalContext; +import jakarta.enterprise.inject.Typed; +import jakarta.enterprise.inject.spi.Bean; +import jakarta.enterprise.inject.spi.BeanManager; +import jakarta.enterprise.inject.spi.InjectionPoint; +import jakarta.inject.Qualifier; + public class CdiProducerBean implements Bean { private Method method; private Object hostInstance; @@ -147,14 +145,9 @@ public Set getInjectionPoints() { return Collections.emptySet(); } - @Override - public boolean isNullable() { - return true; - } - - private Set getCdiQualifiers(Annotation[] annotattions) { + public static Set getCdiQualifiers(Annotation[] annotations) { Set qualifiers = Sets.newHashSet(); - for (Annotation annotation : annotattions) { + for (Annotation annotation : annotations) { if (annotation.annotationType().isAnnotationPresent(Qualifier.class)) { qualifiers.add(annotation); } diff --git a/cdi-in-maven-plugin-helper/src/main/java/org/ndx/aadarchi/maven/cdi/helper/wrappers/DefaultLiteral.java b/cdi-in-maven-plugin-helper/src/main/java/org/ndx/aadarchi/maven/cdi/helper/wrappers/DefaultLiteral.java new file mode 100644 index 00000000..38759938 --- /dev/null +++ b/cdi-in-maven-plugin-helper/src/main/java/org/ndx/aadarchi/maven/cdi/helper/wrappers/DefaultLiteral.java @@ -0,0 +1,9 @@ +package org.ndx.aadarchi.maven.cdi.helper.wrappers; + +import jakarta.enterprise.inject.Default; +import jakarta.enterprise.util.AnnotationLiteral; + +public class DefaultLiteral +extends AnnotationLiteral +implements Default { +} diff --git a/cdi-in-maven-plugin-helper/src/main/java/org/ndx/aadarchi/maven/cdi/helper/wrappers/MojoProduces.java b/cdi-in-maven-plugin-helper/src/main/java/org/ndx/aadarchi/maven/cdi/helper/wrappers/MojoProduces.java index de01f095..018de1ca 100644 --- a/cdi-in-maven-plugin-helper/src/main/java/org/ndx/aadarchi/maven/cdi/helper/wrappers/MojoProduces.java +++ b/cdi-in-maven-plugin-helper/src/main/java/org/ndx/aadarchi/maven/cdi/helper/wrappers/MojoProduces.java @@ -8,7 +8,7 @@ /** * A special CDI producer annotation that must be used if you want to declare fields or methods of the Mojo as * producers.
- * Note that it is not possible to use {@code @javax.enterprise.inject.Produces} as the producer annotation in + * Note that it is not possible to use {@code @jakarta.enterprise.inject.Produces} as the producer annotation in * your Mojo since this would activate Maven's own pseudo CDI implementation. All other beans that are created by CDI * are then able to use {@code @Produces} as usual. * diff --git a/freemarker-cdi-producer/src/main/java/org/ndx/aadarchi/freemarker/FreemarkerTemplateProducer.java b/freemarker-cdi-producer/src/main/java/org/ndx/aadarchi/freemarker/FreemarkerTemplateProducer.java index 091eba80..f9de682a 100644 --- a/freemarker-cdi-producer/src/main/java/org/ndx/aadarchi/freemarker/FreemarkerTemplateProducer.java +++ b/freemarker-cdi-producer/src/main/java/org/ndx/aadarchi/freemarker/FreemarkerTemplateProducer.java @@ -2,8 +2,8 @@ import java.io.IOException; -import javax.enterprise.inject.Produces; -import javax.enterprise.inject.spi.InjectionPoint; +import jakarta.enterprise.inject.Produces; +import jakarta.enterprise.inject.spi.InjectionPoint; import freemarker.template.Configuration; import freemarker.template.DefaultObjectWrapper; diff --git a/freemarker-cdi-producer/src/test/java/org/ndx/aadarchi/freemarker/FreemarkerCDIProducerTest.java b/freemarker-cdi-producer/src/test/java/org/ndx/aadarchi/freemarker/FreemarkerCDIProducerTest.java index 3743cf32..df68e61b 100644 --- a/freemarker-cdi-producer/src/test/java/org/ndx/aadarchi/freemarker/FreemarkerCDIProducerTest.java +++ b/freemarker-cdi-producer/src/test/java/org/ndx/aadarchi/freemarker/FreemarkerCDIProducerTest.java @@ -1,8 +1,8 @@ package org.ndx.aadarchi.freemarker; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.inject.Named; import org.assertj.core.api.Assertions; import org.jboss.weld.junit5.EnableWeld; diff --git a/github-scm-handler/src/main/java/org/ndx/aadarchi/github/GitHubProducer.java b/github-scm-handler/src/main/java/org/ndx/aadarchi/github/GitHubProducer.java index 0e8021f2..dad34498 100644 --- a/github-scm-handler/src/main/java/org/ndx/aadarchi/github/GitHubProducer.java +++ b/github-scm-handler/src/main/java/org/ndx/aadarchi/github/GitHubProducer.java @@ -5,13 +5,13 @@ import java.io.IOException; import java.util.logging.Logger; -import javax.enterprise.context.ApplicationScoped; -import javax.enterprise.inject.Produces; -import javax.inject.Inject; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.enterprise.inject.Produces; +import jakarta.inject.Inject; -import org.apache.deltaspike.core.api.config.ConfigProperty; import org.kohsuke.github.GitHub; import org.kohsuke.github.GitHubBuilder; +import org.ndx.aadarchi.cdi.deltaspike.ConfigProperty; /** * Injectable base class loading a GitHub api client on initialization diff --git a/github-scm-handler/src/main/java/org/ndx/aadarchi/github/GitHubTicketsHandler.java b/github-scm-handler/src/main/java/org/ndx/aadarchi/github/GitHubTicketsHandler.java index 57240d4a..1882d6e3 100644 --- a/github-scm-handler/src/main/java/org/ndx/aadarchi/github/GitHubTicketsHandler.java +++ b/github-scm-handler/src/main/java/org/ndx/aadarchi/github/GitHubTicketsHandler.java @@ -7,7 +7,7 @@ import java.util.logging.Logger; import java.util.stream.Collectors; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.kohsuke.github.GHIssue; import org.kohsuke.github.GHIssueState; diff --git a/github-scm-handler/src/main/java/org/ndx/aadarchi/github/GitOperatorProducer.java b/github-scm-handler/src/main/java/org/ndx/aadarchi/github/GitOperatorProducer.java index ad483145..fb9bc6b2 100644 --- a/github-scm-handler/src/main/java/org/ndx/aadarchi/github/GitOperatorProducer.java +++ b/github-scm-handler/src/main/java/org/ndx/aadarchi/github/GitOperatorProducer.java @@ -8,17 +8,17 @@ import java.util.logging.Logger; import java.util.stream.Collectors; -import javax.enterprise.context.ApplicationScoped; -import javax.enterprise.inject.Produces; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.enterprise.inject.Produces; +import jakarta.inject.Inject; +import jakarta.inject.Named; -import org.apache.deltaspike.core.api.config.ConfigProperty; 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; diff --git a/github-scm-handler/src/main/java/org/ndx/aadarchi/github/GithubSCMHandler.java b/github-scm-handler/src/main/java/org/ndx/aadarchi/github/GithubSCMHandler.java index d7a772d1..f1a05ff4 100644 --- a/github-scm-handler/src/main/java/org/ndx/aadarchi/github/GithubSCMHandler.java +++ b/github-scm-handler/src/main/java/org/ndx/aadarchi/github/GithubSCMHandler.java @@ -6,10 +6,10 @@ import java.net.URL; import java.util.logging.Logger; -import javax.enterprise.context.ApplicationScoped; -import javax.enterprise.inject.Instance; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.enterprise.inject.Instance; +import jakarta.inject.Inject; +import jakarta.inject.Named; import org.apache.commons.vfs2.FileObject; import org.apache.commons.vfs2.FileSystemException; diff --git a/github-scm-handler/src/main/java/org/ndx/aadarchi/github/vfs/GitHubFileSystemProvider.java b/github-scm-handler/src/main/java/org/ndx/aadarchi/github/vfs/GitHubFileSystemProvider.java index 3471dc12..4a56d313 100644 --- a/github-scm-handler/src/main/java/org/ndx/aadarchi/github/vfs/GitHubFileSystemProvider.java +++ b/github-scm-handler/src/main/java/org/ndx/aadarchi/github/vfs/GitHubFileSystemProvider.java @@ -2,7 +2,7 @@ import static org.ndx.aadarchi.github.Constants.CONFIG_GITHUB_TOKEN; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.apache.commons.vfs2.FileObject; import org.apache.commons.vfs2.FileSystemException; @@ -10,7 +10,7 @@ import org.apache.commons.vfs2.FileSystemOptions; import org.apache.commons.vfs2.auth.StaticUserAuthenticator; import org.apache.commons.vfs2.impl.DefaultFileSystemConfigBuilder; -import org.apache.deltaspike.core.api.config.ConfigProperty; +import org.ndx.aadarchi.cdi.deltaspike.ConfigProperty; import org.ndx.aadarchi.vfs.github.GitHubFileProvider; /** diff --git a/github-scm-handler/src/test/java/org/ndx/aadarchi/github/GitHubProviderTest.java b/github-scm-handler/src/test/java/org/ndx/aadarchi/github/GitHubProviderTest.java index c7986706..9ab600e6 100644 --- a/github-scm-handler/src/test/java/org/ndx/aadarchi/github/GitHubProviderTest.java +++ b/github-scm-handler/src/test/java/org/ndx/aadarchi/github/GitHubProviderTest.java @@ -4,7 +4,7 @@ import java.io.IOException; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.assertj.core.api.Assertions; import org.jboss.weld.junit5.EnableWeld; diff --git a/github-scm-handler/src/test/java/org/ndx/aadarchi/github/vfs/GitHubFileSystemProviderTest.java b/github-scm-handler/src/test/java/org/ndx/aadarchi/github/vfs/GitHubFileSystemProviderTest.java index 7c37be46..e0edf989 100644 --- a/github-scm-handler/src/test/java/org/ndx/aadarchi/github/vfs/GitHubFileSystemProviderTest.java +++ b/github-scm-handler/src/test/java/org/ndx/aadarchi/github/vfs/GitHubFileSystemProviderTest.java @@ -1,6 +1,6 @@ package org.ndx.aadarchi.github.vfs; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.apache.commons.vfs2.FileObject; import org.apache.commons.vfs2.FileSystemException; 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 1fc42ff3..f34e1cdc 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,11 +1,11 @@ package org.ndx.aadarchi.gitlab; -import javax.enterprise.context.ApplicationScoped; -import javax.enterprise.inject.Produces; -import javax.inject.Inject; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.enterprise.inject.Produces; +import jakarta.inject.Inject; -import org.apache.deltaspike.core.api.config.ConfigProperty; import org.gitlab4j.api.GitLabApi; +import org.ndx.aadarchi.cdi.deltaspike.ConfigProperty; /** * Since {@link GitLabApi} contains a public final method ( diff --git a/gitlab-scm-handler/src/main/java/org/ndx/aadarchi/gitlab/GitLabTicketsHandler.java b/gitlab-scm-handler/src/main/java/org/ndx/aadarchi/gitlab/GitLabTicketsHandler.java index 59185420..54aa88a6 100644 --- a/gitlab-scm-handler/src/main/java/org/ndx/aadarchi/gitlab/GitLabTicketsHandler.java +++ b/gitlab-scm-handler/src/main/java/org/ndx/aadarchi/gitlab/GitLabTicketsHandler.java @@ -4,8 +4,8 @@ import java.util.Arrays; import java.util.Collection; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; import org.gitlab4j.api.GitLabApi; import org.gitlab4j.api.GitLabApiException; 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 330ad4c9..4035da6d 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 @@ -8,17 +8,17 @@ import java.util.logging.Logger; import java.util.stream.Collectors; -import javax.enterprise.context.ApplicationScoped; -import javax.enterprise.inject.Produces; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.enterprise.inject.Produces; +import jakarta.inject.Inject; +import jakarta.inject.Named; -import org.apache.deltaspike.core.api.config.ConfigProperty; 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; diff --git a/gitlab-scm-handler/src/main/java/org/ndx/aadarchi/gitlab/GitlabSCMHandler.java b/gitlab-scm-handler/src/main/java/org/ndx/aadarchi/gitlab/GitlabSCMHandler.java index 991e6334..5994fcea 100644 --- a/gitlab-scm-handler/src/main/java/org/ndx/aadarchi/gitlab/GitlabSCMHandler.java +++ b/gitlab-scm-handler/src/main/java/org/ndx/aadarchi/gitlab/GitlabSCMHandler.java @@ -3,9 +3,9 @@ import java.io.File; import java.io.IOException; -import javax.enterprise.inject.Instance; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.enterprise.inject.Instance; +import jakarta.inject.Inject; +import jakarta.inject.Named; import org.apache.commons.vfs2.FileObject; import org.apache.commons.vfs2.FileSystemException; 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 21aedb62..ebb317ca 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,6 +1,6 @@ package org.ndx.aadarchi.gitlab.vfs; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.apache.commons.vfs2.FileObject; import org.apache.commons.vfs2.FileSystemException; @@ -8,7 +8,7 @@ import org.apache.commons.vfs2.FileSystemOptions; import org.apache.commons.vfs2.auth.StaticUserAuthenticator; import org.apache.commons.vfs2.impl.DefaultFileSystemConfigBuilder; -import org.apache.deltaspike.core.api.config.ConfigProperty; +import org.ndx.aadarchi.cdi.deltaspike.ConfigProperty; import org.ndx.aadarchi.gitlab.Constants; import org.ndx.aadarchi.vfs.gitlab.GitLabFileProvider; diff --git a/gitlab-scm-handler/src/test/java/org/ndx/aadarchi/gitlab/vfs/GitLabFileSystemProviderTest.java b/gitlab-scm-handler/src/test/java/org/ndx/aadarchi/gitlab/vfs/GitLabFileSystemProviderTest.java index dd461c47..94c758a8 100644 --- a/gitlab-scm-handler/src/test/java/org/ndx/aadarchi/gitlab/vfs/GitLabFileSystemProviderTest.java +++ b/gitlab-scm-handler/src/test/java/org/ndx/aadarchi/gitlab/vfs/GitLabFileSystemProviderTest.java @@ -1,6 +1,6 @@ package org.ndx.aadarchi.gitlab.vfs; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.apache.commons.vfs2.FileObject; import org.apache.commons.vfs2.FileSystemException; diff --git a/maven-metadata-inferer/src/main/java/org/ndx/aadarchi/inferer/maven/MavenDetailsInfererEnhancer.java b/maven-metadata-inferer/src/main/java/org/ndx/aadarchi/inferer/maven/MavenDetailsInfererEnhancer.java index 82046705..6e816d8a 100644 --- a/maven-metadata-inferer/src/main/java/org/ndx/aadarchi/inferer/maven/MavenDetailsInfererEnhancer.java +++ b/maven-metadata-inferer/src/main/java/org/ndx/aadarchi/inferer/maven/MavenDetailsInfererEnhancer.java @@ -6,9 +6,9 @@ import java.util.logging.Logger; import java.util.stream.Collectors; -import javax.enterprise.context.ApplicationScoped; -import javax.enterprise.inject.Default; -import javax.inject.Inject; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.enterprise.inject.Default; +import jakarta.inject.Inject; import org.ndx.aadarchi.base.ModelEnhancer; import org.ndx.aadarchi.base.OutputBuilder; diff --git a/maven-metadata-inferer/src/main/java/org/ndx/aadarchi/inferer/maven/MavenPomDecorator.java b/maven-metadata-inferer/src/main/java/org/ndx/aadarchi/inferer/maven/MavenPomDecorator.java index 8b7f8f46..ef92e151 100644 --- a/maven-metadata-inferer/src/main/java/org/ndx/aadarchi/inferer/maven/MavenPomDecorator.java +++ b/maven-metadata-inferer/src/main/java/org/ndx/aadarchi/inferer/maven/MavenPomDecorator.java @@ -10,9 +10,9 @@ import java.util.stream.Collectors; import java.util.stream.Stream; -import javax.enterprise.context.ApplicationScoped; -import javax.enterprise.inject.Default; -import javax.inject.Inject; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.enterprise.inject.Default; +import jakarta.inject.Inject; import org.apache.commons.vfs2.FileObject; import org.apache.commons.vfs2.FileSystemException; diff --git a/maven-metadata-inferer/src/main/java/org/ndx/aadarchi/inferer/maven/MavenPomReader.java b/maven-metadata-inferer/src/main/java/org/ndx/aadarchi/inferer/maven/MavenPomReader.java index 4a61591c..ef3d6af2 100644 --- a/maven-metadata-inferer/src/main/java/org/ndx/aadarchi/inferer/maven/MavenPomReader.java +++ b/maven-metadata-inferer/src/main/java/org/ndx/aadarchi/inferer/maven/MavenPomReader.java @@ -8,10 +8,10 @@ import java.util.Optional; import java.util.logging.Logger; -import javax.enterprise.context.ApplicationScoped; -import javax.enterprise.inject.Default; -import javax.enterprise.inject.Instance; -import javax.inject.Inject; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.enterprise.inject.Default; +import jakarta.enterprise.inject.Instance; +import jakarta.inject.Inject; import org.apache.commons.io.FileUtils; import org.apache.commons.vfs2.AllFileSelector; @@ -21,7 +21,6 @@ import org.apache.commons.vfs2.FileSystemManager; import org.apache.commons.vfs2.PatternFileSelector; import org.apache.commons.vfs2.filter.NameFileFilter; -import org.apache.deltaspike.core.api.config.ConfigProperty; import org.apache.maven.model.io.xpp3.MavenXpp3Reader; import org.apache.maven.project.MavenProject; import org.codehaus.plexus.util.xml.pull.XmlPullParserException; @@ -30,6 +29,7 @@ import org.ndx.aadarchi.base.enhancers.scm.SCMHandler; import org.ndx.aadarchi.base.utils.FileContentCache; import org.ndx.aadarchi.base.utils.commonsvfs.FileObjectDetector; +import org.ndx.aadarchi.cdi.deltaspike.ConfigProperty; import com.pivovarit.function.ThrowingConsumer; import com.structurizr.model.Element; diff --git a/maven-metadata-inferer/src/main/java/org/ndx/aadarchi/inferer/maven/MavenTechnologiesDocumentationEnhancer.java b/maven-metadata-inferer/src/main/java/org/ndx/aadarchi/inferer/maven/MavenTechnologiesDocumentationEnhancer.java index cc1bdb40..c872b762 100644 --- a/maven-metadata-inferer/src/main/java/org/ndx/aadarchi/inferer/maven/MavenTechnologiesDocumentationEnhancer.java +++ b/maven-metadata-inferer/src/main/java/org/ndx/aadarchi/inferer/maven/MavenTechnologiesDocumentationEnhancer.java @@ -5,10 +5,10 @@ import java.util.Map.Entry; import java.util.stream.Collectors; -import javax.enterprise.context.ApplicationScoped; -import javax.enterprise.inject.Default; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.enterprise.inject.Default; +import jakarta.inject.Inject; +import jakarta.inject.Named; import org.ndx.aadarchi.base.AgileArchitectureSection; import org.ndx.aadarchi.base.OutputBuilder; diff --git a/maven-metadata-inferer/src/main/java/org/ndx/aadarchi/inferer/maven/technologies/MvnRepositoryArtifactsProducer.java b/maven-metadata-inferer/src/main/java/org/ndx/aadarchi/inferer/maven/technologies/MvnRepositoryArtifactsProducer.java index 354e031f..1892601d 100644 --- a/maven-metadata-inferer/src/main/java/org/ndx/aadarchi/inferer/maven/technologies/MvnRepositoryArtifactsProducer.java +++ b/maven-metadata-inferer/src/main/java/org/ndx/aadarchi/inferer/maven/technologies/MvnRepositoryArtifactsProducer.java @@ -9,14 +9,14 @@ import java.util.logging.Logger; import java.util.stream.Collectors; -import javax.enterprise.context.ApplicationScoped; -import javax.enterprise.inject.Produces; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.enterprise.inject.Produces; +import jakarta.inject.Inject; +import jakarta.inject.Named; import org.apache.commons.vfs2.FileObject; -import org.apache.deltaspike.core.api.config.ConfigProperty; import org.ndx.aadarchi.base.utils.FileContentCache; +import org.ndx.aadarchi.cdi.deltaspike.ConfigProperty; import com.fasterxml.jackson.core.exc.StreamReadException; import com.fasterxml.jackson.core.type.TypeReference; diff --git a/maven-metadata-inferer/src/main/java/org/ndx/aadarchi/inferer/maven/technologies/TechnologyDecorator.java b/maven-metadata-inferer/src/main/java/org/ndx/aadarchi/inferer/maven/technologies/TechnologyDecorator.java index 5afa0052..ece3c39a 100644 --- a/maven-metadata-inferer/src/main/java/org/ndx/aadarchi/inferer/maven/technologies/TechnologyDecorator.java +++ b/maven-metadata-inferer/src/main/java/org/ndx/aadarchi/inferer/maven/technologies/TechnologyDecorator.java @@ -14,10 +14,10 @@ import java.util.stream.Collectors; import java.util.stream.Stream; -import javax.enterprise.context.ApplicationScoped; -import javax.enterprise.inject.Default; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.enterprise.inject.Default; +import jakarta.inject.Inject; +import jakarta.inject.Named; import org.apache.maven.model.Dependency; import org.apache.maven.project.MavenProject; diff --git a/maven-metadata-inferer/src/test/java/org/ndx/aadarchi/inferer/maven/MavenDetailsInfererEnhancerTest.java b/maven-metadata-inferer/src/test/java/org/ndx/aadarchi/inferer/maven/MavenDetailsInfererEnhancerTest.java index 604e8069..0672b7de 100644 --- a/maven-metadata-inferer/src/test/java/org/ndx/aadarchi/inferer/maven/MavenDetailsInfererEnhancerTest.java +++ b/maven-metadata-inferer/src/test/java/org/ndx/aadarchi/inferer/maven/MavenDetailsInfererEnhancerTest.java @@ -2,11 +2,10 @@ import java.util.Arrays; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.apache.commons.vfs2.FileObject; import org.apache.commons.vfs2.FileSystemException; -import org.apache.deltaspike.core.api.config.ConfigProperty; import org.assertj.core.api.Assertions; import org.assertj.core.api.InstanceOfAssertFactories; import org.jboss.weld.junit5.EnableWeld; @@ -16,6 +15,7 @@ import org.ndx.aadarchi.base.ArchitectureEnhancer; import org.ndx.aadarchi.base.enhancers.ModelElementKeys; import org.ndx.aadarchi.base.enhancers.ModelElementKeys.ConfigProperties.BasePath; +import org.ndx.aadarchi.cdi.deltaspike.ConfigProperty; import com.structurizr.Workspace; import com.structurizr.model.Container; diff --git a/maven-metadata-inferer/src/test/java/org/ndx/aadarchi/inferer/maven/MavenPomDecoratorTest.java b/maven-metadata-inferer/src/test/java/org/ndx/aadarchi/inferer/maven/MavenPomDecoratorTest.java index 1c06a6c0..9b6d2a42 100644 --- a/maven-metadata-inferer/src/test/java/org/ndx/aadarchi/inferer/maven/MavenPomDecoratorTest.java +++ b/maven-metadata-inferer/src/test/java/org/ndx/aadarchi/inferer/maven/MavenPomDecoratorTest.java @@ -3,7 +3,7 @@ import java.io.File; import java.util.Arrays; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.apache.maven.project.MavenProject; import org.assertj.core.api.Assertions; diff --git a/maven-metadata-inferer/src/test/java/org/ndx/aadarchi/inferer/maven/MavenPomReaderTest.java b/maven-metadata-inferer/src/test/java/org/ndx/aadarchi/inferer/maven/MavenPomReaderTest.java index 001c8b37..54a8befc 100644 --- a/maven-metadata-inferer/src/test/java/org/ndx/aadarchi/inferer/maven/MavenPomReaderTest.java +++ b/maven-metadata-inferer/src/test/java/org/ndx/aadarchi/inferer/maven/MavenPomReaderTest.java @@ -2,13 +2,12 @@ import java.io.File; -import javax.enterprise.inject.Instance; -import javax.inject.Inject; +import jakarta.enterprise.inject.Instance; +import jakarta.inject.Inject; import org.apache.commons.vfs2.FileObject; import org.apache.commons.vfs2.FileSystemException; import org.apache.commons.vfs2.FileSystemManager; -import org.apache.deltaspike.core.api.config.ConfigProperty; import org.apache.maven.project.MavenProject; import org.assertj.core.api.Assertions; import org.jboss.weld.junit5.EnableWeld; @@ -18,6 +17,7 @@ import org.junit.jupiter.api.Test; import org.ndx.aadarchi.base.enhancers.ModelElementKeys; import org.ndx.aadarchi.base.enhancers.ModelElementKeys.ConfigProperties.BasePath; +import org.ndx.aadarchi.cdi.deltaspike.ConfigProperty; import com.structurizr.Workspace; diff --git a/maven-metadata-inferer/src/test/java/org/ndx/aadarchi/inferer/maven/MavenTechnologiesDocumentationEnhancerTest.java b/maven-metadata-inferer/src/test/java/org/ndx/aadarchi/inferer/maven/MavenTechnologiesDocumentationEnhancerTest.java index af0a1057..683f37c8 100644 --- a/maven-metadata-inferer/src/test/java/org/ndx/aadarchi/inferer/maven/MavenTechnologiesDocumentationEnhancerTest.java +++ b/maven-metadata-inferer/src/test/java/org/ndx/aadarchi/inferer/maven/MavenTechnologiesDocumentationEnhancerTest.java @@ -3,11 +3,10 @@ import java.util.Arrays; import java.util.Map; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.apache.commons.vfs2.FileObject; import org.apache.commons.vfs2.FileSystemException; -import org.apache.deltaspike.core.api.config.ConfigProperty; import org.assertj.core.api.Assertions; import org.assertj.core.api.InstanceOfAssertFactories; import org.jboss.weld.junit5.EnableWeld; @@ -18,6 +17,7 @@ import org.ndx.aadarchi.base.enhancers.ModelElementKeys; import org.ndx.aadarchi.base.enhancers.ModelElementKeys.ConfigProperties.BasePath; import org.ndx.aadarchi.base.utils.commonsvfs.FileObjectDetector; +import org.ndx.aadarchi.cdi.deltaspike.ConfigProperty; import org.ndx.aadarchi.inferer.maven.technologies.MvnRepositoryArtifactsProducer; import com.fasterxml.jackson.core.JsonProcessingException; diff --git a/maven-metadata-inferer/src/test/java/org/ndx/aadarchi/inferer/maven/technologies/MvnRepositoryArtifactsProducerTest.java b/maven-metadata-inferer/src/test/java/org/ndx/aadarchi/inferer/maven/technologies/MvnRepositoryArtifactsProducerTest.java index 0b39a900..b316c134 100644 --- a/maven-metadata-inferer/src/test/java/org/ndx/aadarchi/inferer/maven/technologies/MvnRepositoryArtifactsProducerTest.java +++ b/maven-metadata-inferer/src/test/java/org/ndx/aadarchi/inferer/maven/technologies/MvnRepositoryArtifactsProducerTest.java @@ -2,8 +2,8 @@ import java.util.Map; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.inject.Inject; +import jakarta.inject.Named; import org.assertj.core.api.Assertions; import org.jboss.weld.junit5.EnableWeld; diff --git a/model-linter/src/main/java/org/ndx/aadarchi/model/linter/ModelLinterEnhancer.java b/model-linter/src/main/java/org/ndx/aadarchi/model/linter/ModelLinterEnhancer.java index e196ae09..b2d91447 100644 --- a/model-linter/src/main/java/org/ndx/aadarchi/model/linter/ModelLinterEnhancer.java +++ b/model-linter/src/main/java/org/ndx/aadarchi/model/linter/ModelLinterEnhancer.java @@ -7,7 +7,7 @@ import org.ndx.aadarchi.base.OutputBuilder; import org.ndx.aadarchi.base.enhancers.ModelElementAdapter; -import javax.inject.Inject; +import jakarta.inject.Inject; public class ModelLinterEnhancer extends ModelElementAdapter { @Inject diff --git a/model-linter/src/test/java/org/ndx/aadarchi/model/linter/ModelLinterTest.java b/model-linter/src/test/java/org/ndx/aadarchi/model/linter/ModelLinterTest.java index c76c630b..d6822930 100644 --- a/model-linter/src/test/java/org/ndx/aadarchi/model/linter/ModelLinterTest.java +++ b/model-linter/src/test/java/org/ndx/aadarchi/model/linter/ModelLinterTest.java @@ -8,7 +8,7 @@ import org.jboss.weld.junit5.WeldSetup; import org.junit.jupiter.api.Test; -import javax.inject.Inject; +import jakarta.inject.Inject; import java.util.Optional; import java.util.Set; diff --git a/pom.xml b/pom.xml index d34457e0..cd8be024 100644 --- a/pom.xml +++ b/pom.xml @@ -124,11 +124,6 @@ commons-vfs2 2.9.0
- - org.apache.deltaspike.core - deltaspike-core-impl - 1.9.6 - org.eclipse.jgit org.eclipse.jgit @@ -147,7 +142,7 @@ org.jboss.weld.se weld-se-core - 3.1.4.Final + 5.1.2.Final org.kohsuke @@ -166,7 +161,7 @@ org.jboss.weld weld-junit5 - 2.0.2.Final + 4.0.2.Final test @@ -590,6 +585,7 @@ + git-scm-handler-helper github-scm-handler github-vfs