Skip to content

Commit 5a3e659

Browse files
committed
#304 - Added pre-release build profile to check for third-party snapshot dependencies.
1 parent f19b095 commit 5a3e659

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

Diff for: parent/pom.xml

+43
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,43 @@
145145

146146
</profile>
147147

148+
<!--
149+
Profile to be run before a release is executed, currently does the following:
150+
151+
- Prevents thrid-party snapshot dependencies in projects
152+
-->
153+
154+
<profile>
155+
<id>pre-release</id>
156+
<build>
157+
<plugins>
158+
<plugin>
159+
<groupId>org.apache.maven.plugins</groupId>
160+
<artifactId>maven-enforcer-plugin</artifactId>
161+
<executions>
162+
<execution>
163+
<id>enforce-no-third-party-snapshots</id>
164+
<goals>
165+
<goal>enforce</goal>
166+
</goals>
167+
<configuration>
168+
<rules>
169+
<requireReleaseDeps>
170+
<failWhenParentIsSnapshot>false</failWhenParentIsSnapshot>
171+
<excludes>
172+
<exclude>org.springframework.data.build:*</exclude>
173+
<exclude>org.springframework.data:*</exclude>
174+
</excludes>
175+
</requireReleaseDeps>
176+
</rules>
177+
</configuration>
178+
</execution>
179+
</executions>
180+
</plugin>
181+
</plugins>
182+
</build>
183+
</profile>
184+
148185
<profile>
149186

150187
<!-- Profile for SonarCube -->
@@ -739,6 +776,12 @@
739776
<version>1.0</version>
740777
</plugin>
741778

779+
<plugin>
780+
<groupId>org.apache.maven.plugins</groupId>
781+
<artifactId>maven-enforcer-plugin</artifactId>
782+
<version>1.3.1</version>
783+
</plugin>
784+
742785
</plugins>
743786

744787
</pluginManagement>

0 commit comments

Comments
 (0)