1.思路,把需要的东西跟打本地jar包一样打到war的指定位置 一般是WEB-INF下的各位置,静态资源根据你自己实际路径进行配置
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <configuration> <webResources> <resource> <directory>${basedir}/src/main/resources/lib</directory> <targetPath>WEB-INF/lib/</targetPath> <includes> <include>**/*.jar</include> </includes> </resource> <resource> <directory>${basedir}/src/main/resources/lib</directory> <targetPath>WEB-INF/</targetPath> <includes> <include>**/*.xml</include> </includes> </resource> <resource> <directory>${basedir}/src/main/resources/static</directory> <targetPath>WEB-INF/</targetPath> <includes> <include>**/*.css</include> <include>**/*.js</include> <include>**/*.png</include> <include>**/*.jpg</include> </includes> </resource> </webResources> </configuration> </plugin> </plugins>