Explorar el Código

之前的配置未生效,重新配置 pom.xml 文件将构建得到的应用 jar 包复制到 bin 目录

reghao hace 4 años
padre
commit
2a4fdec8b2

+ 3 - 25
dagent/pom.xml

@@ -72,34 +72,12 @@
         </resources>
 
         <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-dependency-plugin</artifactId>
-                <version>3.1.2</version>
-                <executions>
-                    <execution>
-                        <id>copy-artifact</id>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>copy</goal>
-                        </goals>
-                        <configuration>
-                            <artifactItems>
-                                <artifactItem>
-                                    <groupId>${project.groupId}</groupId>
-                                    <artifactId>${project.artifactId}</artifactId>
-                                    <version>${project.version}</version>
-                                    <type>${project.packaging}</type>
-                                </artifactItem>
-                            </artifactItems>
-                            <outputDirectory>${project.build.outputDir}</outputDirectory>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
             <plugin>
                 <groupId>org.springframework.boot</groupId>
                 <artifactId>spring-boot-maven-plugin</artifactId>
+                <configuration>
+                    <outputDirectory>${project.build.outputDir}</outputDirectory>
+                </configuration>
             </plugin>
         </plugins>
     </build>

+ 5 - 2
dmaster/pom.xml

@@ -11,6 +11,10 @@
 
     <artifactId>dmaster</artifactId>
 
+    <properties>
+        <project.build.outputDir>${project.basedir}/bin</project.build.outputDir>
+    </properties>
+
     <dependencies>
         <dependency>
             <groupId>cn.reghao.autodop</groupId>
@@ -252,8 +256,7 @@
                 <groupId>org.springframework.boot</groupId>
                 <artifactId>spring-boot-maven-plugin</artifactId>
                 <configuration>
-                    <executable>true</executable>
-                    <fork>true</fork>
+                    <outputDirectory>${project.build.outputDir}</outputDirectory>
                 </configuration>
             </plugin>
         </plugins>

+ 1 - 1
dmaster/src/main/java/cn/reghao/autodop/dmaster/app/util/buildtool/packer/ZipPack.java

@@ -33,7 +33,7 @@ public class ZipPack implements CodePacker {
         }
         ZipFiles.zip(new File(binfilesDirPath), dst);
 
-        return String.format("http://localhost:4020/api/sys/package/%s", filename);
+        return String.format("http://localhost:4020/api/app/bd/dl/%s", filename);
     }
 
     @Override