aboutsummaryrefslogtreecommitdiffstats
path: root/enforcer-rule/src/site/apt/examples
diff options
context:
space:
mode:
Diffstat (limited to 'enforcer-rule/src/site/apt/examples')
-rwxr-xr-xenforcer-rule/src/site/apt/examples/backward-compatibility.apt.vm361
-rwxr-xr-xenforcer-rule/src/site/apt/examples/semantic-versioning-conformance.apt.vm300
2 files changed, 0 insertions, 661 deletions
diff --git a/enforcer-rule/src/site/apt/examples/backward-compatibility.apt.vm b/enforcer-rule/src/site/apt/examples/backward-compatibility.apt.vm
deleted file mode 100755
index 41faf0b..0000000
--- a/enforcer-rule/src/site/apt/examples/backward-compatibility.apt.vm
+++ /dev/null
@@ -1,361 +0,0 @@
-#*
- * This software is licensed under the Apache 2 license, quoted below.
- *
- * Copyright 2010 Julien Eluard
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * [http://www.apache.org/licenses/LICENSE-2.0]
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- *#
-
-Checking a project's compatibility against older releases
-
-* Basic example
-
- In order to check your project's compatibility against an older release, you must add the enforcer rule as a dependency to
- the maven-enforcer-plugin and then configure your the maven-enforcer-plugin to run the rule. Rule will succeed if specified compatibility type is compatible with specified one (less permissive compatibility types will be accepted).
-
- By default current artifact will be checked against most recently released version (retrieved from either local or one of configured remote repositories). Setting dumpDetails to true will output differences to standard output.
-
----
-<project>
- ...
- <build>
- ...
- <plugins>
- ...
- <plugin>
- <artifactId>maven-enforcer-plugin</artifactId>
- <version>1.0-beta-1</version>
- ...
- <dependencies>
- ...
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>${project.artifactId}</artifactId>
- <version>${project.version}</version>
- </dependency>
- ...
- </dependencies>
- ...
- <executions>
- ....
- <execution>
- <id>check-version</id>
- <phase>verify</phase>
- <goals>
- <goal>enforce</goal>
- </goals>
- <configuration>
- <rules>
- <requireBackwardCompatibility implementation="org.semver.enforcer.RequireBackwardCompatibility">
- <compatibilityType>BACKWARD_COMPATIBLE_IMPLEMENTER</compatibilityType>
- <dumpDetails>true</dumpDetails>
- </requireBackwardCompatibility>
- </rules>
- </configuration>
- </execution>
- ...
- </executions>
- ...
- </plugin>
- ...
- </plugins>
- ...
- </build>
- ...
-</project>
----
-
-* Checking against a specific released version
-
- You can check your project against a specific released version:
-
----
-<project>
- ...
- <build>
- ...
- <plugins>
- ...
- <plugin>
- <artifactId>maven-enforcer-plugin</artifactId>
- <version>1.0-beta-1</version>
- ...
- <dependencies>
- ...
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>${project.artifactId}</artifactId>
- <version>${project.version}</version>
- </dependency>
- ...
- </dependencies>
- ...
- <executions>
- ....
- <execution>
- <id>check-version</id>
- <phase>verify</phase>
- <goals>
- <goal>enforce</goal>
- </goals>
- <configuration>
- <rules>
- <requireBackwardCompatibility implementation="org.semver.enforcer.RequireBackwardCompatibility">
- ...
- <compatibilityType>BACKWARD_COMPATIBLE_IMPLEMENTER</compatibilityType>
- <previousVersion>1.0.0</previousVersion>
- ...
- </requireBackwardCompatibility>
- </rules>
- </configuration>
- </execution>
- ...
- </executions>
- ...
- </plugin>
- ...
- </plugins>
- ...
- </build>
- ...
-</project>
----
-
-* Including classes
-
- By default all classes will be considered during checking process. You might want to only check a subset of classes/packages. This is achieved by specifying <<<includes>>>.
-
----
-<project>
- ...
- <build>
- ...
- <plugins>
- ...
- <plugin>
- <artifactId>maven-enforcer-plugin</artifactId>
- <version>1.0-beta-1</version>
- ...
- <dependencies>
- ...
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>${project.artifactId}</artifactId>
- <version>${project.version}</version>
- </dependency>
- ...
- </dependencies>
- ...
- <executions>
- ....
- <execution>
- <id>check-version</id>
- <phase>verify</phase>
- <goals>
- <goal>enforce</goal>
- </goals>
- <configuration>
- <rules>
- <requireBackwardCompatibility implementation="org.semver.enforcer.RequireBackwardCompatibility">
- ...
- <compatibilityType>BACKWARD_COMPATIBLE_IMPLEMENTER</compatibilityType>
- <includes>
- <include>org.project.MyClass</include>
- </includes>
- ...
- </requireBackwardCompatibility>
- </rules>
- </configuration>
- </execution>
- ...
- </executions>
- ...
- </plugin>
- ...
- </plugins>
- ...
- </build>
- ...
-</project>
----
-
- We can specify multiple <includes> classes or packages. For example, to include <<<org.project.MyClass>>> class and <<<org.project.internal>>> package you would use a configuration like:
-
----
-<project>
- ...
- <build>
- ...
- <plugins>
- ...
- <plugin>
- <artifactId>maven-enforcer-plugin</artifactId>
- <version>1.0-beta-1</version>
- ...
- <dependencies>
- ...
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>${project.artifactId}</artifactId>
- <version>${project.version}</version>
- </dependency>
- ...
- </dependencies>
- ...
- <executions>
- ....
- <execution>
- <id>check-version</id>
- <phase>verify</phase>
- <goals>
- <goal>enforce</goal>
- </goals>
- <configuration>
- <rules>
- <requireBackwardCompatibility implementation="org.semver.enforcer.RequireBackwardCompatibility">
- ...
- <compatibilityType>BACKWARD_COMPATIBLE_IMPLEMENTER</compatibilityType>
- <includes>
- <include>org.project.MyClass</include>
- <include>org.project.internal</include>
- </includes>
- ...
- </requireBackwardCompatibility>
- </rules>
- </configuration>
- </execution>
- ...
- </executions>
- ...
- </plugin>
- ...
- </plugins>
- ...
- </build>
- ...
-</project>
----
-
-* Excluding classes
-
- You may also want to exclude some classes/packages. For instance internal code might evolve independently from published API. This is achieved by specifying <<<excludes>>>.
-
----
-<project>
- ...
- <build>
- ...
- <plugins>
- ...
- <plugin>
- <artifactId>maven-enforcer-plugin</artifactId>
- <version>1.0-beta-1</version>
- ...
- <dependencies>
- ...
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>${project.artifactId}</artifactId>
- <version>${project.version}</version>
- </dependency>
- ...
- </dependencies>
- ...
- <executions>
- ....
- <execution>
- <id>check-version</id>
- <phase>verify</phase>
- <goals>
- <goal>enforce</goal>
- </goals>
- <configuration>
- <rules>
- <requireBackwardCompatibility implementation="org.semver.enforcer.RequireBackwardCompatibility">
- ...
- <compatibilityType>BACKWARD_COMPATIBLE_IMPLEMENTER</compatibilityType>
- <excludes>
- <exclude>org.project.MyClass</exclude>
- </excludes>
- ...
- </requireBackwardCompatibility>
- </rules>
- </configuration>
- </execution>
- ...
- </executions>
- ...
- </plugin>
- ...
- </plugins>
- ...
- </build>
- ...
-</project>
----
-* Strict checking against a specific released version
-
- You can stricly check your project (backward compatibility type MUST match specified one) against a specific released version:
-
----
-<project>
- ...
- <build>
- ...
- <plugins>
- ...
- <plugin>
- <artifactId>maven-enforcer-plugin</artifactId>
- <version>1.0-beta-1</version>
- ...
- <dependencies>
- ...
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>${project.artifactId}</artifactId>
- <version>${project.version}</version>
- </dependency>
- ...
- </dependencies>
- ...
- <executions>
- ....
- <execution>
- <id>check-version</id>
- <phase>verify</phase>
- <goals>
- <goal>enforce</goal>
- </goals>
- <configuration>
- <rules>
- <requireBackwardCompatibility implementation="org.semver.enforcer.RequireBackwardCompatibility">
- ...
- <compatibilityType>NON_BACKWARD_COMPATIBLE</compatibilityType>
- <strictChecking>true</strictChecking>
- <previousVersion>1.0.0</previousVersion>
- ...
- </requireBackwardCompatibility>
- </rules>
- </configuration>
- </execution>
- ...
- </executions>
- ...
- </plugin>
- ...
- </plugins>
- ...
- </build>
- ...
-</project>
---- \ No newline at end of file
diff --git a/enforcer-rule/src/site/apt/examples/semantic-versioning-conformance.apt.vm b/enforcer-rule/src/site/apt/examples/semantic-versioning-conformance.apt.vm
deleted file mode 100755
index 0f7bf82..0000000
--- a/enforcer-rule/src/site/apt/examples/semantic-versioning-conformance.apt.vm
+++ /dev/null
@@ -1,300 +0,0 @@
-#*
- * This software is licensed under the Apache 2 license, quoted below.
- *
- * Copyright 2010 Julien Eluard
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * [http://www.apache.org/licenses/LICENSE-2.0]
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- *#
-
-Checking a project's version against older releases
-
-* Basic example
-
- In order to check your project's version against an older release, you must add the enforcer rule as a dependency to
- the maven-enforcer-plugin and then configure your the maven-enforcer-plugin to run the rule.
-
- By default current artifact will be checked against most recently released version (retrieved from either local or one of configured remote repositories). Setting dumpDetails to true will output differences to standard output.
-
----
-<project>
- ...
- <build>
- ...
- <plugins>
- ...
- <plugin>
- <artifactId>maven-enforcer-plugin</artifactId>
- <version>1.0-beta-1</version>
- ...
- <dependencies>
- ...
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>${project.artifactId}</artifactId>
- <version>${project.version}</version>
- </dependency>
- ...
- </dependencies>
- ...
- <executions>
- ....
- <execution>
- <id>check-version</id>
- <phase>verify</phase>
- <goals>
- <goal>enforce</goal>
- </goals>
- <configuration>
- <rules>
- <requireSemanticVersioningConformance implementation="org.semver.enforcer.RequireSemanticVersioningConformance">
- <dumpDetails>true</dumpDetails>
- </requireSemanticVersioningConformance>
- </rules>
- </configuration>
- </execution>
- ...
- </executions>
- ...
- </plugin>
- ...
- </plugins>
- ...
- </build>
- ...
-</project>
----
-
-* Checking against a specific released version
-
- You can check your project against a specific released version:
-
----
-<project>
- ...
- <build>
- ...
- <plugins>
- ...
- <plugin>
- <artifactId>maven-enforcer-plugin</artifactId>
- <version>1.0-beta-1</version>
- ...
- <dependencies>
- ...
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>${project.artifactId}</artifactId>
- <version>${project.version}</version>
- </dependency>
- ...
- </dependencies>
- ...
- <executions>
- ....
- <execution>
- <id>check-version</id>
- <phase>verify</phase>
- <goals>
- <goal>enforce</goal>
- </goals>
- <configuration>
- <rules>
- <requireSemanticVersioningConformance implementation="org.semver.enforcer.RequireSemanticVersioningConformance">
- ...
- <previousVersion>1.0.0</previousVersion>
- ...
- </requireSemanticVersioningConformance>
- </rules>
- </configuration>
- </execution>
- ...
- </executions>
- ...
- </plugin>
- ...
- </plugins>
- ...
- </build>
- ...
-</project>
----
-
-* Including classes
-
- By default all classes will be considered during checking process. You might want to only check a subset of classes/packages. This is achieved by specifying <<<includes>>>.
-
----
-<project>
- ...
- <build>
- ...
- <plugins>
- ...
- <plugin>
- <artifactId>maven-enforcer-plugin</artifactId>
- <version>1.0-beta-1</version>
- ...
- <dependencies>
- ...
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>${project.artifactId}</artifactId>
- <version>${project.version}</version>
- </dependency>
- ...
- </dependencies>
- ...
- <executions>
- ....
- <execution>
- <id>check-version</id>
- <phase>verify</phase>
- <goals>
- <goal>enforce</goal>
- </goals>
- <configuration>
- <rules>
- <requireSemanticVersioningConformance implementation="org.semver.enforcer.RequireSemanticVersioningConformance">
- ...
- <includes>
- <include>org.project.MyClass</include>
- </includes>
- ...
- </requireSemanticVersioningConformance>
- </rules>
- </configuration>
- </execution>
- ...
- </executions>
- ...
- </plugin>
- ...
- </plugins>
- ...
- </build>
- ...
-</project>
----
-
- We can specify multiple <includes> classes or packages. For example, to include <<<org.project.MyClass>>> class and <<<org.project.internal>>> package you would use a configuration like:
-
----
-<project>
- ...
- <build>
- ...
- <plugins>
- ...
- <plugin>
- <artifactId>maven-enforcer-plugin</artifactId>
- <version>1.0-beta-1</version>
- ...
- <dependencies>
- ...
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>${project.artifactId}</artifactId>
- <version>${project.version}</version>
- </dependency>
- ...
- </dependencies>
- ...
- <executions>
- ....
- <execution>
- <id>check-version</id>
- <phase>verify</phase>
- <goals>
- <goal>enforce</goal>
- </goals>
- <configuration>
- <rules>
- <requireSemanticVersioningConformance implementation="org.semver.enforcer.RequireSemanticVersioningConformance">
- ...
- <includes>
- <include>org.project.MyClass</include>
- <include>org.project.internal</include>
- </includes>
- ...
- </requireSemanticVersioningConformance>
- </rules>
- </configuration>
- </execution>
- ...
- </executions>
- ...
- </plugin>
- ...
- </plugins>
- ...
- </build>
- ...
-</project>
----
-
-* Excluding classes
-
- You may also want to exclude some classes/packages. For instance internal code might evolve independently from published API. This is achieved by specifying <<<excludes>>>.
-
----
-<project>
- ...
- <build>
- ...
- <plugins>
- ...
- <plugin>
- <artifactId>maven-enforcer-plugin</artifactId>
- <version>1.0-beta-1</version>
- ...
- <dependencies>
- ...
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>${project.artifactId}</artifactId>
- <version>${project.version}</version>
- </dependency>
- ...
- </dependencies>
- ...
- <executions>
- ....
- <execution>
- <id>check-version</id>
- <phase>verify</phase>
- <goals>
- <goal>enforce</goal>
- </goals>
- <configuration>
- <rules>
- <requireSemanticVersioningConformance implementation="org.semver.enforcer.RequireSemanticVersioningConformance">
- ...
- <excludes>
- <exclude>org.project.MyClass</exclude>
- </excludes>
- ...
- </requireSemanticVersioningConformance>
- </rules>
- </configuration>
- </execution>
- ...
- </executions>
- ...
- </plugin>
- ...
- </plugins>
- ...
- </build>
- ...
-</project>
----