Skip to content

Commit

Permalink
feat(thrift): auto update pysession
Browse files Browse the repository at this point in the history
  • Loading branch information
aqni committed Sep 14, 2024
1 parent e7559b4 commit ceaa872
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 138 deletions.
3 changes: 1 addition & 2 deletions dataSource/filestore/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@
<id>thrift-generation</id>
<activation>
<file>
<exists>src/main/thrift</exists>
<missing>target/generated-sources/thrift</missing>
</file>
</activation>
<properties>
Expand Down Expand Up @@ -208,7 +208,6 @@
<plugin>
<groupId>org.apache.thrift</groupId>
<artifactId>thrift-maven-plugin</artifactId>
<version>0.10.0</version>
<configuration>
<thriftExecutable>${thrift.exec.absolute.path}</thriftExecutable>
</configuration>
Expand Down
5 changes: 5 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,11 @@
<artifactId>maven-assembly-plugin</artifactId>
<version>3.7.1</version>
</plugin>
<plugin>
<groupId>org.apache.thrift</groupId>
<artifactId>thrift-maven-plugin</artifactId>
<version>0.10.0</version>
</plugin>
<plugin>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
Expand Down
193 changes: 57 additions & 136 deletions thrift/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,104 +57,48 @@
<pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.thrift.tools</groupId>
<artifactId>maven-thrift-plugin</artifactId>
<versionRange>[0.1.10,)</versionRange>
<goals>
<goal>compile</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute>
<runOnIncremental>false</runOnIncremental>
</execute>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
<groupId>org.apache.thrift</groupId>
<artifactId>thrift-maven-plugin</artifactId>
<executions>
<execution>
<id>generate-thrift-sources-java</id>
<goals>
<goal>compile</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<generator>java</generator>
</configuration>
</execution>
<execution>
<id>generate-thrift-sources-python</id>
<goals>
<goal>compile</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<generator>py</generator>
<outputDirectory>${project.build.directory}/py</outputDirectory>
<includes>
<include>rpc.thrift</include>
</includes>
</configuration>
</execution>
<!-- <execution>-->
<!-- <id>generate-thrift-sources-go</id>-->
<!-- <phase>generate-sources</phase>-->
<!-- <goals>-->
<!-- <goal>compile</goal>-->
<!-- </goals>-->
<!-- <configuration>-->
<!-- <generator>go</generator>-->
<!-- <outputDirectory>${project.build.directory}/generated-sources/thrift</outputDirectory>-->
<!-- </configuration>-->
<!-- </execution>-->
</executions>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>8</source>
<target>8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.thrift.tools</groupId>
<artifactId>maven-thrift-plugin</artifactId>
<version>0.1.11</version>
<executions>
<execution>
<id>generate-thrift-sources-java</id>
<goals>
<goal>compile</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<generator>java</generator>
<outputDirectory>${project.build.directory}/generated-sources/thrift</outputDirectory>
</configuration>
</execution>
<execution>
<id>generate-thrift-sources-python</id>
<goals>
<goal>compile</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<generator>py</generator>
<outputDirectory>${project.build.directory}/generated-sources/py</outputDirectory>
</configuration>
</execution>
<!-- <execution>-->
<!-- <id>generate-thrift-sources-go</id>-->
<!-- <phase>generate-sources</phase>-->
<!-- <goals>-->
<!-- <goal>compile</goal>-->
<!-- </goals>-->
<!-- <configuration>-->
<!-- <generator>go</generator>-->
<!-- <outputDirectory>${project.build.directory}/generated-sources/thrift</outputDirectory>-->
<!-- </configuration>-->
<!-- </execution>-->
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>add-source</id>
<goals>
<goal>add-source</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<sources>
<source>${project.build.directory}/generated-sources/thrift</source>
<source>${project.build.directory}/generated-sources/py</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

<profiles>
Expand All @@ -171,7 +115,7 @@
<id>thrift-generation</id>
<activation>
<file>
<exists>src/main/proto</exists>
<missing>target/generated-sources/thrift</missing>
</file>
</activation>
<properties>
Expand Down Expand Up @@ -212,53 +156,30 @@
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<executions>
<execution>
<id>make-thrift-executable-executable</id>
<goals>
<goal>exec</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<skip>${thrift.skip-making-executable}</skip>
<executable>${thrift.exec-cmd.executable}</executable>
<commandlineArgs>${thrift.exec-cmd.args}</commandlineArgs>
</configuration>
</execution>
</executions>
<groupId>org.apache.thrift</groupId>
<artifactId>thrift-maven-plugin</artifactId>
<configuration>
<thriftExecutable>${thrift.exec.absolute.path}</thriftExecutable>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.thrift.tools</groupId>
<artifactId>maven-thrift-plugin</artifactId>
<version>0.1.11</version>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>generate-thrift-sources-java</id>
<goals>
<goal>compile</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<generator>java</generator>
<!-- <generator>py</generator>-->
<!-- <generator>go</generator>-->
<thriftExecutable>${thrift.exec.absolute.path}</thriftExecutable>
<thriftSourceRoot>src/main/proto</thriftSourceRoot>
</configuration>
</execution>
<execution>
<id>generate-thrift-sources-python</id>
<id>copy-py-thrift</id>
<goals>
<goal>compile</goal>
<goal>run</goal>
</goals>
<phase>generate-sources</phase>
<phase>package</phase>
<configuration>
<generator>py</generator>
<thriftExecutable>${thrift.exec.absolute.path}</thriftExecutable>
<thriftSourceRoot>src/main/proto</thriftSourceRoot>
<target>
<copy todir="../session_py/iginx/iginx_pyclient/thrift">
<fileset dir="target/py/iginx/thrift">
<include name="**/*"/>
</fileset>
</copy>
</target>
</configuration>
</execution>
</executions>
Expand Down
File renamed without changes.

0 comments on commit ceaa872

Please sign in to comment.