Skip to content

Commit 285ee44

Browse files
committed
Add enforcer rule to ban snapshots in dependencyManagement.
Closes #1687
1 parent ef3e86b commit 285ee44

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
@@ -274,10 +274,21 @@
274274
<exclude>org.springframework.data:*</exclude>
275275
</excludes>
276276
</requireReleaseDeps>
277+
<NoSnapshotDependenciesInDependencyManagementRule
278+
implementation="de.smartics.maven.enforcer.rule.NoSnapshotsInDependencyManagementRule">
279+
<onlyWhenRelease>true</onlyWhenRelease>
280+
</NoSnapshotDependenciesInDependencyManagementRule>
277281
</rules>
278282
</configuration>
279283
</execution>
280284
</executions>
285+
<dependencies>
286+
<dependency>
287+
<groupId>de.smartics.rules</groupId>
288+
<artifactId>smartics-enforcer-rules</artifactId>
289+
<version>1.0.2</version>
290+
</dependency>
291+
</dependencies>
281292
</plugin>
282293
</plugins>
283294
</build>
@@ -1063,7 +1074,7 @@
10631074
<plugin>
10641075
<groupId>org.apache.maven.plugins</groupId>
10651076
<artifactId>maven-enforcer-plugin</artifactId>
1066-
<version>3.0.0-M3</version>
1077+
<version>3.0.0</version>
10671078
</plugin>
10681079

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