Skip to content

Commit 03f7f91

Browse files
committed
init root maven pom
1 parent 6def743 commit 03f7f91

File tree

2 files changed

+105
-5
lines changed

2 files changed

+105
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Marketing API Java SDKs 旨在对国内主流的Marketing API进行封装,帮
88

99
```xml
1010
<dependency>
11-
<groupId>com.github.hyq0719</groupId>
11+
<groupId>io.github.hyq0719</groupId>
1212
<artifactId>(不同模块参考下文)</artifactId>
1313
<version>1.0.0-SNAPSHOT</version>
1414
</dependency>

pom.xml

Lines changed: 104 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@
121121
<java.version>1.8</java.version>
122122
<maven.compiler.source>${java.version}</maven.compiler.source>
123123
<maven.compiler.target>${java.version}</maven.compiler.target>
124+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
125+
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
124126
<common.version>1.0.0-SNAPSHOT</common.version>
125127
<gson-fire-version>1.8.0</gson-fire-version>
126128
<okhttp-version>3.11.0</okhttp-version>
@@ -133,12 +135,110 @@
133135
</properties>
134136

135137
<distributionManagement>
138+
<snapshotRepository>
139+
<id>ossrh</id>
140+
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
141+
</snapshotRepository>
142+
<repository>
143+
<id>ossrh</id>
144+
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
145+
</repository>
136146
</distributionManagement>
137147

148+
<profiles>
149+
<profile>
150+
<id>release</id>
151+
<build>
152+
<plugins>
153+
<plugin>
154+
<groupId>org.apache.maven.plugins</groupId>
155+
<artifactId>maven-source-plugin</artifactId>
156+
<version>2.2.1</version>
157+
<executions>
158+
<execution>
159+
<id>attach-sources</id>
160+
<goals>
161+
<goal>jar-no-fork</goal>
162+
</goals>
163+
</execution>
164+
</executions>
165+
</plugin>
166+
<plugin>
167+
<groupId>org.apache.maven.plugins</groupId>
168+
<artifactId>maven-source-plugin</artifactId>
169+
<version>2.2.1</version>
170+
<executions>
171+
<execution>
172+
<id>attach-sources</id>
173+
<goals>
174+
<goal>jar-no-fork</goal>
175+
</goals>
176+
</execution>
177+
</executions>
178+
</plugin>
179+
<plugin>
180+
<groupId>org.apache.maven.plugins</groupId>
181+
<artifactId>maven-javadoc-plugin</artifactId>
182+
<version>2.9.1</version>
183+
<configuration>
184+
<!-- jdk1.8要加上,1.7要去掉,否则会报错 -->
185+
<additionalJOptions>
186+
<additionalJOption>-Xdoclint:none</additionalJOption>
187+
</additionalJOptions>
188+
</configuration>
189+
<executions>
190+
<execution>
191+
<id>attach-javadocs</id>
192+
<goals>
193+
<goal>jar</goal>
194+
</goals>
195+
</execution>
196+
</executions>
197+
</plugin>
198+
<plugin>
199+
<groupId>org.apache.maven.plugins</groupId>
200+
<artifactId>maven-gpg-plugin</artifactId>
201+
<version>1.6</version>
202+
<executions>
203+
<execution>
204+
<id>sign-artifacts</id>
205+
<phase>verify</phase>
206+
<goals>
207+
<goal>sign</goal>
208+
</goals>
209+
</execution>
210+
</executions>
211+
</plugin>
212+
</plugins>
213+
</build>
214+
</profile>
215+
</profiles>
216+
138217
<build>
139-
<pluginManagement>
140-
<plugins>
141-
</plugins>
142-
</pluginManagement>
218+
<plugins>
219+
<plugin>
220+
<groupId>org.sonatype.plugins</groupId>
221+
<artifactId>nexus-staging-maven-plugin</artifactId>
222+
<version>1.6.7</version>
223+
<extensions>true</extensions>
224+
<configuration>
225+
<serverId>ossrh</serverId>
226+
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
227+
<autoReleaseAfterClose>true</autoReleaseAfterClose>
228+
</configuration>
229+
</plugin>
230+
231+
<plugin>
232+
<groupId>org.apache.maven.plugins</groupId>
233+
<artifactId>maven-release-plugin</artifactId>
234+
<version>2.5.3</version>
235+
<configuration>
236+
<autoVersionSubmodules>true</autoVersionSubmodules>
237+
<useReleaseProfile>false</useReleaseProfile>
238+
<releaseProfiles>release</releaseProfiles>
239+
<goals>deploy</goals>
240+
</configuration>
241+
</plugin>
242+
</plugins>
143243
</build>
144244
</project>

0 commit comments

Comments
 (0)