|
@@ -13,6 +13,12 @@
|
|
|
<artifactId>meter-reading-job</artifactId>
|
|
|
<version>1.0</version>
|
|
|
<description>抄表作业子模块</description>
|
|
|
+ <properties>
|
|
|
+ <maven.build.timestamp.format>yyyyMMdd</maven.build.timestamp.format>
|
|
|
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
|
+ <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
|
|
+ <java.version>1.8</java.version>
|
|
|
+ </properties>
|
|
|
<dependencies>
|
|
|
<dependency>
|
|
|
<groupId>com.huaxu.zoniot</groupId>
|
|
@@ -53,11 +59,53 @@
|
|
|
<plugin>
|
|
|
<groupId>org.springframework.boot</groupId>
|
|
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
|
|
+ </plugin>
|
|
|
+
|
|
|
+ <!-- 1、设置jar的入口类 -->
|
|
|
+ <plugin>
|
|
|
+ <groupId>org.apache.maven.plugins</groupId>
|
|
|
+
|
|
|
+ <artifactId>maven-jar-plugin</artifactId>
|
|
|
+ <configuration>
|
|
|
+ <archive>
|
|
|
+ <manifest>
|
|
|
+ <addClasspath>true</addClasspath>
|
|
|
+ <classpathPrefix>lib/</classpathPrefix>
|
|
|
+ <mainClass>com.huaxu.zoniot.MeterReadingJobApplication</mainClass>
|
|
|
+ </manifest>
|
|
|
+ </archive>
|
|
|
+ </configuration>
|
|
|
+ </plugin>
|
|
|
+
|
|
|
+
|
|
|
+ <!--2、把附属的jar打到jar内部的lib目录中 -->
|
|
|
+ <plugin>
|
|
|
+ <groupId>org.apache.maven.plugins</groupId>
|
|
|
+ <artifactId>maven-dependency-plugin</artifactId>
|
|
|
+ <executions>
|
|
|
+ <execution>
|
|
|
+ <id>copy-dependencies</id>
|
|
|
+ <phase>package</phase>
|
|
|
+ <goals>
|
|
|
+ <goal>copy-dependencies</goal>
|
|
|
+ </goals>
|
|
|
+ <configuration>
|
|
|
+ <outputDirectory>${project.build.directory}/lib</outputDirectory>
|
|
|
+ </configuration>
|
|
|
+ </execution>
|
|
|
+ </executions>
|
|
|
+ </plugin>
|
|
|
+
|
|
|
+
|
|
|
+ <!-- 3、打包过程忽略Junit测试 -->
|
|
|
+ <plugin>
|
|
|
+ <groupId>org.apache.maven.plugins</groupId>
|
|
|
+ <artifactId>maven-surefire-plugin</artifactId>
|
|
|
<configuration>
|
|
|
- <fork>true</fork>
|
|
|
- <addResources>true</addResources>
|
|
|
+ <skip>true</skip>
|
|
|
</configuration>
|
|
|
</plugin>
|
|
|
+
|
|
|
</plugins>
|
|
|
</build>
|
|
|
</project>
|