summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManuel Bentele2021-12-17 16:58:17 +0100
committerManuel Bentele2021-12-17 16:58:17 +0100
commit3a168e3c0a98baba9951a9f5cd2eb6809fda04e2 (patch)
tree08236562c1e39eeb2f25409b36b87735d4066783
parentUpdate version of build dependencies (diff)
downloadmaster-sync-shared-3a168e3c0a98baba9951a9f5cd2eb6809fda04e2.tar.gz
master-sync-shared-3a168e3c0a98baba9951a9f5cd2eb6809fda04e2.tar.xz
master-sync-shared-3a168e3c0a98baba9951a9f5cd2eb6809fda04e2.zip
Add Maven profile to generate Thrift API
The Thrift API can be generated with the following command: mvn -P thrift:generate The generated output files are copied over the old files and can be modified before a manual commit takes place.
-rw-r--r--pom.xml38
1 files changed, 38 insertions, 0 deletions
diff --git a/pom.xml b/pom.xml
index 1b31e68..ed067a1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -12,6 +12,8 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <thrift.program>${basedir}/src/main/thrift/bwlp.thrift</thrift.program>
+ <thrift.outputDir>${basedir}/src/main/java</thrift.outputDir>
</properties>
<distributionManagement>
@@ -27,6 +29,42 @@
</snapshotRepository>
</distributionManagement>
+ <profiles>
+ <profile>
+ <id>thrift:generate</id>
+ <build>
+ <defaultGoal>validate</defaultGoal>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <version>3.0.0</version>
+ <executions>
+ <execution>
+ <id>thrift:gen</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <executable>thrift</executable>
+ <arguments>
+ <argument>--gen</argument>
+ <argument>java</argument>
+ <argument>-v</argument>
+ <argument>-out</argument>
+ <argument>${thrift.outputDir}</argument>
+ <argument>${thrift.program}</argument>
+ </arguments>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
<build>
<plugins>
<plugin>