pom.xml中不需要有包
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>7.0</version>
</dependency>
若xml文件没有在resouce文件夹内需要在pom.xml中加入
<!--定义资源目录,很重要-->
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>*.xml</include>
<include>*.properties</include>
<include>cn/org/cert/mapping/*.xml</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>