Maven - exclude folder from build

Cheetah

Trying to exlcude a folder src/main/resources/scripts/ from my build but the following does not work:

<build>
    <resources>
        <resource>
            <directory>src/main/resources</directory>
            <excludes>
                <exclude>src/main/resources/scripts/</exclude>
            </excludes>
        </resource>
    </resources>

    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.1</version>
            <configuration>
                <excludes>
                    <exclude>src/main/resources/scripts/</exclude>
                </excludes>
                <source>1.7</source>
                <target>1.7</target>
            </configuration>
        </plugin>
    </plugins>
</build>

Any ideas?

Robert Scholte

Instead try:

<exclude>scripts/**</exclude>

The exclude is based on directory, so your construction would exclude

src/main/resources/src/main/resources/scripts

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to exclude a file/folder from Build in MonoDevelop

From Dev

Exclude META-INF/maven folder from the generated jar file

From Dev

How to exclude a file\folder from SVN monitoring in Jenkins build

From Dev

Visual Studio 2015 Cordova exclude folder from build

From Dev

How to exclude a file\folder from SVN monitoring in Jenkins build

From Dev

Eclipse - exclude file / folder from triggering workspace refresh after build

From Dev

Visual Studio 2015 Cordova exclude folder from build

From Dev

should I exclude source folder from build path (in Eclipse)

From Dev

Maven -pl !<module> doesn't exclude submodules of <module> from the build

From Dev

Exclude folder Intel XDK on build

From Dev

Exclude from build in CLion

From Dev

Exclude logs folder in Maven/Intellij Idea project

From Dev

How to exclude target folder from maven source packages generated with mvn deploy?

From Dev

How to exclude a folder from rsync

From Dev

Exclude folder from Recurse in Powershell

From Dev

How to exclude a folder from rsync

From Dev

Exclude folder from mobile redirect

From Dev

How to exclude a folder from rsync

From Dev

Maven: include folder in resource folder in the war build

From Dev

Maven: include folder in resource folder in the war build

From Dev

Include a library while programming & compiling, but exclude from build, in NetBeans Maven-based project

From Dev

maven: exclude jar from JDK

From Dev

Exclude folders and files from build

From Dev

Exclude folders and files from build

From Dev

Exclude .bak files from build

From Dev

Duplicate WEB-INF folder created with maven build with package goal from Eclipse Kepler

From Dev

Exclude folder from Analyze > Run Inspection by Name

From Dev

Exclude project\folder from "Navigate Files" in IntelliJ

From Dev

Gradle: Exclude file from Android assets folder

Related Related

  1. 1

    How to exclude a file/folder from Build in MonoDevelop

  2. 2

    Exclude META-INF/maven folder from the generated jar file

  3. 3

    How to exclude a file\folder from SVN monitoring in Jenkins build

  4. 4

    Visual Studio 2015 Cordova exclude folder from build

  5. 5

    How to exclude a file\folder from SVN monitoring in Jenkins build

  6. 6

    Eclipse - exclude file / folder from triggering workspace refresh after build

  7. 7

    Visual Studio 2015 Cordova exclude folder from build

  8. 8

    should I exclude source folder from build path (in Eclipse)

  9. 9

    Maven -pl !<module> doesn't exclude submodules of <module> from the build

  10. 10

    Exclude folder Intel XDK on build

  11. 11

    Exclude from build in CLion

  12. 12

    Exclude logs folder in Maven/Intellij Idea project

  13. 13

    How to exclude target folder from maven source packages generated with mvn deploy?

  14. 14

    How to exclude a folder from rsync

  15. 15

    Exclude folder from Recurse in Powershell

  16. 16

    How to exclude a folder from rsync

  17. 17

    Exclude folder from mobile redirect

  18. 18

    How to exclude a folder from rsync

  19. 19

    Maven: include folder in resource folder in the war build

  20. 20

    Maven: include folder in resource folder in the war build

  21. 21

    Include a library while programming & compiling, but exclude from build, in NetBeans Maven-based project

  22. 22

    maven: exclude jar from JDK

  23. 23

    Exclude folders and files from build

  24. 24

    Exclude folders and files from build

  25. 25

    Exclude .bak files from build

  26. 26

    Duplicate WEB-INF folder created with maven build with package goal from Eclipse Kepler

  27. 27

    Exclude folder from Analyze > Run Inspection by Name

  28. 28

    Exclude project\folder from "Navigate Files" in IntelliJ

  29. 29

    Gradle: Exclude file from Android assets folder

HotTag

Archive