|
169 | 169 | </dependencies> |
170 | 170 | </plugin> |
171 | 171 |
|
| 172 | + <!-- 参考 https://docs.github.com/cn/actions/language-and-framework-guides/publishing-java-packages-with-maven#about-package-configuration --> |
| 173 | + <!-- 参考 https://github.com/actions/setup-java --> |
| 174 | + <!-- 参考 https://central.sonatype.org/pages/apache-maven.html --> |
| 175 | + |
| 176 | + <!-- Javadoc和源代码附件 --> |
| 177 | + <plugin> |
| 178 | + <groupId>org.apache.maven.plugins</groupId> |
| 179 | + <artifactId>maven-source-plugin</artifactId> |
| 180 | + <version>2.2.1</version> |
| 181 | + <executions> |
| 182 | + <execution> |
| 183 | + <id>attach-sources</id> |
| 184 | + <goals> |
| 185 | + <goal>jar-no-fork</goal> |
| 186 | + </goals> |
| 187 | + </execution> |
| 188 | + </executions> |
| 189 | + </plugin> |
| 190 | + <plugin> |
| 191 | + <groupId>org.apache.maven.plugins</groupId> |
| 192 | + <artifactId>maven-javadoc-plugin</artifactId> |
| 193 | + <version>2.9.1</version> |
| 194 | + <executions> |
| 195 | + <execution> |
| 196 | + <id>attach-javadocs</id> |
| 197 | + <goals> |
| 198 | + <goal>jar</goal> |
| 199 | + </goals> |
| 200 | + </execution> |
| 201 | + </executions> |
| 202 | + </plugin> |
| 203 | + |
| 204 | + <!-- GPG签名组件 --> |
| 205 | + <plugin> |
| 206 | + <groupId>org.apache.maven.plugins</groupId> |
| 207 | + <artifactId>maven-gpg-plugin</artifactId> |
| 208 | + <version>1.5</version> |
| 209 | + <executions> |
| 210 | + <execution> |
| 211 | + <id>sign-artifacts</id> |
| 212 | + <phase>verify</phase> |
| 213 | + <goals> |
| 214 | + <goal>sign</goal> |
| 215 | + </goals> |
| 216 | + </execution> |
| 217 | + </executions> |
| 218 | + </plugin> |
| 219 | + |
| 220 | + <!-- Nexus Staging Maven插件,用于部署和发布 --> |
| 221 | + <plugin> |
| 222 | + <groupId>org.sonatype.plugins</groupId> |
| 223 | + <artifactId>nexus-staging-maven-plugin</artifactId> |
| 224 | + <version>1.6.7</version> |
| 225 | + <extensions>true</extensions> |
| 226 | + <configuration> |
| 227 | + <serverId>ossrh</serverId> |
| 228 | + <nexusUrl>https://oss.sonatype.org/</nexusUrl> |
| 229 | + <!-- 手动release --> |
| 230 | + <autoReleaseAfterClose>false</autoReleaseAfterClose> |
| 231 | + </configuration> |
| 232 | + </plugin> |
| 233 | + |
172 | 234 | </plugins> |
173 | 235 | </build> |
174 | 236 |
|
| 237 | + <distributionManagement> |
| 238 | + <snapshotRepository> |
| 239 | + <id>ossrh</id> |
| 240 | + <url>https://oss.sonatype.org/content/repositories/snapshots/</url> |
| 241 | + </snapshotRepository> |
| 242 | + <repository> |
| 243 | + <id>ossrh</id> |
| 244 | + <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url> |
| 245 | + </repository> |
| 246 | + </distributionManagement> |
| 247 | + |
175 | 248 | <reporting> |
176 | 249 | <plugins> |
177 | 250 |
|
|
0 commit comments