Skip to content

Commit

Permalink
build: download thrift faster (#329)
Browse files Browse the repository at this point in the history
Co-authored-by: Yuqing Zhu <[email protected]>
  • Loading branch information
aqni and zhuyuqing authored May 10, 2024
1 parent fdbffaa commit ed919ee
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
3 changes: 1 addition & 2 deletions assembly/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,8 @@
<plugin>
<groupId>com.googlecode.maven-download-plugin</groupId>
<artifactId>download-maven-plugin</artifactId>
<version>1.8.1</version>
<version>1.9.0</version>
<configuration>
<cacheDirectory>${project.build.directory}/download</cacheDirectory>
<unpack>true</unpack>
<url>https://dlcdn.apache.org/zookeeper/zookeeper-${zookeeper.version}/apache-zookeeper-${zookeeper.version}-bin.tar.gz</url>
</configuration>
Expand Down
20 changes: 18 additions & 2 deletions thrift/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
<plugin>
<groupId>com.googlecode.maven-download-plugin</groupId>
<artifactId>download-maven-plugin</artifactId>
<version>1.3.0</version>
<version>1.9.0</version>
<executions>
<execution>
<id>get-thrift-executable</id>
Expand All @@ -177,6 +177,19 @@
<url>${thrift.download-url}</url>
<outputDirectory>${project.build.directory}/tools</outputDirectory>
<outputFileName>${thrift.executable}</outputFileName>
<failOnError>false</failOnError>
</configuration>
</execution>
<execution>
<id>get-thrift-executable-fallback</id>
<goals>
<goal>wget</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<url>${thrift.fallback-url}</url>
<outputDirectory>${project.build.directory}/tools</outputDirectory>
<outputFileName>${thrift.executable}</outputFileName>
</configuration>
</execution>
</executions>
Expand Down Expand Up @@ -244,10 +257,11 @@
</os>
</activation>
<properties>
<thrift.download-url>http://archive.apache.org/dist/thrift/${thrift.version}/thrift-${thrift.version}.exe</thrift.download-url>
<thrift.download-url>https://github.com/IGinX-THU/IGinX-resources/raw/main/resources/thrift_0.16.0_win.exe</thrift.download-url>
<thrift.exec-cmd.args>"Do nothing"</thrift.exec-cmd.args>
<thrift.exec-cmd.executable>echo</thrift.exec-cmd.executable>
<thrift.executable>thrift-${thrift.version}-win-x86_64.exe</thrift.executable>
<thrift.fallback-url>http://archive.apache.org/dist/thrift/${thrift.version}/thrift-${thrift.version}.exe</thrift.fallback-url>
<thrift.skip-making-executable>true</thrift.skip-making-executable>
</properties>
</profile>
Expand All @@ -264,6 +278,7 @@
<thrift.exec-cmd.args>+x ${project.build.directory}/tools/${thrift.executable}</thrift.exec-cmd.args>
<thrift.exec-cmd.executable>chmod</thrift.exec-cmd.executable>
<thrift.executable>thrift_0.16.0_linux.exe</thrift.executable>
<thrift.fallback-url>${thrift.download-url}</thrift.fallback-url>
<thrift.skip-making-executable>false</thrift.skip-making-executable>
</properties>
</profile>
Expand All @@ -279,6 +294,7 @@
<thrift.exec-cmd.args>+x ${project.build.directory}/tools/${thrift.executable}</thrift.exec-cmd.args>
<thrift.exec-cmd.executable>chmod</thrift.exec-cmd.executable>
<thrift.executable>thrift_0.16.0_mac.exe</thrift.executable>
<thrift.fallback-url>${thrift.download-url}</thrift.fallback-url>
<thrift.skip-making-executable>false</thrift.skip-making-executable>
</properties>
</profile>
Expand Down

0 comments on commit ed919ee

Please sign in to comment.