Skip to content

Commit

Permalink
发布时打包两个版本,正常版本和standalone版本,standalone版本会内嵌jsqlparser,避免因standalone各个…
Browse files Browse the repository at this point in the history
…版本不兼容导致的依赖问题。
  • Loading branch information
pagehelper committed Nov 19, 2023
1 parent ff87ede commit 1ae113e
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 40 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,6 @@ jobs:
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
run: mvn --batch-mode -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} -P release clean deploy
run: |
mvn --batch-mode -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} -P release clean deploy
mvn --batch-mode -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} -P standalone -P release clean deploy
89 changes: 50 additions & 39 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper</artifactId>
<version>6.0.0</version>
<version>${pagehelper-version}${version-suffix}</version>
<packaging>jar</packaging>

<name>pagehelper 6</name>
Expand Down Expand Up @@ -56,6 +56,9 @@
</scm>

<properties>
<pagehelper-version>6.0.1-SNAPSHOT</pagehelper-version>
<version-suffix></version-suffix>

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<argLine>-Dfile.encoding=UTF-8</argLine>
Expand Down Expand Up @@ -206,44 +209,6 @@
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.5.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<keepDependenciesWithProvidedScope>false</keepDependenciesWithProvidedScope>
<artifactSet>
<includes>
<include>com.github.jsqlparser:*</include>
</includes>
</artifactSet>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/MANIFEST.MF</exclude>
<exclude>META-INF/maven/**</exclude>
</excludes>
</filter>
</filters>
<relocations>
<relocation>
<pattern>net.sf.jsqlparser</pattern>
<shadedPattern>com.github.pagehelper.jsqlparser</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
Expand Down Expand Up @@ -353,5 +318,51 @@
</repository>
</distributionManagement>
</profile>
<profile>
<id>standalone</id>
<properties>
<version-suffix>-standalone</version-suffix>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.5.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<keepDependenciesWithProvidedScope>false</keepDependenciesWithProvidedScope>
<artifactSet>
<includes>
<include>com.github.jsqlparser:*</include>
</includes>
</artifactSet>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/MANIFEST.MF</exclude>
<exclude>META-INF/maven/**</exclude>
</excludes>
</filter>
</filters>
<relocations>
<relocation>
<pattern>net.sf.jsqlparser</pattern>
<shadedPattern>com.github.pagehelper.jsqlparser</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

0 comments on commit 1ae113e

Please sign in to comment.