|
83 | 83 | <maven.jar.plugin.version>3.4.2</maven.jar.plugin.version> |
84 | 84 | <maven.github.release.plugin.version>1.6.0</maven.github.release.plugin.version> |
85 | 85 | <project.build.outputTimestamp>2025-03-12T01:44:22Z</project.build.outputTimestamp> |
| 86 | + |
| 87 | + <!-- Default SCM Properties --> |
| 88 | + <scm.connection>scm:git:https://github.com/CycloneDX/cyclonedx-core-java.git</scm.connection> |
| 89 | + <scm.developerConnection>scm:git:https://github.com/CycloneDX/cyclonedx-core-java.git</scm.developerConnection> |
| 90 | + <scm.url>https://github.com/CycloneDX/cyclonedx-core-java.git</scm.url> |
86 | 91 | </properties> |
87 | 92 |
|
88 | 93 | <scm> |
89 | | - <connection>scm:git:https://github.com/CycloneDX/cyclonedx-core-java.git</connection> |
90 | | - <url>https://github.com/CycloneDX/cyclonedx-core-java.git</url> |
91 | | - <developerConnection>scm:git:https://github.com/CycloneDX/cyclonedx-core-java.git</developerConnection> |
| 94 | + <connection>${scm.connection}</connection> |
| 95 | + <developerConnection>${scm.developerConnection}</developerConnection> |
92 | 96 | <tag>HEAD</tag> |
| 97 | + <url>${scm.url}</url> |
93 | 98 | </scm> |
94 | 99 |
|
95 | 100 | <issueManagement> |
|
102 | 107 | <url>https://github.com/CycloneDX/cyclonedx-core-java/actions</url> |
103 | 108 | </ciManagement> |
104 | 109 |
|
105 | | - <distributionManagement> |
106 | | - <snapshotRepository> |
107 | | - <id>ossrh</id> |
108 | | - <url>https://oss.sonatype.org/content/repositories/snapshots</url> |
109 | | - </snapshotRepository> |
110 | | - <repository> |
111 | | - <id>ossrh</id> |
112 | | - <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url> |
113 | | - </repository> |
114 | | - </distributionManagement> |
115 | | - |
116 | | - <repositories> |
117 | | - <repository> |
118 | | - <id>maven-central</id> |
119 | | - <url>https://repo1.maven.org/maven2</url> |
120 | | - </repository> |
121 | | - <!-- Resolve snapshot releases --> |
122 | | - <repository> |
123 | | - <id>ossrh-snapshot</id> |
124 | | - <url>https://oss.sonatype.org/content/repositories/snapshots</url> |
125 | | - <snapshots> |
126 | | - <updatePolicy>always</updatePolicy> |
127 | | - <enabled>true</enabled> |
128 | | - </snapshots> |
129 | | - </repository> |
130 | | - </repositories> |
131 | | - |
132 | | - <pluginRepositories> |
133 | | - <pluginRepository> |
134 | | - <id>ossrh-snapshot</id> |
135 | | - <url>https://oss.sonatype.org/content/repositories/snapshots</url> |
136 | | - <snapshots> |
137 | | - <updatePolicy>always</updatePolicy> |
138 | | - <enabled>true</enabled> |
139 | | - </snapshots> |
140 | | - <releases> |
141 | | - <updatePolicy>always</updatePolicy> |
142 | | - <enabled>true</enabled> |
143 | | - </releases> |
144 | | - </pluginRepository> |
145 | | - </pluginRepositories> |
146 | | - |
147 | 110 | <dependencyManagement> |
148 | 111 | <dependencies> |
149 | 112 | <dependency> |
|
298 | 261 | </executions> |
299 | 262 | </plugin> |
300 | 263 | <plugin> |
301 | | - <groupId>de.jutzig</groupId> |
302 | | - <artifactId>github-release-plugin</artifactId> |
303 | | - <version>${maven.github.release.plugin.version}</version> |
| 264 | + <groupId>org.apache.maven.plugins</groupId> |
| 265 | + <artifactId>maven-release-plugin</artifactId> |
| 266 | + <version>3.1.1</version> |
304 | 267 | <configuration> |
305 | | - <tag>${project.artifactId}-${project.version}</tag> |
306 | | - <fileSets> |
307 | | - <fileSet> |
308 | | - <directory>${project.build.directory}</directory> |
309 | | - <includes> |
310 | | - <include>${project.build.finalName}.jar</include> |
311 | | - </includes> |
312 | | - </fileSet> |
313 | | - </fileSets> |
| 268 | + <projectVersionPolicyId>SemVerVersionPolicy</projectVersionPolicyId> |
| 269 | + <tagNameFormat>@{project.artifactId}-@{project.version}</tagNameFormat> |
| 270 | + <useReleaseProfile>false</useReleaseProfile> |
| 271 | + <releaseProfiles>release</releaseProfiles> |
| 272 | + <goals>deploy</goals> |
| 273 | + </configuration> |
| 274 | + </plugin> |
| 275 | + <plugin> |
| 276 | + <groupId>org.sonatype.central</groupId> |
| 277 | + <artifactId>central-publishing-maven-plugin</artifactId> |
| 278 | + <version>0.8.0</version> |
| 279 | + <extensions>true</extensions> |
| 280 | + <configuration> |
| 281 | + <autoPublish>true</autoPublish> |
| 282 | + <publishingServerId>central</publishingServerId> |
314 | 283 | </configuration> |
315 | 284 | </plugin> |
316 | 285 | </plugins> |
|
336 | 305 | </build> |
337 | 306 |
|
338 | 307 | <profiles> |
| 308 | + <profile> |
| 309 | + <!-- |
| 310 | + When running in GitHub Actions, the SCM connection must be via HTTPS |
| 311 | + so that the GITHUB_TOKEN injected by Actions can be used to authenticate. |
| 312 | +
|
| 313 | + Connection URLs target the repository for which the Actions workflow is |
| 314 | + running, enabling the release process to be tested in forks. |
| 315 | + --> |
| 316 | + <id>github-actions</id> |
| 317 | + <activation> |
| 318 | + <property> |
| 319 | + <name>env.GITHUB_ACTIONS</name> |
| 320 | + <value>true</value> |
| 321 | + </property> |
| 322 | + </activation> |
| 323 | + <properties> |
| 324 | + <scm.connection>scm:git:https://github.com/${env.GITHUB_REPOSITORY}.git</scm.connection> |
| 325 | + <scm.developerConnection>scm:git:https://github.com/${env.GITHUB_REPOSITORY}.git</scm.developerConnection> |
| 326 | + <scm.url>https://github.com/${env.GITHUB_REPOSITORY}.git</scm.url> |
| 327 | + </properties> |
| 328 | + </profile> |
339 | 329 | <profile> |
340 | 330 | <id>release</id> |
341 | 331 | <activation> |
|
0 commit comments