添加中央仓库打包配置

This commit is contained in:
smallchill 2018-12-29 00:52:46 +08:00
parent 777b991bb3
commit 9a6a9f90e1
3 changed files with 50 additions and 46 deletions

View File

@ -35,12 +35,11 @@ public class BladeApplication {
/** /**
* Create an application context * Create an application context
* java -jar app.jar --spring.profiles.active=prod --server.port=2333
* *
* @param appName application name * @param appName application name
* @param source The sources * @param source The sources
* @param args args the command line arguments
* @return an application context created from the current state * @return an application context created from the current state
* @run java -jar app.jar --spring.profiles.active=prod --server.port=2333
*/ */
public static ConfigurableApplicationContext run(String appName, Class source, String... args) { public static ConfigurableApplicationContext run(String appName, Class source, String... args) {
SpringApplicationBuilder builder = createSpringApplicationBuilder(appName, source, args); SpringApplicationBuilder builder = createSpringApplicationBuilder(appName, source, args);

View File

@ -116,7 +116,6 @@ public class OkHttpUtil {
/** /**
* POST请求发送JSON数据 * POST请求发送JSON数据
*
* @param url * @param url
* @param header * @param header
* @param json * @param json

92
pom.xml
View File

@ -52,6 +52,9 @@
<spring.boot.version>2.0.7.RELEASE</spring.boot.version> <spring.boot.version>2.0.7.RELEASE</spring.boot.version>
<spring.cloud.version>Finchley.SR2</spring.cloud.version> <spring.cloud.version>Finchley.SR2</spring.cloud.version>
<spring.platform.version>Cairo-SR5</spring.platform.version> <spring.platform.version>Cairo-SR5</spring.platform.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.encoding>UTF-8</maven.compiler.encoding>
</properties> </properties>
<modules> <modules>
@ -161,47 +164,31 @@
</resource> </resource>
</resources> </resources>
<plugins> <plugins>
<!-- Source -->
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>2.2.1</version> <version>${maven.plugin.version}</version>
<executions> <configuration>
<execution> <source>${java.version}</source>
<phase>package</phase> <target>${java.version}</target>
<goals> <encoding>UTF-8</encoding>
<goal>jar-no-fork</goal> <compilerArgs>
</goals> <arg>-parameters</arg>
</execution> </compilerArgs>
</executions> </configuration>
</plugin> </plugin>
<!-- Javadoc -->
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId> <artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version> <version>2.9.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin> </plugin>
<!-- GPG -->
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
<version>1.6</version> <version>2.18.1</version>
<executions> <configuration>
<execution> <skipTests>true</skipTests>
<phase>verify</phase> </configuration>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>
@ -242,29 +229,48 @@
<id>release</id> <id>release</id>
<build> <build>
<plugins> <plugins>
<!-- 打jar包 --> <!-- Source -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.0</version>
</plugin>
<!-- 打source包 -->
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId> <artifactId>maven-source-plugin</artifactId>
<version>3.0.1</version> <version>2.2.1</version>
<configuration>
<attach>true</attach>
</configuration>
<executions> <executions>
<execution> <execution>
<phase>compile</phase> <phase>package</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Javadoc -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<executions>
<execution>
<phase>package</phase>
<goals> <goals>
<goal>jar</goal> <goal>jar</goal>
</goals> </goals>
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<!-- GPG -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins> </plugins>
</build> </build>
<distributionManagement> <distributionManagement>