maven编译时候,不将xml文件打包到target路径下
maven下pom.xml 默认并不打包项目src下xml,properties等配置文件的。
<build>
<finalName>agentmanager</finalName>
<sourceDirectory>src/main/java</sourceDirectory>
<resources>
<!-- 控制资源文件的拷贝 -->
<resource>
<directory>src/main/resources</directory>
<excludes>
<exclude>**/jre.zip</exclude>
<exclude>**/jre.tar</exclude>
<exclude>agentmanager.jsmooth</exclude>
<exclude>assembly.xml</exclude>
</excludes>
<targetPath>${project.build.directory}</targetPath>
</resource>
<resource>
<directory>src/main/resources/conf</directory>
<targetPath>${basedir}/conf</targetPath>
<filtering>true</filtering>
</resource>
</resources>
</build>