Skip to content

Commit

Permalink
[Java] Support maven release (#691)
Browse files Browse the repository at this point in the history
* add gpg plugin and release profile

* remove maven source/javadoc plugin by default to speed build

* add deploy_jars function
  • Loading branch information
chaokunyang authored Jul 18, 2023
1 parent 0712632 commit fab448c
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 21 deletions.
10 changes: 10 additions & 0 deletions ci/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,17 @@ bump_javascript_version() {
version=$1
cd "$ROOT/javascript"
echo "Set fury javascript version to $version"
pushd packages/fury
sed -i '' -E "s/\"version\": .*,/\"version\": \"$version\",/" package.json
popd
pushd packages/hps
sed -i '' -E "s/\"version\": .*,/\"version\": \"$version\",/" package.json
popd
}

deploy_jars() {
cd "$ROOT/java"
mvn -T10 clean deploy -DskipTests -Prelease
}

deploy_python() {
Expand Down
8 changes: 0 additions & 8 deletions java/fury-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,6 @@

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
Expand Down
13 changes: 0 additions & 13 deletions java/fury-format/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,19 +58,6 @@
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>releaseShade</id>
Expand Down
47 changes: 47 additions & 0 deletions java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,26 @@
<artifactId>maven-deploy-plugin</artifactId>
<version>2.7</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>sign-artifacts</id>
<goals>
<goal>sign</goal>
</goals>
<configuration>
<!-- Prevent `gpg` from using pinentry programs -->
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
<plugins>
Expand Down Expand Up @@ -327,4 +347,31 @@
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>release</id>
<activation>
<property>
<name>release</name>
<value>true</value>
</property>
</activation>
<properties>
<output.directory>${basedir}</output.directory>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

0 comments on commit fab448c

Please sign in to comment.