34 Commits

Author SHA1 Message Date
ef530a546d v1.4.2 pom 2025-08-11 12:15:41 -04:00
2c6a1c99e0 Merge branch 'develop' into stable 2025-08-11 12:15:21 -04:00
1577bbf2d8 v1.4.1 pom 2025-05-27 09:45:52 -04:00
988326a8d5 Merge branch 'develop' into stable 2025-05-27 09:44:44 -04:00
80068ef209 Merge branch 'develop' into stable 2025-03-26 11:01:04 -04:00
034b319172 v1.3.6 pom 2024-08-21 15:39:43 -04:00
65009df10b Merge branch 'develop' into stable 2024-08-21 15:39:27 -04:00
0edac4fc37 v1.3.5 pom 2023-08-21 15:33:12 -04:00
f837e5d1c0 Merge branch 'develop' into stable 2023-08-21 15:32:38 -04:00
08498d4224 v1.3.4 pom 2023-08-20 16:56:20 -04:00
1c7997d85c Merge branch 'develop' into stable 2023-08-20 16:56:04 -04:00
9874ed9543 v1.3.3 pom 2023-08-20 15:03:10 -04:00
eeb7a84698 Merge branch 'develop' into stable 2023-08-20 15:02:58 -04:00
4c1c4d412d v1.3.2 pom 2023-08-20 13:34:37 -04:00
fc5e0c6bd1 Merge branch 'develop' into stable 2023-08-20 13:32:59 -04:00
d41d73fa1c v1.3.1 pom 2023-08-20 12:59:23 -04:00
a9aa47d412 Merge branch 'develop' into stable 2023-08-20 12:58:55 -04:00
cfb13f3170 v1.3.0 pom 2023-08-20 12:04:15 -04:00
75f8175a1c Merge branch 'develop' into stable 2023-08-20 12:03:52 -04:00
58eb0ec013 v1.2.4 pom 2023-08-20 11:35:52 -04:00
dec181aa71 Merge branch 'develop' into stable 2023-08-20 11:35:29 -04:00
b6c7323203 v1.2.3 pom 2023-08-16 12:38:18 -04:00
9644bbe154 Merge branch 'develop' into stable 2023-08-16 12:37:38 -04:00
118b40f3f9 v1.2.2 pom 2023-06-30 12:42:52 -04:00
db3061a3a6 Merge branch 'develop' into stable 2023-06-30 12:42:25 -04:00
f991975923 v1.2.1 pom 2023-05-30 09:37:29 -04:00
e4f14a81da Merge branch 'develop' into stable 2023-05-30 09:36:26 -04:00
f749926f92 v1.2.0 pom 2023-05-29 11:13:11 -04:00
8c3ce9f069 Merge branch 'develop' into stable 2023-05-29 11:11:02 -04:00
cf2fdf42fa v1.1.1 pom 2023-05-25 15:24:41 -04:00
3d7d8bb769 Merge branch 'develop' into stable 2023-05-25 15:24:08 -04:00
01768754f0 v1.1.0 pom 2023-05-25 13:22:00 -04:00
e241137209 Merge branch 'develop' into stable 2023-05-25 13:19:36 -04:00
ff2a8b89e5 v1.0.0 pom 2023-05-25 08:56:24 -04:00
3 changed files with 26 additions and 30 deletions

17
pom.xml
View File

@@ -7,7 +7,7 @@
<groupId>com.inteligr8</groupId> <groupId>com.inteligr8</groupId>
<artifactId>ban-maven-plugin</artifactId> <artifactId>ban-maven-plugin</artifactId>
<version>1.4-SNAPSHOT</version> <version>1.4.2</version>
<packaging>maven-plugin</packaging> <packaging>maven-plugin</packaging>
<name>Ban Artifacts Maven Plugin</name> <name>Ban Artifacts Maven Plugin</name>
@@ -43,19 +43,18 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target> <maven.compiler.target>1.8</maven.compiler.target>
<maven.version>3.9.11</maven.version> <maven.version>3.9.9</maven.version>
</properties> </properties>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.apache.commons</groupId> <groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId> <artifactId>commons-lang3</artifactId>
<version>3.19.0</version> <version>3.17.0</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.maven.shared</groupId> <groupId>org.apache.maven.shared</groupId>
<artifactId>file-management</artifactId> <artifactId>file-management</artifactId>
<!-- v3.2+ appears to require maven v4+ -->
<version>3.1.0</version> <version>3.1.0</version>
</dependency> </dependency>
<dependency> <dependency>
@@ -91,7 +90,7 @@
<dependency> <dependency>
<groupId>org.junit.jupiter</groupId> <groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId> <artifactId>junit-jupiter-api</artifactId>
<version>5.14.0</version> <version>5.12.0</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
</dependencies> </dependencies>
@@ -105,16 +104,12 @@
</plugin> </plugin>
<plugin> <plugin>
<artifactId>maven-invoker-plugin</artifactId> <artifactId>maven-invoker-plugin</artifactId>
<version>3.9.1</version> <version>3.9.0</version>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.12.0</version>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.eclipse.sisu</groupId> <groupId>org.eclipse.sisu</groupId>
<artifactId>sisu-maven-plugin</artifactId> <artifactId>sisu-maven-plugin</artifactId>
<version>0.9.0.M4</version> <version>0.9.0.M2</version>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.codehaus.plexus</groupId> <groupId>org.codehaus.plexus</groupId>

