Home >Backend Development >XML/RSS Tutorial >Solution to the problem that maven project does not compile xml files

Solution to the problem that maven project does not compile xml files

黄舟
黄舟Original
2017-04-01 13:35:162445browse

Recently I am building a maven+springMVC+mybatis project. When compiling, the **Mapper.xml file generated by mybatis is always not compiled (it does not appear in the classes folder).
The solution is to add

<resources>  
                <resource>  
                    <directory>src/main/java</directory>  
                    <includes>  
                        <include>**/*.properties</include>  
                        <include>**/*.xml</include>  
                    </includes>  
                    <!-- 是否替换资源中的属性-->  
                    <filtering>false</filtering>  
                </resource>  
                <resource>  
                    <directory>src/main/resources</directory>  
                    <!--  
                        <includes> 
                           <include>**/*.properties</include>  
                           <include>**/*.xml</include> 
                        </includes> 
                      <filtering>true</filtering>  
                    -->  
                </resource>  
            </resources>
under the 5ac54a929980b32fdd2e48b6a8da067c tag of maven’s pom.xml folder

The above is the detailed content of Solution to the problem that maven project does not compile xml files. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn