maven-war-plugins插件导致的代码不更新

因为pom文件中添加改配置进行war打包的操作,后续的开发过程中新增的代码无法自动更新到编译文件夹中,删除代码projectClean均无法进行更新和自动编译,删除该部分配置clean正常,项目正常。

<!--设置maven-war-plugins插件,否则外部依赖无法打进war包 -->
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-war-plugin</artifactId>
    <configuration>
        <webResources>
            <resource>
                <directory>lib</directory>
                <targetPath>WEB-INF/lib/</targetPath>
                <includes>
                    <include>**/*.jar</include>
                </includes>
            </resource>
        </webResources>
        <failOnMissingWebXml>false</failOnMissingWebXml>
    </configuration>
</plugin>

下面看下具体剩下的配置:

<build>
<plugins>
    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
            <source>1.8</source>
            <target>1.8</target>
            <skip>true</skip>
        </configuration>
    </plugin>
    <plugin>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-maven-plugin</artifactId>
        <configuration>
            <!-- 系统jar包 -->
            <includeSystemScope>true</includeSystemScope>
            <skip>false</skip>
        </configuration>
        <executions>
            <execution>
                <goals>
                    <goal>repackage</goal>
                </goals>
            </execution>
        </executions>
    </plugin>
</plugins>
</build>

maven-war-plugins插件导致的代码不更新
https://blog.jeecloud.cn/2019/04/01/20190402065300/
作者
pshgao
发布于
2019年4月2日
许可协议