View File

@@ -52,20 +52,20 @@ import com.inteligr8.maven.model.ArtifactFilter;
* The specification is as follows: * The specification is as follows:
* *
* ```xml * ```xml
* &lt;configuration&gt; * <configuration>
* &lt;import&gt; * <import>
* &lt;file&gt;relative/path/file.xml&lt;/file&gt; * <file>relative/path/file.xml</file>
* &lt;url&gt;https://host.domain/path/file.xml&lt;/url&gt; * <url>https://host.domain/path/file.xml</url>
* &lt;artifact&gt;domain.host:artifact-id:[1.0,)&lt;/artifact&gt; * <artifact>domain.host:artifact-id:[1.0,)</artifact>
* &lt;/import&gt; * </import>
* &lt;includes&gt; * <includes>
* &lt;artifact&gt;log4j:log4j&lt;/artifact&gt; * <artifact>log4j:log4j</artifact>
* &lt;artifact&gt;org.apache.logging:log4j-impl:[,2.16.1)&lt;/artifact&gt; * <artifact>org.apache.logging:log4j-impl:[,2.16.1)</artifact>
* &lt;/includes&gt; * </includes>
* &lt;excludes&gt; * <excludes>
* &lt;artifact&gt;...&lt;/artifact&gt; * <artifact>...</artifact>
* &lt;/excludes&gt; * </excludes>
* &lt;/configuration&gt; * </configuration>
* ``` * ```
* *
* The imports are recursively processed under the same specification. The * The imports are recursively processed under the same specification. The
@@ -156,10 +156,11 @@ public abstract class AbstractBanConfiguration implements BanConfiguration {
this.logger.debug("The latest artifact was found: {}", latestArtifact); this.logger.debug("The latest artifact was found: {}", latestArtifact);
File file = latestArtifact.getFile(); File file = latestArtifact.getFile();
return new BanConfigurationDownloader(this.session, this.artifactResolver, this.versionRangeResolver, file); return new BanConfigurationDownloader(this.session, this.artifactResolver, this.versionRangeResolver, file);
} else { } else if (artifact != null) {
this.logger.debug("Using the raw artifact: {}", artifact);
File file = artifact.getFile(); File file = artifact.getFile();
return new BanConfigurationDownloader(this.session, this.artifactResolver, this.versionRangeResolver, file); return new BanConfigurationDownloader(this.session, this.artifactResolver, this.versionRangeResolver, file);
} else {
return null;
} }
} }
@@ -188,7 +189,7 @@ public abstract class AbstractBanConfiguration implements BanConfiguration {
try { try {
VersionRangeResult vrresult = this.versionRangeResolver.resolveVersionRange(this.session.getRepositorySession(), vrrequest); VersionRangeResult vrresult = this.versionRangeResolver.resolveVersionRange(this.session.getRepositorySession(), vrrequest);
if (vrresult.getVersions().isEmpty()) { if (vrresult.getVersions().isEmpty()) {
this.logger.debug("The artifact version range could not be resolved: {}", logId); this.logger.info("The artifact version range could not be resolved: {}", logId);
return null; return null;
} else { } else {
this.logger.debug("The artifact version discovered: {}: {}", vrresult.getHighestVersion(), logId); this.logger.debug("The artifact version discovered: {}: {}", vrresult.getHighestVersion(), logId);

View File

@@ -33,7 +33,6 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import javax.inject.Inject; import javax.inject.Inject;
import javax.inject.Singleton;
import org.apache.maven.artifact.versioning.ArtifactVersion; import org.apache.maven.artifact.versioning.ArtifactVersion;
import org.apache.maven.artifact.versioning.DefaultArtifactVersion; import org.apache.maven.artifact.versioning.DefaultArtifactVersion;
@@ -47,6 +46,7 @@ import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.project.MavenProject; import org.apache.maven.project.MavenProject;
import org.codehaus.plexus.component.annotations.Component;
import org.eclipse.aether.impl.ArtifactResolver; import org.eclipse.aether.impl.ArtifactResolver;
import org.eclipse.aether.impl.VersionRangeResolver; import org.eclipse.aether.impl.VersionRangeResolver;
@@ -58,7 +58,7 @@ import com.inteligr8.maven.model.ArtifactFilter;
defaultPhase = LifecyclePhase.CLEAN, defaultPhase = LifecyclePhase.CLEAN,
requiresProject = false requiresProject = false
) )
@Singleton @Component( role = org.apache.maven.plugin.Mojo.class )
public class PurgeRepoMojo extends AbstractMojo { public class PurgeRepoMojo extends AbstractMojo {
@Inject @Inject