Compare commits
34 Commits
Author | SHA1 | Date | |
---|---|---|---|
ef530a546d | |||
2c6a1c99e0 | |||
1577bbf2d8 | |||
988326a8d5 | |||
80068ef209 | |||
034b319172 | |||
65009df10b | |||
0edac4fc37 | |||
f837e5d1c0 | |||
08498d4224 | |||
1c7997d85c | |||
9874ed9543 | |||
eeb7a84698 | |||
4c1c4d412d | |||
fc5e0c6bd1 | |||
d41d73fa1c | |||
a9aa47d412 | |||
cfb13f3170 | |||
75f8175a1c | |||
58eb0ec013 | |||
dec181aa71 | |||
b6c7323203 | |||
9644bbe154 | |||
118b40f3f9 | |||
db3061a3a6 | |||
f991975923 | |||
e4f14a81da | |||
f749926f92 | |||
8c3ce9f069 | |||
cf2fdf42fa | |||
3d7d8bb769 | |||
01768754f0 | |||
e241137209 | |||
ff2a8b89e5 |
17
pom.xml
17
pom.xml
@@ -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>
|
||||||
|
@@ -52,20 +52,20 @@ import com.inteligr8.maven.model.ArtifactFilter;
|
|||||||
* The specification is as follows:
|
* The specification is as follows:
|
||||||
*
|
*
|
||||||
* ```xml
|
* ```xml
|
||||||
* <configuration>
|
* <configuration>
|
||||||
* <import>
|
* <import>
|
||||||
* <file>relative/path/file.xml</file>
|
* <file>relative/path/file.xml</file>
|
||||||
* <url>https://host.domain/path/file.xml</url>
|
* <url>https://host.domain/path/file.xml</url>
|
||||||
* <artifact>domain.host:artifact-id:[1.0,)</artifact>
|
* <artifact>domain.host:artifact-id:[1.0,)</artifact>
|
||||||
* </import>
|
* </import>
|
||||||
* <includes>
|
* <includes>
|
||||||
* <artifact>log4j:log4j</artifact>
|
* <artifact>log4j:log4j</artifact>
|
||||||
* <artifact>org.apache.logging:log4j-impl:[,2.16.1)</artifact>
|
* <artifact>org.apache.logging:log4j-impl:[,2.16.1)</artifact>
|
||||||
* </includes>
|
* </includes>
|
||||||
* <excludes>
|
* <excludes>
|
||||||
* <artifact>...</artifact>
|
* <artifact>...</artifact>
|
||||||
* </excludes>
|
* </excludes>
|
||||||
* </configuration>
|
* </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);
|
||||||
|
@@ -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
|
||||||
|
Reference in New Issue
Block a user