Skip to content

Commit 173ae8c

Browse files
committed
publishing central sonatype
1 parent cb152f7 commit 173ae8c

File tree

2 files changed

+190
-9
lines changed

2 files changed

+190
-9
lines changed

.flattened-pom.xml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
4+
<modelVersion>4.0.0</modelVersion>
5+
<groupId>io.github.ipipman</groupId>
6+
<artifactId>cache-man</artifactId>
7+
<version>0.0.1</version>
8+
<name>cache-man</name>
9+
<description>cache-man</description>
10+
<url>https://github.com/ipipman/cache-man</url>
11+
<licenses>
12+
<license>
13+
<name>The Apache Software License, Version 2.0</name>
14+
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
15+
<distribution>repo</distribution>
16+
</license>
17+
</licenses>
18+
<developers>
19+
<developer>
20+
<name>ipman</name>
21+
<email>[email protected]</email>
22+
<url>https://github.com/ipipman</url>
23+
</developer>
24+
</developers>
25+
<scm>
26+
<connection>scm:git:https://github.com/ipipman/cache-man.git</connection>
27+
<developerConnection>scm:git:https://github.com/ipipman/cache-man.git</developerConnection>
28+
<url>https://github.com/ipipman/cache-man</url>
29+
</scm>
30+
<issueManagement>
31+
<system>github</system>
32+
<url>https://github.com/ipipman/cache-man/issues</url>
33+
</issueManagement>
34+
<dependencies>
35+
<dependency>
36+
<groupId>org.springframework.boot</groupId>
37+
<artifactId>spring-boot-starter</artifactId>
38+
<version>3.3.0</version>
39+
<scope>compile</scope>
40+
</dependency>
41+
<dependency>
42+
<groupId>io.netty</groupId>
43+
<artifactId>netty-all</artifactId>
44+
<version>4.1.104.Final</version>
45+
<scope>compile</scope>
46+
</dependency>
47+
<dependency>
48+
<groupId>org.projectlombok</groupId>
49+
<artifactId>lombok</artifactId>
50+
<version>1.18.32</version>
51+
<scope>compile</scope>
52+
<optional>true</optional>
53+
</dependency>
54+
</dependencies>
55+
</project>

pom.xml

Lines changed: 135 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,48 @@
88
<version>3.3.0</version>
99
<relativePath/> <!-- lookup parent from repository -->
1010
</parent>
11-
<groupId>cn.ipman</groupId>
11+
12+
<groupId>io.github.ipipman</groupId>
1213
<artifactId>cache-man</artifactId>
13-
<version>0.0.1-SNAPSHOT</version>
14+
<version>0.0.1</version>
15+
1416
<name>cache-man</name>
1517
<description>cache-man</description>
18+
<packaging>jar</packaging>
19+
1620
<properties>
1721
<java.version>17</java.version>
1822
</properties>
23+
24+
<url>https://github.com/ipipman/cache-man</url>
25+
26+
<licenses>
27+
<license>
28+
<name>The Apache Software License, Version 2.0</name>
29+
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
30+
<distribution>repo</distribution>
31+
</license>
32+
</licenses>
33+
34+
<issueManagement>
35+
<system>github</system>
36+
<url>https://github.com/ipipman/cache-man/issues</url>
37+
</issueManagement>
38+
39+
<scm>
40+
<connection>scm:git:https://github.com/ipipman/cache-man.git</connection>
41+
<developerConnection>scm:git:https://github.com/ipipman/cache-man.git</developerConnection>
42+
<url>https://github.com/ipipman/cache-man</url>
43+
</scm>
44+
45+
<developers>
46+
<developer>
47+
<name>ipman</name>
48+
<email>[email protected]</email>
49+
<url>https://github.com/ipipman</url>
50+
</developer>
51+
</developers>
52+
1953
<dependencies>
2054
<dependency>
2155
<groupId>org.springframework.boot</groupId>
@@ -102,25 +136,117 @@
102136
</plugin>
103137

