Skip to content

Commit 1a132b1

Browse files
author
TheSnoozer
committed
workaround issue that the maven release plugin does not clone submodules (SCM 530)
1 parent 8fd6178 commit 1a132b1

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

pom.xml

+37
Original file line numberDiff line numberDiff line change
@@ -373,5 +373,42 @@
373373
</plugins>
374374
</build>
375375
</profile>
376+
<profile>
377+
<id>clone-git-submodules</id>
378+
<activation>
379+
<file>
380+
<missing>${basedir}/src/test/resources/README.md</missing>
381+
</file>
382+
</activation>
383+
<build>
384+
<plugins>
385+
<!-- https://sumit-jha.medium.com/how-to-make-maven-release-plugin-work-with-git-submodules-917825a253f2 -->
386+
<plugin>
387+
<groupId>org.codehaus.mojo</groupId>
388+
<artifactId>exec-maven-plugin</artifactId>
389+
<version>1.3</version>
390+
<inherited>false</inherited>
391+
<executions>
392+
<execution>
393+
<id>clone git submodule</id>
394+
<phase>initialize</phase>
395+
<configuration>
396+
<executable>git</executable>
397+
<arguments>
398+
<argument>submodule</argument>
399+
<argument>update</argument>
400+
<argument>--init</argument>
401+
<argument>--recursive</argument>
402+
</arguments>
403+
</configuration>
404+
<goals>
405+
<goal>exec</goal>
406+
</goals>
407+
</execution>
408+
</executions>
409+
</plugin>
410+
</plugins>
411+
</build>
412+
</profile>
376413
</profiles>
377414
</project>

0 commit comments

Comments
 (0)