Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/370.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java SpringBootWeb应用程序的Maven构建插件_Java_Maven_Spring Boot - Fatal编程技术网

Java SpringBootWeb应用程序的Maven构建插件

Java SpringBootWeb应用程序的Maven构建插件,java,maven,spring-boot,Java,Maven,Spring Boot,我们有一个spring引导应用程序,它在使用Maven build时生成Linux发行版tar.gz文件。我们希望在使用Maven build时生成一个Windows分发文件(如.zip) 我们使用的是Spring引导容器(用我们公司自己的容器包装),默认情况下,该容器采用以下内容: <descriptors> <descriptorRef>distribution-unix</descriptorRef> </descriptors>

我们有一个spring引导应用程序,它在使用Maven build时生成Linux发行版tar.gz文件。我们希望在使用Maven build时生成一个Windows分发文件(如.zip)

我们使用的是Spring引导容器(用我们公司自己的容器包装),默认情况下,该容器采用以下内容:

<descriptors>
   <descriptorRef>distribution-unix</descriptorRef>
</descriptors>

分布式unix
因此,在进行Maven构建时会生成*tar.gz文件。我们需要编写自己的配置,为Windows操作系统生成一个*.zip文件

我对任何可以学习如何配置的示例都感兴趣

在主POM中:

<build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
</project>

org.springframework.boot
springbootmaven插件
在分配模块POM中:

<build>
        <plugins>
            <plugin>
                <groupId>com.xxxx.common</groupId>
                <artifactId>container-maven-plugin</artifactId>
                <version>${version}</version>
                <configuration>
                    <embeddedLaunchScriptRuntimeProperties>
                        <JAVA_OPTS>-Xmx1024m -XX:MaxMetaspaceSize=512m</JAVA_OPTS>
                        <RUN_ARGS>--spring.profiles.active=${active_profiles}</RUN_ARGS>
                        <PATH>${java_home}/bin:$PATH</PATH>
                    </embeddedLaunchScriptRuntimeProperties>
                </configuration>
                <executions>
                    <execution>
                        <id>assembly</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

com.xxxx.common
容器maven插件
${version}
-Xmx1024m-XX:MaxMetaspaceSize=512m
--spring.profiles.active=${active_profiles}
${java_home}/bin:$PATH
装配
包裹
单一的