Skip to content

Commit 0ed48e6

Browse files
committed
fix(Release): Adding source and javadoc
1 parent 16896ff commit 0ed48e6

File tree

3 files changed

+31
-3
lines changed

3 files changed

+31
-3
lines changed

Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ timeout(60) {
3939

4040
stage('Deploy') {
4141
if (git.isProductionBranch()) {
42-
sh "./mvnw -Prelease package source:jar gpg:sign install:install deploy:deploy"
42+
sh "GPG_TTY=\$(tty) ./mvnw -Prelease package source:jar gpg:sign install:install deploy:deploy"
4343
} else {
4444
sh "./mvnw deploy"
4545
}

Jenkinsfile_release

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ timeout(20) {
2929

3030
stage('Start Release') {
3131
echo "releaseVersion: ${releaseVersion}"
32-
sh "GPG_TTY=\$(tty) ./mvnw gitflow:release -DreleaseVersion=${releaseVersion} -DdevelopmentVersion=${developmentVersion} -DskipITs=true "
32+
sh "./mvnw -B gitflow:release-start gitflow:release-finish -DreleaseVersion=${releaseVersion} -DdevelopmentVersion=${developmentVersion} -DskipITs=true "
3333
}
3434
} catch (e) {
3535
mail subject: "${env.JOB_NAME} (${env.BUILD_NUMBER}): Error on build", to: '[email protected]', body: "Please go to ${env.BUILD_URL}."

pom.xml

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,35 @@
189189
</configuration>
190190
</plugin>
191191

192-
<!-- -->
192+
<!-- Attach Javadoc and source -->
193+
<plugin>
194+
<groupId>org.apache.maven.plugins</groupId>
195+
<artifactId>maven-javadoc-plugin</artifactId>
196+
<version>${maven-javadoc-plugin.version}</version>
197+
<executions>
198+
<execution>
199+
<id>attach-javadocs</id>
200+
<goals>
201+
<goal>jar</goal>
202+
</goals>
203+
</execution>
204+
</executions>
205+
</plugin>
206+
<plugin>
207+
<groupId>org.apache.maven.plugins</groupId>
208+
<artifactId>maven-source-plugin</artifactId>
209+
<version>${maven-source-plugin.version}</version>
210+
<executions>
211+
<execution>
212+
<id>attach-sources</id>
213+
<goals>
214+
<goal>jar</goal>
215+
</goals>
216+
</execution>
217+
</executions>
218+
</plugin>
219+
220+
<!-- Snyk -->
193221

194222
<plugin>
195223
<groupId>io.snyk</groupId>

0 commit comments

Comments
 (0)