소스 검색

fix:解决打包配置错误问题

wangzaijun 7 달 전
부모
커밋
a012d4587d
6개의 변경된 파일64개의 추가작업 그리고 49개의 파일을 삭제
  1. 0 26
      pom.xml
  2. 11 0
      service-base/pom.xml
  3. 10 13
      service-calc/pom.xml
  4. 11 0
      service-daq/pom.xml
  5. 22 0
      service-deploy/pom.xml
  6. 10 10
      service-manage/pom.xml

+ 0 - 26
pom.xml

@@ -189,32 +189,6 @@
         </dependencies>
     </dependencyManagement>
 
-<!--    <build>-->
-<!--        <plugins>-->
-<!--            <plugin>-->
-<!--                <groupId>org.apache.maven.plugins</groupId>-->
-<!--                <artifactId>maven-compiler-plugin</artifactId>-->
-<!--                <version>3.1</version>-->
-<!--                <configuration>-->
-<!--                    <source>${java.version}</source>-->
-<!--                    <target>${java.version}</target>-->
-<!--                    <encoding>${project.build.sourceEncoding}</encoding>-->
-<!--                    <compilerArgs>-->
-<!--                        <arg>-parameters</arg>-->
-<!--                    </compilerArgs>-->
-<!--                </configuration>-->
-<!--            </plugin>-->
-<!--        </plugins>-->
-<!--    </build>-->
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.springframework.boot</groupId>
-                <artifactId>spring-boot-maven-plugin</artifactId>
-            </plugin>
-        </plugins>
-    </build>
-
     <repositories>
         <repository>
             <id>public</id>

+ 11 - 0
service-base/pom.xml

@@ -11,6 +11,8 @@
     <modelVersion>4.0.0</modelVersion>
     <artifactId>service-base</artifactId>
     <description>核心模块</description>
+    <version>1.0.0</version>
+    <packaging>jar</packaging>
 
     <dependencies>
         <!-- 引入web依赖,但是排除启动容器 -->
@@ -173,4 +175,13 @@
             <artifactId>spring-boot-starter-quartz</artifactId>
         </dependency>
     </dependencies>
+
+<!--    <build>-->
+<!--        <plugins>-->
+<!--            <plugin>-->
+<!--                <groupId>org.springframework.boot</groupId>-->
+<!--                <artifactId>spring-boot-maven-plugin</artifactId>-->
+<!--            </plugin>-->
+<!--        </plugins>-->
+<!--    </build>-->
 </project>

+ 10 - 13
service-calc/pom.xml

@@ -11,6 +11,8 @@
     <modelVersion>4.0.0</modelVersion>
     <artifactId>service-calc</artifactId>
     <description>数据采集计算模块</description>
+    <version>1.0.0</version>
+    <packaging>jar</packaging>
 
     <dependencies>
         <dependency>
@@ -19,17 +21,12 @@
         </dependency>
     </dependencies>
 
-    <repositories>
-        <repository>
-            <id>smppw-release</id>
-            <url>http://120.24.213.180:8081/nexus/content/repositories/releases/</url>
-        </repository>
-        <repository>
-            <id>smppw-snapshots</id>
-            <url>http://120.24.213.180:8081/nexus/content/repositories/snapshots/</url>
-            <snapshots>
-                <enabled>true</enabled>
-            </snapshots>
-        </repository>
-    </repositories>
+<!--    <build>-->
+<!--        <plugins>-->
+<!--            <plugin>-->
+<!--                <groupId>org.springframework.boot</groupId>-->
+<!--                <artifactId>spring-boot-maven-plugin</artifactId>-->
+<!--            </plugin>-->
+<!--        </plugins>-->
+<!--    </build>-->
 </project>

+ 11 - 0
service-daq/pom.xml

@@ -11,6 +11,8 @@
     <modelVersion>4.0.0</modelVersion>
     <artifactId>service-daq</artifactId>
     <description>数据采集</description>
+    <version>1.0.0</version>
+    <packaging>jar</packaging>
 
     <dependencies>
         <dependency>
@@ -26,4 +28,13 @@
             <artifactId>pdfbox-io</artifactId>
         </dependency>
     </dependencies>
+
+<!--    <build>-->
+<!--        <plugins>-->
+<!--            <plugin>-->
+<!--                <groupId>org.springframework.boot</groupId>-->
+<!--                <artifactId>spring-boot-maven-plugin</artifactId>-->
+<!--            </plugin>-->
+<!--        </plugins>-->
+<!--    </build>-->
 </project>

+ 22 - 0
service-deploy/pom.xml

@@ -12,6 +12,7 @@
     <version>1.0.0</version>
     <name>service-deploy</name>
     <description>数据采集系统入口</description>
+    <packaging>jar</packaging>
 
     <dependencies>
         <dependency>
@@ -64,6 +65,27 @@
             <plugin>
                 <groupId>org.springframework.boot</groupId>
                 <artifactId>spring-boot-maven-plugin</artifactId>
+                <configuration>
+                    <mainClass>com.simuwang.Application</mainClass> <!-- 指定主类 -->
+                    <layout>JAR</layout> <!-- 可选,指定打包布局,默认为ZIP -->
+                    <executable>true</executable> <!-- 使Jar可执行 -->
+                    <includeSystemScope>true</includeSystemScope> <!-- 包括system范围内的依赖 -->
+<!--                    <assembly>-->
+<!--                        <descriptorRef>jar-with-dependencies</descriptorRef>-->
+<!--                        <archive>-->
+<!--                            <manifest>-->
+<!--                                <mainClass>com.simuwang.Application</mainClass> &lt;!&ndash; 再次指定主类 &ndash;&gt;-->
+<!--                            </manifest>-->
+<!--                        </archive>-->
+<!--                    </assembly>-->
+                </configuration>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>repackage</goal>
+                        </goals>
+                    </execution>
+                </executions>
             </plugin>
         </plugins>
     </build>

+ 10 - 10
service-manage/pom.xml

@@ -11,22 +11,22 @@
     <modelVersion>4.0.0</modelVersion>
     <artifactId>service-manage</artifactId>
     <description>数据采集系统后台管理模块</description>
+    <version>1.0.0</version>
+    <packaging>jar</packaging>
 
     <dependencies>
         <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-web</artifactId>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.springframework.boot</groupId>
-                    <artifactId>spring-boot-starter-tomcat</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
             <groupId>com.simuwang</groupId>
             <artifactId>service-base</artifactId>
         </dependency>
     </dependencies>
 
+<!--    <build>-->
+<!--        <plugins>-->
+<!--            <plugin>-->
+<!--                <groupId>org.springframework.boot</groupId>-->
+<!--                <artifactId>spring-boot-maven-plugin</artifactId>-->
+<!--            </plugin>-->
+<!--        </plugins>-->
+<!--    </build>-->
 </project>