Skip to content

Commit bc624a3

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

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
@@ -272,10 +272,21 @@
272272
<exclude>org.springframework.data:*</exclude>
273273
</excludes>
274274
</requireReleaseDeps>
275+
<NoSnapshotDependenciesInDependencyManagementRule
276+
implementation="de.smartics.maven.enforcer.rule.NoSnapshotsInDependencyManagementRule">
277+
<onlyWhenRelease>true</onlyWhenRelease>
278+
</NoSnapshotDependenciesInDependencyManagementRule>
275279
</rules>
276280
</configuration>
277281
</execution>
278282
</executions>
283+
<dependencies>
284+
<dependency>
285+
<groupId>de.smartics.rules</groupId>
286+
<artifactId>smartics-enforcer-rules</artifactId>
287+
<version>1.0.2</version>
288+
</dependency>
289+
</dependencies>
279290
</plugin>
280291
</plugins>
281292
</build>
@@ -1064,7 +1075,7 @@
10641075
<plugin>
10651076
<groupId>org.apache.maven.plugins</groupId>
10661077
<artifactId>maven-enforcer-plugin</artifactId>
1067-
<version>3.0.0-M3</version>
1078+
<version>3.0.0</version>
10681079
</plugin>
10691080

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