|
22 | 22 | <distribution>repo</distribution> |
23 | 23 | </license> |
24 | 24 | </licenses> |
| 25 | + |
| 26 | + <developers> |
| 27 | + <developer> |
| 28 | + <name>top-kgame</name> |
| 29 | + <email>chinazhangk@gmail.com</email> |
| 30 | + <organization>top-kgame</organization> |
| 31 | + <organizationUrl>https://github.com/top-kgame</organizationUrl> |
| 32 | + </developer> |
| 33 | + </developers> |
| 34 | + |
25 | 35 | <!-- SCM信息(便于开发跟踪) --> |
26 | 36 | <scm> |
27 | 37 | <!-- 只读访问URL --> |
|
41 | 51 | <maven.compiler.release>21</maven.compiler.release> <!-- 确保使用JDK21的API --> |
42 | 52 | <java.version>21</java.version> |
43 | 53 | <log4j.version>2.25.3</log4j.version> |
| 54 | + <central-publishing.version>0.11.0</central-publishing.version> |
44 | 55 | </properties> |
45 | 56 |
|
46 | 57 | <!-- 依赖管理 --> |
|
72 | 83 | </dependencies> |
73 | 84 |
|
74 | 85 | <!-- 构建配置 --> |
| 86 | + <pluginRepositories> |
| 87 | + <pluginRepository> |
| 88 | + <id>central-direct</id> |
| 89 | + <url>https://repo.maven.apache.org/maven2</url> |
| 90 | + <releases> |
| 91 | + <enabled>true</enabled> |
| 92 | + </releases> |
| 93 | + <snapshots> |
| 94 | + <enabled>false</enabled> |
| 95 | + </snapshots> |
| 96 | + </pluginRepository> |
| 97 | + </pluginRepositories> |
| 98 | + |
75 | 99 | <build> |
76 | 100 | <plugins> |
77 | | - <!-- 必须配置源码和Javadoc打包 --> |
78 | | - <plugin> |
79 | | - <groupId>org.apache.maven.plugins</groupId> |
80 | | - <artifactId>maven-source-plugin</artifactId> |
81 | | - <version>3.3.0</version> |
82 | | - <executions> |
83 | | - <execution> |
84 | | - <id>attach-sources</id> |
85 | | - <goals> |
86 | | - <goal>jar-no-fork</goal> |
87 | | - </goals> |
88 | | - </execution> |
89 | | - </executions> |
90 | | - </plugin> |
91 | 101 | <!-- 模块化支持(Java 9+) --> |
92 | 102 | <plugin> |
93 | 103 | <groupId>org.apache.maven.plugins</groupId> |
|
113 | 123 | </build> |
114 | 124 |
|
115 | 125 | <distributionManagement> |
116 | | - <repository> |
117 | | - <id>github</id> |
118 | | - <url>https://maven.pkg.github.com/top-kgame/GServerECS</url> |
119 | | - </repository> |
| 126 | + <repository> |
| 127 | + <id>github</id> |
| 128 | + <url>https://maven.pkg.github.com/top-kgame/GServerECS</url> |
| 129 | + </repository> |
120 | 130 | </distributionManagement> |
121 | 131 |
|
| 132 | + <profiles> |
| 133 | + <profile> |
| 134 | + <id>release</id> |
| 135 | + <build> |
| 136 | + <plugins> |
| 137 | + <plugin> |
| 138 | + <groupId>org.apache.maven.plugins</groupId> |
| 139 | + <artifactId>maven-source-plugin</artifactId> |
| 140 | + <version>3.3.1</version> |
| 141 | + <executions> |
| 142 | + <execution> |
| 143 | + <id>attach-sources</id> |
| 144 | + <goals> |
| 145 | + <goal>jar-no-fork</goal> |
| 146 | + </goals> |
| 147 | + </execution> |
| 148 | + </executions> |
| 149 | + </plugin> |
| 150 | + <plugin> |
| 151 | + <groupId>org.apache.maven.plugins</groupId> |
| 152 | + <artifactId>maven-javadoc-plugin</artifactId> |
| 153 | + <version>3.6.3</version> |
| 154 | + <executions> |
| 155 | + <execution> |
| 156 | + <id>attach-javadocs</id> |
| 157 | + <goals> |
| 158 | + <goal>jar</goal> |
| 159 | + </goals> |
| 160 | + </execution> |
| 161 | + </executions> |
| 162 | + <configuration> |
| 163 | + <source>21</source> |
| 164 | + <doclint>none</doclint> |
| 165 | + </configuration> |
| 166 | + </plugin> |
| 167 | + <plugin> |
| 168 | + <groupId>org.apache.maven.plugins</groupId> |
| 169 | + <artifactId>maven-gpg-plugin</artifactId> |
| 170 | + <version>3.2.4</version> |
| 171 | + <executions> |
| 172 | + <execution> |
| 173 | + <id>sign-artifacts</id> |
| 174 | + <phase>verify</phase> |
| 175 | + <goals> |
| 176 | + <goal>sign</goal> |
| 177 | + </goals> |
| 178 | + <configuration> |
| 179 | + <gpgArguments> |
| 180 | + <arg>--pinentry-mode</arg> |
| 181 | + <arg>loopback</arg> |
| 182 | + </gpgArguments> |
| 183 | + </configuration> |
| 184 | + </execution> |
| 185 | + </executions> |
| 186 | + </plugin> |
| 187 | + <plugin> |
| 188 | + <groupId>org.sonatype.central</groupId> |
| 189 | + <artifactId>central-publishing-maven-plugin</artifactId> |
| 190 | + <version>${central-publishing.version}</version> |
| 191 | + <extensions>true</extensions> |
| 192 | + <configuration> |
| 193 | + <publishingServerId>central</publishingServerId> |
| 194 | + <deploymentName>${project.artifactId}-${project.version}</deploymentName> |
| 195 | + </configuration> |
| 196 | + </plugin> |
| 197 | + </plugins> |
| 198 | + </build> |
| 199 | + </profile> |
| 200 | + </profiles> |
| 201 | + |
122 | 202 | </project> |
0 commit comments