104138
<plugin>
105-
<groupId>org.jacoco</groupId>
106-
<artifactId>jacoco-maven-plugin</artifactId>
107-
<version>0.8.7</version>
139+
<groupId>org.codehaus.mojo</groupId>
140+
<artifactId>flatten-maven-plugin</artifactId>
141+
<version>1.5.0</version>
142+
<configuration>
143+
<updatePomFile>true</updatePomFile>
144+
<flattenMode>oss</flattenMode>
145+
</configuration>
108146
<executions>
109147
<execution>
148+
<id>flatten</id>
110149
<goals>
111-
<goal>prepare-agent</goal>
150+
<goal>flatten</goal>
112151
</goals>
152+
<phase>process-resources</phase>
113153
</execution>
114154
<execution>
115-
<id>report</id>
116-
<phase>test</phase>
155+
<id>flatten.clean</id>
117156
<goals>
118-
<goal>report</goal>
157+
<goal>clean</goal>
119158
</goals>
159+
<phase>clean</phase>
120160
</execution>
121161
</executions>
122162
</plugin>
163+
164+
<plugin>
165+
<groupId>org.apache.maven.plugins</groupId>
166+
<artifactId>maven-source-plugin</artifactId>
167+
<version>3.1.0</version>
168+
<inherited>true</inherited>
169+
<executions>
170+
<execution>
171+
<id>attach-sources</id>
172+
<goals>
173+
<goal>jar</goal>
174+
</goals>
175+
</execution>
176+
</executions>
177+
<configuration>
178+
<excludeResources>true</excludeResources>
179+
<useDefaultExcludes>true</useDefaultExcludes>
180+
</configuration>
181+
</plugin>
182+
183+
<plugin>
184+
<groupId>org.apache.maven.plugins</groupId>
185+
<artifactId>maven-javadoc-plugin</artifactId>
186+
<version>3.1.0</version>
187+
<inherited>true</inherited>
188+
<executions>
189+
<execution>
190+
<id>bundle-sources</id>
191+
<phase>package</phase>
192+
<goals>
193+
<goal>jar</goal>
194+
</goals>
195+
</execution>
196+
</executions>
197+
<configuration>
198+
<maxmemory>1024</maxmemory>
199+
<encoding>UTF-8</encoding>
200+
<show>protected</show>
201+
<notree>true</notree>
202+
203+
<!-- Avoid running into Java 8's very restrictive doclint issues -->
204+
<failOnError>false</failOnError>
205+
<doclint>none</doclint>
206+
</configuration>
207+
</plugin>
123208
</plugins>
124209
</build>
125210

211+
<profiles>
212+
<profile>
213+
<id>release</id>
214+
<build>
215+
<plugins>
216+
<plugin>
217+
<groupId>org.apache.maven.plugins</groupId>
218+
<artifactId>maven-gpg-plugin</artifactId>
219+
<version>1.6</version>
220+
<executions>
221+
<execution>
222+
<id>sign-artifacts</id>
223+
<phase>verify</phase>
224+
<goals>
225+
<goal>sign</goal>
226+
</goals>
227+
</execution>
228+
</executions>
229+
</plugin>
230+
231+
<!-- 配置方式:https://central.sonatype.org/publish/publish-portal-maven/#deploymentname -->
232+
<!-- https://repo1.maven.org/maven2/io/github/ipipman/ -->
233+
<plugin>
234+
<groupId>org.sonatype.central</groupId>
235+
<artifactId>central-publishing-maven-plugin</artifactId>
236+
<version>0.4.0</version>
237+
<extensions>true</extensions>
238+
<configuration>
239+
<publishingServerId>central</publishingServerId>
240+
<tokenAuth>true</tokenAuth>
241+
<autoPublish>true</autoPublish>
242+
<excludeArtifacts>
243+
<!-- <excludeArtifact>cache-man</excludeArtifact>-->
244+
</excludeArtifacts>
245+
</configuration>
246+
</plugin>
247+
248+
</plugins>
249+
</build>
250+
</profile>
251+
</profiles>
126252
</project>

0 commit comments

Comments
 (0)