updated documentation
This commit is contained in:
parent
a7480c3d85
commit
94825b9417
@ -129,7 +129,7 @@ Order does not matter. All include specifications are processed, followed by al
|
||||
|
||||
## Import
|
||||
|
||||
The `import` URL and artifact are to reference XML files that conform to the same `configuration` element as described here. In fact, the root elmenet of that XML should be `configuration`. It will only support the `includes` and `excludes` elements. so you cannot do recursive imports.
|
||||
The `import` file, URL, and artifact are to reference XML files that conform to the same `configuration` element as described here. In fact, the root elmenet of that XML should be `configuration`. It will only support the `includes` and `excludes` elements. so you cannot do recursive imports.
|
||||
|
||||
You can create a Maven `pom` packaging type project that deploys a configuration XML to your Maven repository. Then use an `import` to allow you to change banned dependencies without making changes to each individual project. Just like with the `version` notation in the `includes` and `excludes` elements, your `import` `artifact` element supports a version range. This way the latest banned dependencies can be side-loaded into all projects. This means previously functioning builds may eventually start failing. That is by design in this scenario.
|
||||
|
||||
@ -139,7 +139,7 @@ The `excludes` element is a way to provide project-by-project exceptions to impo
|
||||
|
||||
## Examples
|
||||
|
||||
The recommended us of this plugin is for its use across whole organizations. First, you will want a simple Maven project that is referenced by all other Maven projects. That simple project will declare the banned artifacts and potentially purge existing ones. See the `examples/ban-config` project for a full example.
|
||||
The recommended use of this plugin is for its use across whole organizations. First, you will want a simple Maven project that is referenced by all other Maven projects. That simple project will declare the banned artifacts and potentially purge existing ones. See the `examples/ban-config` project for a full example.
|
||||
|
||||
```xml
|
||||
<configuration>
|
||||
@ -159,7 +159,7 @@ Once you have that in place, you will want to add the following to every single
|
||||
<plugin>
|
||||
<groupId>com.inteligr8</groupId>
|
||||
<artifactId>ban-maven-plugin</artifactId>
|
||||
<version>1.3.6</version>
|
||||
<version>...</version>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<import>
|
||||
|
@ -15,11 +15,20 @@
|
||||
<name>Banned Artifact Configuration</name>
|
||||
|
||||
<build>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>.</directory>
|
||||
<includes>
|
||||
<include>*-config.xml</include>
|
||||
</includes>
|
||||
<targetPath>${project.build.directory}</targetPath>
|
||||
</resource>
|
||||
</resources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>com.inteligr8</groupId>
|
||||
<artifactId>ban-maven-plugin</artifactId>
|
||||
<version>1.3.6</version>
|
||||
<version>1.4.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>purge-maven-repo</id>
|
||||
@ -33,6 +42,43 @@
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>filter</id>
|
||||
<goals><goal>resources</goal></goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-install-plugin</artifactId>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
<file>${project.build.directory}/ban-config.xml</file>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>install-xml</id>
|
||||
<phase>install</phase>
|
||||
<goals><goal>install-file</goal></goals>
|
||||
<configuration>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>${project.artifactId}</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<packaging>xml</packaging>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
<configuration>
|
||||
<file>ban-config.xml</file>
|
||||
<pomFile>pom.xml</pomFile>
|
||||
<packaging>xml</packaging>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
<plugin>
|
||||
<groupId>com.inteligr8</groupId>
|
||||
<artifactId>ban-maven-plugin</artifactId>
|
||||
<version>1.3.6</version>
|
||||
<version>1.4.0</version>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<import>
|
||||
|
Loading…
x
Reference in New Issue
Block a user