Skip to content

Commit fda361d

Browse files
committed
Add enforcer rule to ban snapshots in dependencyManagement.
Closes #1687
1 parent ac08185 commit fda361d

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
@@ -239,10 +239,21 @@
239239
<exclude>org.springframework.data:*</exclude>
240240
</excludes>
241241
</requireReleaseDeps>
242+
<NoSnapshotDependenciesInDependencyManagementRule
243+
implementation="de.smartics.maven.enforcer.rule.NoSnapshotsInDependencyManagementRule">
244+
<onlyWhenRelease>true</onlyWhenRelease>
245+
</NoSnapshotDependenciesInDependencyManagementRule>
242246
</rules>
243247
</configuration>
244248
</execution>
245249
</executions>
250+
<dependencies>
251+
<dependency>
252+
<groupId>de.smartics.rules</groupId>
253+
<artifactId>smartics-enforcer-rules</artifactId>
254+
<version>1.0.2</version>
255+
</dependency>
256+
</dependencies>
246257
</plugin>
247258
</plugins>
248259
</build>
@@ -1085,7 +1096,7 @@
10851096
<plugin>
10861097
<groupId>org.apache.maven.plugins</groupId>
10871098
<artifactId>maven-enforcer-plugin</artifactId>
1088-
<version>3.0.0-M3</version>
1099+
<version>3.0.0</version>
10891100
</plugin>
10901101

10911102
<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)