Skip to content

Commit 890bf2d

Browse files
committed
Add enforcer rule to ban snapshots in dependencyManagement.
Closes #1687
1 parent 23979dc commit 890bf2d

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

parent/pom.xml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,10 +273,21 @@
273273
<exclude>org.springframework.data:*</exclude>
274274
</excludes>
275275
</requireReleaseDeps>
276+
<NoSnapshotDependenciesInDependencyManagementRule
277+
implementation="de.smartics.maven.enforcer.rule.NoSnapshotsInDependencyManagementRule">
278+
<onlyWhenRelease>true</onlyWhenRelease>
279+
</NoSnapshotDependenciesInDependencyManagementRule>
276280
</rules>
277281
</configuration>
278282
</execution>
279283
</executions>
284+
<dependencies>
285+
<dependency>
286+
<groupId>de.smartics.rules</groupId>
287+
<artifactId>smartics-enforcer-rules</artifactId>
288+
<version>1.0.2</version>
289+
</dependency>
290+
</dependencies>
280291
</plugin>
281292
</plugins>
282293
</build>
@@ -1062,7 +1073,7 @@
10621073
<plugin>
10631074
<groupId>org.apache.maven.plugins</groupId>
10641075
<artifactId>maven-enforcer-plugin</artifactId>
1065-
<version>3.0.0-M3</version>
1076+
<version>3.0.0</version>
10661077
</plugin>
10671078

10681079
<plugin>

pom.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@
8383
<plugin>
8484
<groupId>org.apache.maven.plugins</groupId>
8585
<artifactId>maven-enforcer-plugin</artifactId>
86+
<version>3.0.0</version>
8687
<executions>
8788
<execution>
8889
<id>enforce-release-rules</id>
@@ -96,10 +97,20 @@
9697
</requireJavaVersion>
9798
<requireReleaseDeps />
9899
<requireReleaseVersion />
100+
<NoSnapshotDependenciesInDependencyManagementRule
101+
implementation="de.smartics.maven.enforcer.rule.NoSnapshotsInDependencyManagementRule">
102+
</NoSnapshotDependenciesInDependencyManagementRule>
99103
</rules>
100104
</configuration>
101105
</execution>
102106
</executions>
107+
<dependencies>
108+
<dependency>
109+
<groupId>de.smartics.rules</groupId>
110+
<artifactId>smartics-enforcer-rules</artifactId>
111+
<version>1.0.2</version>
112+
</dependency>
113+
</dependencies>
103114
</plugin>
104115

105116
</plugins>

0 commit comments

Comments
 (0)