打war包copy文件之maven-war-plugin
1 <plugin> 2 <groupId>org.apache.maven.pluginsgroupId> 3 <artifactId>maven-war-pluginartifactId> 4 <version>2.1.1version> 5 <configuration> 6 <webResources> 7 <resource> 8 <directory>${basedir}/DBdirectory> 9 <targetPath>/DBtargetPath> 10 resource> 11 webResources> 12 configuration> 13 plugin>
另一种方法如下,文件上传的位置会在class目录下
<build> <resources> <resource> <directory>../DBdirectory> <targetPath>/DBtargetPath> <resource> resources> build>