zoukankan      html  css  js  c++  java
  • maven 资源导出失败问题

    在pom.xml中加入如下代码,父子都行

    <build>
        <resources>
            <resource>
                <directory>src/main/resource(资源目录)</directory>
                <includes>
                    <include>**/*.xml</include>
                    <include>**/*.properties</include>
                </includes>
            </resource>
            <resource>
                <directory>src/main/java</directory>
                <includes>
                    <include>**/*.properties</include>
                    <include>**/*.xml</include>
                </includes>
            </resource>
        </resources>
    </build>
    
    <!--在build中配置resources,来防止我们资源导出失败的问题-->
    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <excludes>
                    <exclude>**/*.properties</exclude>
                    <exclude>**/*.xml</exclude>
                </excludes>
                <filtering>false</filtering>
            </resource>
            <resource>
                <directory>src/main/java</directory>
                <includes>
                    <include>**/*.properties</include>
                    <include>**/*.xml</include>
                </includes>
                <filtering>false</filtering>
            </resource>
        </resources>
    </build>
    
    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <includes>
                    <include>**/*.properties</include>
                    <include>**/*.xml</include>
                </includes>
                <filtering>true</filtering>
            </resource>
            <resource>
                <directory>src/main/java</directory>
                <includes>
                    <include>**/*.properties</include>
                    <include>**/*.xml</include>
                </includes>
                <filtering>true</filtering>
            </resource>
        </resources>
    </build>
    
  • 相关阅读:
    Mysql的transaction实现(转)
    开启博客模式。
    chromium获取代码和编译
    Chrome的Crash Report服务
    chromiun 学习《二》 目录结构 +启动流程
    CreateCompatibleDC与BitBlt 学习
    字符编码
    chromiun 学习《一》
    毕业后的一段日子
    学习计划
  • 原文地址:https://www.cnblogs.com/chaostudy/p/12966330.html
Copyright © 2011-2022 走看看