Skip to content

Commit c2cd107

Browse files
authored
chore: package the executable jar by the command "mvn clean package -Dmaven.test.skip=true -Pjar" (#111)
1 parent 5193044 commit c2cd107

File tree

6 files changed

+64
-3
lines changed

6 files changed

+64
-3
lines changed

.github/workflows/maven-publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ jobs:
2828
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
2929

3030
- name: Build with Maven
31-
run: mvn -B -ntp clean package -DskipTests=true -Pjar
31+
run: mvn -B -ntp clean package -DskipTests=true -Pjar-trip
3232

3333
- name: Publish to Apache Maven Central
34-
run: mvn deploy -DskipTests=true -Pjar
34+
run: mvn deploy -DskipTests=true -Pjar-trip
3535
env:
3636
MAVEN_USERNAME: ${{ secrets.MAVEN_OSSRH_USERNAME }}
3737
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_OSSRH_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ code-coverage/
55
!.mvn/wrapper/maven-wrapper.jar
66
!**/src/main/**/target/
77
!**/src/test/**/target/
8+
arex-storage-jar
89

910
### STS ###
1011
.apt_generated

arex-storage-config/pom.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,17 @@
5454
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
5555
</properties>
5656

57+
<profiles>
58+
<profile>
59+
<build>
60+
<finalName>${artifactId}</finalName>
61+
</build>
62+
<id>jar</id>
63+
<properties>
64+
<packagingType>jar</packagingType>
65+
</properties>
66+
</profile>
67+
</profiles>
68+
5769

5870
</project>

arex-storage-model/pom.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,16 @@
1010
<version>1.0.40</version>
1111
</parent>
1212

13+
<profiles>
14+
<profile>
15+
<build>
16+
<finalName>${artifactId}</finalName>
17+
</build>
18+
<id>jar</id>
19+
<properties>
20+
<packagingType>jar</packagingType>
21+
</properties>
22+
</profile>
23+
</profiles>
24+
1325
</project>

arex-storage-web-api/pom.xml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,4 +122,40 @@
122122
<version>1.0.40</version>
123123
</parent>
124124

125+
<profiles>
126+
<profile>
127+
<build>
128+
<finalName>${artifactId}</finalName>
129+
<plugins>
130+
<plugin>
131+
<artifactId>maven-compiler-plugin</artifactId>
132+
<groupId>org.apache.maven.plugins</groupId>
133+
</plugin>
134+
<plugin>
135+
<version>${spring.boot.version}</version>
136+
<artifactId>spring-boot-maven-plugin</artifactId>
137+
<configuration>
138+
<includeSystemScope>true</includeSystemScope>
139+
<mainClass>com.arextest.storage.web.boot.WebSpringBootServletInitializer</mainClass>
140+
<outputDirectory>../arex-storage-jar</outputDirectory>
141+
</configuration>
142+
<executions>
143+
<execution>
144+
<goals>
145+
<goal>repackage</goal>
146+
</goals>
147+
<phase>package</phase>
148+
</execution>
149+
</executions>
150+
<groupId>org.springframework.boot</groupId>
151+
</plugin>
152+
</plugins>
153+
</build>
154+
<id>jar</id>
155+
<properties>
156+
<packagingType>jar</packagingType>
157+
</properties>
158+
</profile>
159+
</profiles>
160+
125161
</project>

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@
308308
</resource>
309309
</resources>
310310
</build>
311-
<id>jar</id>
311+
<id>jar-trip</id>
312312
<properties>
313313
<packagingType>jar</packagingType>
314314
<releases.repo>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/

0 commit comments

Comments
 (0)