Sunday, December 22, 2019

How to exclude all files in resources folder

Normally we have some files in the resources folder for our java project(s)
in some scenarios, those files are not to be included in the final jar
so the configuration below demonstrates how to exclude all files in resources with Maven.

<build>

    <!-- exclude all files in resources-->    <resources>
        <resource>
            <directory>src/main/resources</directory>
            <excludes>
                <exclude>**/**</exclude>
            </excludes>
            <filtering>false</filtering>
        </resource>
    </resources>

    <!-- other configurations/plugins in the pom.xml-->

</build>


Done!! 

2 comments:

  1. I really appreciate this great post that you have provided us. I guarantee this will benefit most people and myself. thank you very much!


    soundcloud dark mode
    twitch dark mode
    How many centimeters in a meter

    ReplyDelete
  2. Very wonderful informative article. I appreciated looking at your article. Very wonderful reveal. I would like to twit this on my followers. Many thanks!


    edublackboards
    theeducationlife
    geteducationskills
    educationisaround

    ReplyDelete

LinkWithin

Related Posts Plugin for WordPress, Blogger...