Skip to content

Commit 1bc90c9

Browse files
committed
add build plugin
1 parent f8371cc commit 1bc90c9

2 files changed

Lines changed: 339 additions & 6 deletions

File tree

cozeloop-core/pom.xml

Lines changed: 174 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@
1919
<name>CozeLoop Java SDK - Core</name>
2020
<description>Core module of CozeLoop Java SDK</description>
2121

22+
<licenses>
23+
<license>
24+
<name>MIT License</name>
25+
<url>https://github.com/coze-dev/cozeloop-java/blob/main/LICENSE</url>
26+
</license>
27+
</licenses>
28+
2229
<dependencies>
2330
<!-- OpenTelemetry -->
2431
<dependency>
@@ -149,25 +156,189 @@
149156
</dependency>
150157
</dependencies>
151158

159+
<distributionManagement>
160+
<snapshotRepository>
161+
<id>ossrh</id>
162+
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
163+
</snapshotRepository>
164+
<repository>
165+
<id>ossrh</id>
166+
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2</url>
167+
</repository>
168+
</distributionManagement>
169+
170+
171+
152172
<build>
173+
<resources>
174+
<resource>
175+
<directory>src/main/resources</directory>
176+
<filtering>true</filtering>
177+
<includes>
178+
<include>**/version.properties</include>
179+
</includes>
180+
</resource>
181+
</resources>
153182
<plugins>
183+
184+
<!-- Javadoc plugin -->
154185
<plugin>
155186
<groupId>org.apache.maven.plugins</groupId>
156-
<artifactId>maven-compiler-plugin</artifactId>
187+
<artifactId>maven-javadoc-plugin</artifactId>
188+
<version>3.12.0</version>
189+
<configuration>
190+
<doclint>none</doclint>
191+
<source>8</source>
192+
<additionalJOptions>
193+
<additionalJOption>-Xdoclint:none</additionalJOption>
194+
</additionalJOptions>
195+
</configuration>
196+
<executions>
197+
<execution>
198+
<id>attach-javadocs</id>
199+
<goals>
200+
<goal>jar</goal>
201+
</goals>
202+
</execution>
203+
</executions>
157204
</plugin>
158205
<plugin>
159206
<groupId>org.apache.maven.plugins</groupId>
160-
<artifactId>maven-surefire-plugin</artifactId>
207+
<artifactId>maven-compiler-plugin</artifactId>
208+
<version>3.13.0</version>
209+
<configuration>
210+
<source>1.8</source>
211+
<target>1.8</target>
212+
<encoding>UTF-8</encoding>
213+
<showWarnings>true</showWarnings>
214+
<showDeprecation>true</showDeprecation>
215+
<verbose>true</verbose>
216+
<fork>true</fork>
217+
<compilerArgs>
218+
<arg>-verbose</arg>
219+
<arg>-Xlint:all</arg>
220+
</compilerArgs>
221+
<annotationProcessorPaths>
222+
<path>
223+
<groupId>org.projectlombok</groupId>
224+
<artifactId>lombok</artifactId>
225+
<version>1.18.24</version>
226+
</path>
227+
</annotationProcessorPaths>
228+
</configuration>
161229
</plugin>
230+
162231
<plugin>
163232
<groupId>org.apache.maven.plugins</groupId>
164233
<artifactId>maven-source-plugin</artifactId>
234+
<version>3.3.0</version>
235+
<executions>
236+
<execution>
237+
<id>attach-sources</id>
238+
<goals>
239+
<goal>jar</goal>
240+
</goals>
241+
</execution>
242+
</executions>
165243
</plugin>
244+
245+
<plugin>
246+
<groupId>org.jacoco</groupId>
247+
<artifactId>jacoco-maven-plugin</artifactId>
248+
<version>0.8.11</version>
249+
<executions>
250+
<execution>
251+
<id>prepare-agent</id>
252+
<goals>
253+
<goal>prepare-agent</goal>
254+
</goals>
255+
</execution>
256+
<execution>
257+
<id>report</id>
258+
<phase>test</phase>
259+
<goals>
260+
<goal>report</goal>
261+
</goals>
262+
</execution>
263+
</executions>
264+
</plugin>
265+
166266
<plugin>
167267
<groupId>org.apache.maven.plugins</groupId>
168-
<artifactId>maven-javadoc-plugin</artifactId>
268+
<artifactId>maven-surefire-plugin</artifactId>
269+
<version>3.2.5</version>
270+
<configuration>
271+
<includes>
272+
<include>**/*Test.java</include>
273+
</includes>
274+
<useSystemClassLoader>false</useSystemClassLoader>
275+
<forkCount>1</forkCount>
276+
<reuseForks>true</reuseForks>
277+
<argLine>@{argLine}</argLine>
278+
<systemPropertyVariables>
279+
<okhttp.platform>jdk-8</okhttp.platform>
280+
<java.security.egd>file:/dev/urandom</java.security.egd>
281+
<javax.net.ssl.trustStore>${java.home}/lib/security/cacerts</javax.net.ssl.trustStore>
282+
<javax.net.ssl.trustStorePassword>changeit</javax.net.ssl.trustStorePassword>
283+
</systemPropertyVariables>
284+
</configuration>
169285
</plugin>
286+
170287
</plugins>
171288
</build>
289+
290+
<profiles>
291+
<profile>
292+
<id>release</id>
293+
<activation>
294+
<property>
295+
<name>performRelease</name>
296+
<value>true</value>
297+
</property>
298+
</activation>
299+
<build>
300+
<plugins>
301+
<plugin>
302+
<groupId>org.apache.maven.plugins</groupId>
303+
<artifactId>maven-gpg-plugin</artifactId>
304+
<version>3.2.5</version>
305+
<configuration>
306+
<gpgArguments>
307+
<arg>--pinentry-mode</arg>
308+
<arg>loopback</arg>
309+
</gpgArguments>
310+
</configuration>
311+
<executions>
312+
<execution>
313+
<id>sign-artifacts</id>
314+
<phase>verify</phase>
315+
<goals>
316+
<goal>sign</goal>
317+
</goals>
318+
<configuration>
319+
<gpgArguments>
320+
<arg>--pinentry-mode</arg>
321+
<arg>loopback</arg>
322+
</gpgArguments>
323+
</configuration>
324+
</execution>
325+
</executions>
326+
</plugin>
327+
328+
<plugin>
329+
<groupId>org.sonatype.central</groupId>
330+
<artifactId>central-publishing-maven-plugin</artifactId>
331+
<version>0.5.0</version>
332+
<extensions>true</extensions>
333+
<configuration>
334+
<publishingServerId>central</publishingServerId>
335+
<autoPublish>true</autoPublish>
336+
</configuration>
337+
</plugin>
338+
</plugins>
339+
</build>
340+
</profile>
341+
</profiles>
342+
172343
</project>
173344

cozeloop-spring-boot-starter/pom.xml

Lines changed: 165 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,25 +50,187 @@
5050
</dependency>
5151
</dependencies>
5252

53+
<distributionManagement>
54+
<snapshotRepository>
55+
<id>ossrh</id>
56+
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
57+
</snapshotRepository>
58+
<repository>
59+
<id>ossrh</id>
60+
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2</url>
61+
</repository>
62+
</distributionManagement>
63+
5364
<build>
65+
<resources>
66+
<resource>
67+
<directory>src/main/resources</directory>
68+
<filtering>true</filtering>
69+
<includes>
70+
<include>**/version.properties</include>
71+
</includes>
72+
</resource>
73+
</resources>
5474
<plugins>
75+
76+
<!-- Javadoc plugin -->
5577
<plugin>
5678
<groupId>org.apache.maven.plugins</groupId>
57-
<artifactId>maven-compiler-plugin</artifactId>
79+
<artifactId>maven-javadoc-plugin</artifactId>
80+
<version>3.12.0</version>
81+
<configuration>
82+
<doclint>none</doclint>
83+
<source>8</source>
84+
<additionalJOptions>
85+
<additionalJOption>-Xdoclint:none</additionalJOption>
86+
</additionalJOptions>
87+
</configuration>
88+
<executions>
89+
<execution>
90+
<id>attach-javadocs</id>
91+
<goals>
92+
<goal>jar</goal>
93+
</goals>
94+
</execution>
95+
</executions>
5896
</plugin>
5997
<plugin>
6098
<groupId>org.apache.maven.plugins</groupId>
61-
<artifactId>maven-surefire-plugin</artifactId>
99+
<artifactId>maven-compiler-plugin</artifactId>
100+
<version>3.13.0</version>
101+
<configuration>
102+
<source>1.8</source>
103+
<target>1.8</target>
104+
<encoding>UTF-8</encoding>
105+
<showWarnings>true</showWarnings>
106+
<showDeprecation>true</showDeprecation>
107+
<verbose>true</verbose>
108+
<fork>true</fork>
109+
<compilerArgs>
110+
<arg>-verbose</arg>
111+
<arg>-Xlint:all</arg>
112+
</compilerArgs>
113+
<annotationProcessorPaths>
114+
<path>
115+
<groupId>org.projectlombok</groupId>
116+
<artifactId>lombok</artifactId>
117+
<version>1.18.24</version>
118+
</path>
119+
</annotationProcessorPaths>
120+
</configuration>
62121
</plugin>
122+
63123
<plugin>
64124
<groupId>org.apache.maven.plugins</groupId>
65125
<artifactId>maven-source-plugin</artifactId>
126+
<version>3.3.0</version>
127+
<executions>
128+
<execution>
129+
<id>attach-sources</id>
130+
<goals>
131+
<goal>jar</goal>
132+
</goals>
133+
</execution>
134+
</executions>
66135
</plugin>
136+
137+
<plugin>
138+
<groupId>org.jacoco</groupId>
139+
<artifactId>jacoco-maven-plugin</artifactId>
140+
<version>0.8.11</version>
141+
<executions>
142+
<execution>
143+
<id>prepare-agent</id>
144+
<goals>
145+
<goal>prepare-agent</goal>
146+
</goals>
147+
</execution>
148+
<execution>
149+
<id>report</id>
150+
<phase>test</phase>
151+
<goals>
152+
<goal>report</goal>
153+
</goals>
154+
</execution>
155+
</executions>
156+
</plugin>
157+
67158
<plugin>
68159
<groupId>org.apache.maven.plugins</groupId>
69-
<artifactId>maven-javadoc-plugin</artifactId>
160+
<artifactId>maven-surefire-plugin</artifactId>
161+
<version>3.2.5</version>
162+
<configuration>
163+
<includes>
164+
<include>**/*Test.java</include>
165+
</includes>
166+
<useSystemClassLoader>false</useSystemClassLoader>
167+
<forkCount>1</forkCount>
168+
<reuseForks>true</reuseForks>
169+
<argLine>@{argLine}</argLine>
170+
<systemPropertyVariables>
171+
<okhttp.platform>jdk-8</okhttp.platform>
172+
<java.security.egd>file:/dev/urandom</java.security.egd>
173+
<javax.net.ssl.trustStore>${java.home}/lib/security/cacerts</javax.net.ssl.trustStore>
174+
<javax.net.ssl.trustStorePassword>changeit</javax.net.ssl.trustStorePassword>
175+
</systemPropertyVariables>
176+
</configuration>
70177
</plugin>
178+
71179
</plugins>
72180
</build>
181+
182+
<profiles>
183+
<profile>
184+
<id>release</id>
185+
<activation>
186+
<property>
187+
<name>performRelease</name>
188+
<value>true</value>
189+
</property>
190+
</activation>
191+
<build>
192+
<plugins>
193+
<plugin>
194+
<groupId>org.apache.maven.plugins</groupId>
195+
<artifactId>maven-gpg-plugin</artifactId>
196+
<version>3.2.5</version>
197+
<configuration>
198+
<gpgArguments>
199+
<arg>--pinentry-mode</arg>
200+
<arg>loopback</arg>
201+
</gpgArguments>
202+
</configuration>
203+
<executions>
204+
<execution>
205+
<id>sign-artifacts</id>
206+
<phase>verify</phase>
207+
<goals>
208+
<goal>sign</goal>
209+
</goals>
210+
<configuration>
211+
<gpgArguments>
212+
<arg>--pinentry-mode</arg>
213+
<arg>loopback</arg>
214+
</gpgArguments>
215+
</configuration>
216+
</execution>
217+
</executions>
218+
</plugin>
219+
220+
<plugin>
221+
<groupId>org.sonatype.central</groupId>
222+
<artifactId>central-publishing-maven-plugin</artifactId>
223+
<version>0.5.0</version>
224+
<extensions>true</extensions>
225+
<configuration>
226+
<publishingServerId>central</publishingServerId>
227+
<autoPublish>true</autoPublish>
228+
</configuration>
229+
</plugin>
230+
</plugins>
231+
</build>
232+
</profile>
233+
</profiles>
234+
73235
</project>
74236

0 commit comments

Comments
 (0)