Skip to content

Commit 86f4e55

Browse files
committed
update github workflows
1 parent cacb13e commit 86f4e55

File tree

2 files changed

+54
-36
lines changed

2 files changed

+54
-36
lines changed

.github/workflows/maven-build.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,5 @@ jobs:
1818
java-version: '8'
1919
distribution: 'temurin'
2020
cache: maven
21-
- name: Install thrift
22-
run: |
23-
sudo apt-get update
24-
sudo apt-get install -y software-properties-common
25-
sudo add-apt-repository -y ppa:thrift/ppa
26-
sudo apt-get update
27-
sudo apt-get install -y thrift
2821
- name: Build with Maven
29-
run: mvn -B package --file pom.xml
22+
run: mvn -B package --file pom.xml -DskipThrift=true

example/example-adapter/example-adapter-thrift/pom.xml

Lines changed: 53 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -73,33 +73,58 @@
7373
<version>1.7.1</version>
7474
</extension>
7575
</extensions>
76-
<plugins>
77-
<plugin>
78-
<groupId>org.apache.thrift</groupId>
79-
<artifactId>thrift-maven-plugin</artifactId>
80-
<version>0.10.0</version>
81-
<configuration>
82-
<thriftExecutable>thrift</thriftExecutable>
83-
<thriftSourceRoot>${project.basedir}/src/main/thrift</thriftSourceRoot>
84-
<outputDirectory>${project.basedir}/src/main/java</outputDirectory>
85-
<generator>java</generator>
86-
87-
</configuration>
88-
<executions>
89-
<execution>
90-
<id>thrift-sources</id>
91-
<phase>generate-sources</phase>
92-
<goals>
93-
<goal>compile</goal>
94-
</goals>
95-
</execution>
96-
</executions>
97-
</plugin>
98-
<!-- Add Spring Boot Maven plugin -->
99-
<plugin>
100-
<groupId>org.springframework.boot</groupId>
101-
<artifactId>spring-boot-maven-plugin</artifactId>
102-
</plugin>
103-
</plugins>
10476
</build>
77+
78+
<profiles>
79+
<profile>
80+
<id>skip-thrift</id>
81+
<activation>
82+
<property>
83+
<name>skipThrift</name>
84+
<value>true</value>
85+
</property>
86+
</activation>
87+
<build>
88+
<plugins>
89+
<plugin>
90+
<groupId>org.apache.thrift</groupId>
91+
<artifactId>thrift-maven-plugin</artifactId>
92+
<version>0.10.0</version>
93+
<!-- no executions = skip -->
94+
</plugin>
95+
</plugins>
96+
</build>
97+
</profile>
98+
99+
<profile>
100+
<id>with-thrift</id>
101+
<activation>
102+
<activeByDefault>true</activeByDefault>
103+
</activation>
104+
<build>
105+
<plugins>
106+
<plugin>
107+
<groupId>org.apache.thrift</groupId>
108+
<artifactId>thrift-maven-plugin</artifactId>
109+
<version>0.10.0</version>
110+
<configuration>
111+
<thriftExecutable>thrift</thriftExecutable>
112+
<thriftSourceRoot>${project.basedir}/src/main/thrift</thriftSourceRoot>
113+
<outputDirectory>${project.basedir}/src/main/java</outputDirectory>
114+
<generator>java</generator>
115+
</configuration>
116+
<executions>
117+
<execution>
118+
<id>thrift-sources</id>
119+
<phase>generate-sources</phase>
120+
<goals>
121+
<goal>compile</goal>
122+
</goals>
123+
</execution>
124+
</executions>
125+
</plugin>
126+
</plugins>
127+
</build>
128+
</profile>
129+
</profiles>
105130
</project>

0 commit comments

Comments
 (0)