maven war

<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>3.0.0</version>
                <configuration>
                    <webResources>
                        <resource>
                            <directory>${project.basedir}/../../../conf/xxx/plat/WEB-INF/xxx</directory>
                            <!-- 目标路径 -->
                            <targetPath>WEB-INF</targetPath>
                        </resource>

                        <resource>
                        <!-- 元配置文件的目录,相对于pom.xml file path -->
                            <directory>${project.build.directory}</directory>
                            <includes>
                                <include>${project.build.finalName}.jar</include>
                            </includes>
                            <!-- 目标路径 -->
                            <targetPath>WEB-INF/lib</targetPath>
                        </resource>
                    </webResources>
                  
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>3.0.0</version>
                <executions>
                    <execution>
                        <id>copy-dependencies</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>./target/xxxx/WEB-INF/lib/</outputDirectory>
                            <overWriteReleases>false</overWriteReleases>
                            <overWriteSnapshots>false</overWriteSnapshots>
                            <overWriteIfNewer>true</overWriteIfNewer>
                            <includeScope>compile</includeScope>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326737152&siteId=291194637