Skip to content

Commit 81e5d0c

Browse files
fix/release profile added to root pom.xml
1 parent 8b7b33a commit 81e5d0c

File tree

2 files changed

+68
-58
lines changed

2 files changed

+68
-58
lines changed

RELEASE.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Release to OSSRH
22
Important mvn commands to release new SDK version to OSSRH.
33

4+
Profiles:
5+
- enable `release` profile to use plugins for sonatype, javadoc and gpg
6+
47
Run from root to update version in each pom.xml:
58
- `mvn versions:set -DnewVersion=XXX`
69

@@ -14,4 +17,5 @@ Manually Releasing the Deployment to the Central Repository:
1417
- `mvn nexus-staging:release`
1518

1619

20+
1721
Source: https://central.sonatype.org/publish/publish-maven/

pom.xml

Lines changed: 64 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -46,64 +46,70 @@
4646
<!-- <opentelemetry.version>1.28.0</opentelemetry.version>-->
4747
</properties>
4848

49-
<build>
50-
<plugins>
51-
<plugin>
52-
<groupId>org.sonatype.plugins</groupId>
53-
<artifactId>nexus-staging-maven-plugin</artifactId>
54-
<version>1.6.7</version>
55-
<extensions>true</extensions>
56-
<configuration>
57-
<serverId>ossrh</serverId>
58-
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
59-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
60-
</configuration>
61-
</plugin>
62-
<plugin>
63-
<groupId>org.apache.maven.plugins</groupId>
64-
<artifactId>maven-source-plugin</artifactId>
65-
<version>2.2.1</version>
66-
<executions>
67-
<execution>
68-
<id>attach-sources</id>
69-
<goals>
70-
<goal>jar-no-fork</goal>
71-
</goals>
72-
</execution>
73-
</executions>
74-
</plugin>
75-
<plugin>
76-
<groupId>org.apache.maven.plugins</groupId>
77-
<artifactId>maven-javadoc-plugin</artifactId>
78-
<version>2.9.1</version>
79-
<configuration>
80-
<sourcepath>src/main/java</sourcepath>
81-
</configuration>
82-
<executions>
83-
<execution>
84-
<id>attach-javadocs</id>
85-
<goals>
86-
<goal>jar</goal>
87-
</goals>
88-
</execution>
89-
</executions>
90-
</plugin>
91-
<plugin>
92-
<groupId>org.apache.maven.plugins</groupId>
93-
<artifactId>maven-gpg-plugin</artifactId>
94-
<version>1.5</version>
95-
<executions>
96-
<execution>
97-
<id>sign-artifacts</id>
98-
<phase>verify</phase>
99-
<goals>
100-
<goal>sign</goal>
101-
</goals>
102-
</execution>
103-
</executions>
104-
</plugin>
105-
</plugins>
106-
</build>
49+
<profiles>
50+
<profile>
51+
<id>release</id>
52+
<build>
53+
<plugins>
54+
<plugin>
55+
<groupId>org.sonatype.plugins</groupId>
56+
<artifactId>nexus-staging-maven-plugin</artifactId>
57+
<version>1.6.7</version>
58+
<extensions>true</extensions>
59+
<configuration>
60+
<serverId>ossrh</serverId>
61+
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
62+
<autoReleaseAfterClose>true</autoReleaseAfterClose>
63+
</configuration>
64+
</plugin>
65+
<plugin>
66+
<groupId>org.apache.maven.plugins</groupId>
67+
<artifactId>maven-source-plugin</artifactId>
68+
<version>2.2.1</version>
69+
<executions>
70+
<execution>
71+
<id>attach-sources</id>
72+
<goals>
73+
<goal>jar-no-fork</goal>
74+
</goals>
75+
</execution>
76+
</executions>
77+
</plugin>
78+
<plugin>
79+
<groupId>org.apache.maven.plugins</groupId>
80+
<artifactId>maven-javadoc-plugin</artifactId>
81+
<version>2.9.1</version>
82+
<configuration>
83+
<sourcepath>src/main/java</sourcepath>
84+
</configuration>
85+
<executions>
86+
<execution>
87+
<id>attach-javadocs</id>
88+
<goals>
89+
<goal>jar</goal>
90+
</goals>
91+
</execution>
92+
</executions>
93+
</plugin>
94+
<plugin>
95+
<groupId>org.apache.maven.plugins</groupId>
96+
<artifactId>maven-gpg-plugin</artifactId>
97+
<version>1.5</version>
98+
<executions>
99+
<execution>
100+
<id>sign-artifacts</id>
101+
<phase>verify</phase>
102+
<goals>
103+
<goal>sign</goal>
104+
</goals>
105+
</execution>
106+
</executions>
107+
</plugin>
108+
</plugins>
109+
</build>
110+
</profile>
111+
</profiles>
112+
107113

108114
<scm>
109115
<connection>scm:git:https://github.com/traceo-dev/traceo-java</connection>

0 commit comments

Comments
 (0)