Skip to content

Commit

Permalink
build: init mustache specs as part of normal build
Browse files Browse the repository at this point in the history
  • Loading branch information
edgar-espina-wpp committed Mar 3, 2024
1 parent 2f65787 commit 5ba0ea0
Showing 1 changed file with 44 additions and 32 deletions.
76 changes: 44 additions & 32 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>

Expand Down Expand Up @@ -274,7 +274,48 @@
</profile>

<profile>
<id>git-hooks</id>
<id>mustache-specs</id>
<activation>
<file>
<missing>${mustache-specs}</missing>
</file>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<phase>initialize</phase>
<id>mustache-specs</id>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>git</executable>
<arguments>
<argument>submodule</argument>
<argument>update</argument>
<argument>--init</argument>
<argument>--recursive</argument>
</arguments>
<successCodes>
<successCode>0</successCode>
<!-- git submodule fails in child projects, just ignore the error and continue -->
<successCode>1</successCode>
</successCodes>
</configuration>
</plugin>
</plugins>
</build>
</profile>

<profile>
<id>spotless-hook</id>
<activation>
<file>
<exists>${pre-commit-hook}</exists>
Expand Down Expand Up @@ -328,36 +369,6 @@
<id>sonatype</id>
<build>
<plugins>
<!-- This is a workaround to get submodules working with the maven release plugin -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<phase>initialize</phase>
<id>invoke build</id>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>git</executable>
<arguments>
<argument>submodule</argument>
<argument>update</argument>
<argument>--init</argument>
<argument>--recursive</argument>
</arguments>
<successCodes>
<successCode>0</successCode>
<!-- git submodule fails in child projects, just ignore the error and continue -->
<successCode>1</successCode>
</successCodes>
</configuration>
</plugin>

<!-- Source -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -423,5 +434,6 @@
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<pre-commit-hook>src${file.separator}etc${file.separator}formatter.sh</pre-commit-hook>
<mustache-specs>handlebars${file.separator}src${file.separator}test${file.separator}resources${file.separator}mustache</mustache-specs>
</properties>
</project>

0 comments on commit 5ba0ea0

Please sign in to comment.