Skip to content

Commit d1d66ea

Browse files
committed
Do not run exec-maven-plugin on Windows
1 parent 05c9051 commit d1d66ea

File tree

1 file changed

+39
-27
lines changed

1 file changed

+39
-27
lines changed

pom.xml

Lines changed: 39 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -156,33 +156,6 @@
156156
<artifactId>maven-surefire-plugin</artifactId>
157157
<version>3.2.5</version>
158158
</plugin>
159-
<plugin>
160-
<!--
161-
We need this for updating the submodule during release. Maven SCM
162-
doesn't support this itself apparently. See
163-
https://github.com/apache/maven-scm/pull/179
164-
-->
165-
<groupId>org.codehaus.mojo</groupId>
166-
<artifactId>exec-maven-plugin</artifactId>
167-
<!--
168-
We are using 3.0.0 as 3.1.1 fails due to this issue:
169-
https://github.com/mojohaus/exec-maven-plugin/issues/373
170-
-->
171-
<version>3.0.0</version>
172-
<executions>
173-
<execution>
174-
<phase>initialize</phase>
175-
<id>invoke build</id>
176-
<goals>
177-
<goal>exec</goal>
178-
</goals>
179-
</execution>
180-
</executions>
181-
<configuration>
182-
<executable>git</executable>
183-
<commandlineArgs>submodule update --init --recursive</commandlineArgs>
184-
</configuration>
185-
</plugin>
186159
<plugin>
187160
<groupId>org.codehaus.mojo</groupId>
188161
<artifactId>versions-maven-plugin</artifactId>
@@ -231,6 +204,45 @@
231204
</plugins>
232205
</build>
233206
</profile>
207+
<profile>
208+
<id>not-windows</id>
209+
<!--
210+
Starting with 3.1.0, this fails on Windows. Given that we only
211+
technically need this when release and we don't release on Windows,
212+
we can just disable it on Widnows. See this issue:
213+
https://github.com/mojohaus/exec-maven-plugin/issues/373
214+
-->
215+
<activation>
216+
<os><family>!Windows</family></os>
217+
</activation>
218+
<build>
219+
<plugins>
220+
<plugin>
221+
<!--
222+
We need this for updating the submodule during release. Maven SCM
223+
doesn't support this itself apparently. See
224+
https://github.com/apache/maven-scm/pull/179
225+
-->
226+
<groupId>org.codehaus.mojo</groupId>
227+
<artifactId>exec-maven-plugin</artifactId>
228+
<version>3.2.0</version>
229+
<executions>
230+
<execution>
231+
<phase>initialize</phase>
232+
<id>invoke build</id>
233+
<goals>
234+
<goal>exec</goal>
235+
</goals>
236+
</execution>
237+
</executions>
238+
<configuration>
239+
<executable>git</executable>
240+
<commandlineArgs>submodule update --init --recursive</commandlineArgs>
241+
</configuration>
242+
</plugin>
243+
</plugins>
244+
</build>
245+
</profile>
234246
</profiles>
235247
<distributionManagement>
236248
<repository>

0 commit comments

Comments
 (0)