Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add profiles #778

Merged
merged 4 commits into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
- name: Build with Maven
run: mvn --batch-mode deploy -DskipTests -Prelease
run: mvn --batch-mode deploy -DskipTests -Prelease,8-release
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
Expand All @@ -61,7 +61,7 @@ jobs:
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
- name: Build with Maven
run: mvn --batch-mode deploy -DskipTests -Prelease
run: mvn --batch-mode deploy -DskipTests -Prelease,17-release
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
- name: Build with Maven
run: mvn --batch-mode deploy -DskipTests -Psnapshot
run: mvn --batch-mode deploy -DskipTests -Pdefault,snapshot,8-snapshot
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
Expand All @@ -62,7 +62,7 @@ jobs:
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
- name: Build with Maven
run: mvn --batch-mode deploy -DskipTests -Psnapshot
run: mvn --batch-mode deploy -DskipTests -Pdefault,snapshot,17-snapshot
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
Expand Down
2 changes: 1 addition & 1 deletion conf/javax.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@

"targetArtifactId": "sofa-ark-springboot-starter",

"targetVersion": "2.2.4-SNAPSHOT-jdk17-jakarta"
"targetVersion": "2.2.4-jdk17-jakarta-SNAPSHOT"
}]
}
100 changes: 89 additions & 11 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@
<properties>
<!-- JDK 17 打包如下:
1. 切换到JDK 17
2. 修改 sofa.ark.version.default 和 conf/javax.json 中的 "数字" 版本号 (conf/javax.json 只修改数字版本号)
3. (包上传到开源仓库后不需要此步骤)释放 sofa-ark-parent/support/ark-springboot-integration/ark-springboot-starter/pom.xml 插件中的mvn 插件注释
4. 开始打包,将所有打出的包都上传,其中包含了 -jakarta 后缀的包-->
2. 修改 sofa.ark.version.default 和 conf/javax.json 中的 targetVersion 版本号 (conf/javax.json)
3. 开始打包,将所有打出的包都上传,其中包含了 -jakarta 后缀的包-->
<sofa.ark.version.default>2.2.4</sofa.ark.version.default>
<project.encoding>UTF-8</project.encoding>
<java.version>1.8</java.version>
Expand Down Expand Up @@ -215,26 +214,81 @@
</execution>
</executions>
</plugin>

<!-- 将依赖的 javax -> jakarta 工具插件
构建完毕以后,target 下会有对应的 jakarta 包, 打包的信息都配置在 根目录/conf/javax.json 中
https://github.com/sofastack/sofa-jakarta-transformer
目前此jar包尚未上传到外部仓库,打包构建时需将如下插件的注释释放
-->
<plugin>
<groupId>com.alipay.sofa</groupId>
<artifactId>jakarta-transformer-maven-plugin</artifactId>
<version>0.6.0-sofa-SNAPSHOT</version>
<configuration>
<rules>
<pom>conf/javax.json</pom>
</rules>
</configuration>
<executions>
<execution>
<id>jakarta-test</id>
<phase>package</phase>
<goals>
<goal>jakarta</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>


<profiles>
<!--
jdk17 打出来的 snapshot 版本
sofa-ark的包 2.2.4-jdk17-SNAPSHOT
-->
<profile>
<id>17-snapshot</id>
<properties>
<sofa.ark.version>${sofa.ark.version.default}-jdk17-SNAPSHOT</sofa.ark.version>
</properties>
</profile>
<!--
jdk17 打出来的 release 版本
sofa-ark的包 2.2.4-jdk17
-->
<profile>
<id>jakarta</id>
<id>17-release</id>
<properties>
<sofa.ark.version>${sofa.ark.version.default}-jdk17</sofa.ark.version>
</properties>
<activation>
<jdk>17</jdk>
</activation>
</profile>

<!--
jdk8 打出来的 snapshot 版本
sofa-ark 的包 2.2.4-SNAPSHOT
-->
<profile>
<id>release</id>
<id>8-snapshot</id>
<properties>
<sofa.ark.version>${sofa.ark.version.default}-SNAPSHOT</sofa.ark.version>
</properties>
</profile>

<!--
jdk8 打出来的 release 版本
sofa-ark的包 2.2.4
-->
<profile>
<id>8-release</id>
<properties>
<sofa.ark.version>${sofa.ark.version.default}</sofa.ark.version>
</properties>
</profile>

<profile>
<id>release</id>
<build>
<plugins>
<plugin>
Expand Down Expand Up @@ -276,13 +330,19 @@
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
<pluginRepositories>
<pluginRepository>
<snapshots>
<enabled>true</enabled>
</snapshots>
<id>maven-snapshot</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</pluginRepository>
</pluginRepositories>
</profile>

<profile>
<id>snapshot</id>
<properties>
<sofa.ark.version>${sofa.ark.version.default}</sofa.ark.version>
</properties>
<build>
<plugins>
<plugin>
Expand Down Expand Up @@ -324,6 +384,24 @@
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>
<repositories>
<repository>
<snapshots>
<enabled>true</enabled>
</snapshots>
<id>maven-snapshot</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<snapshots>
<enabled>true</enabled>
</snapshots>
<id>maven-snapshot</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</pluginRepository>
</pluginRepositories>
</profile>

<profile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,29 +152,6 @@
</dependency>
</dependencies>
</plugin>
<!-- 将依赖的 javax -> jakarta 工具插件-->
<!-- 构建完毕以后,target 下会有对应的 jakarta 包, 打包的信息都配置在 根目录/conf/javax.json 中-->
<!-- https://github.com/sofastack/sofa-jakarta-transformer-->
<!-- 目前此jar包尚未上传到外部仓库,打包构建时需将如下插件的注释释放-->
<!-- <plugin>
<groupId>org.eclipse.transformer</groupId>
<artifactId>jakarta-transformer-maven-plugin</artifactId>
<version>0.6.0-sofa-SNAPSHOT</version>
<configuration>
<rules>
<pom>conf/javax.json</pom>
</rules>
</configuration>
<executions>
<execution>
<id>jakarta-test</id>
<phase>package</phase>
<goals>
<goal>jakarta</goal>
</goals>
</execution>
</executions>
</plugin>-->
</plugins>
</build>

Expand Down