Commit 2076b4f 1 parent 089dc49 commit 2076b4f Copy full SHA for 2076b4f
File tree 3 files changed +28
-12
lines changed
3 files changed +28
-12
lines changed Original file line number Diff line number Diff line change 37
37
server-id : ' github-package'
38
38
39
39
- name : Publish to GitHub Packages Apache Maven
40
- run : mvn --batch-mode deploy
40
+ run : mvn deploy --batch-mode -Pdeploy-github
41
41
env :
42
42
GITHUB_MAVEN_URL : https://maven.pkg.github.com/${{github.repository}}
43
43
GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
Original file line number Diff line number Diff line change @@ -3,17 +3,18 @@ pipeline {
3
3
stages {
4
4
stage(' Build' ) {
5
5
tools {
6
- jdk " jdk17"
6
+ jdk " jdk21"
7
+ maven " apache-maven-3.9.9"
7
8
}
8
9
steps {
9
- sh ' mvn -DmavenLocalDistDir=${MAVEN_DIR} deploy '
10
+ sh ' mvn deploy --batch-mode -Pdeploy-local '
10
11
}
11
12
}
12
13
}
13
14
14
15
post {
15
16
always {
16
- archiveArtifacts artifacts : ' target/*.jar' , fingerprint : true
17
+ archiveArtifacts artifacts : ' target/ecore- *.jar' , fingerprint : true
17
18
cleanWs()
18
19
}
19
20
}
Original file line number Diff line number Diff line change 13
13
<maven .compiler.target>21</maven .compiler.target>
14
14
<project .build.sourceEncoding>UTF-8</project .build.sourceEncoding>
15
15
<project .reporting.outputEncoding>UTF-8</project .reporting.outputEncoding>
16
+ <github .package.url>${env.GITHUB_MAVEN_URL} </github .package.url>
17
+ <maven .local.dir>${env.MAVEN_DIR} </maven .local.dir>
16
18
</properties >
17
19
18
20
<repositories >
116
118
</resource >
117
119
</resources >
118
120
</build >
119
-
120
- <distributionManagement >
121
- <repository >
122
- <id >github-package</id >
123
- <url >${env.GITHUB_MAVEN_URL} </url >
124
- <!-- refer to .github/workflows/maven-publish-ghpkg.yml -->
125
- </repository >
126
- </distributionManagement >
121
+ <profiles >
122
+ <profile >
123
+ <id >deploy-github</id >
124
+ <distributionManagement >
125
+ <repository >
126
+ <id >github-package</id >
127
+ <url >${github.package.url} </url >
128
+ <!-- refer to .github/workflows/github-publishpackage.yml -->
129
+ </repository >
130
+ </distributionManagement >
131
+ </profile >
132
+ <profile >
133
+ <id >deploy-local</id >
134
+ <distributionManagement >
135
+ <repository >
136
+ <id >laven-local</id >
137
+ <url >file://${maven.local.dir} </url >
138
+ </repository >
139
+ </distributionManagement >
140
+ </profile >
141
+ </profiles >
127
142
</project >
You can’t perform that action at this time.
0 commit comments