Question: When I create an executable jar with dependencies (using [this guide](https://stackoverflow.com/questions/1814526/problem-building-executable-jar-with-maven/1814697#1814697)), all properties files are packaged into that jar too. How to stop it from happening? Thanks.

UPDATE: I tried to exclude them using the [Maven resources plugin](http://maven.apache.org/plugins/maven-resources-plugin/examples/include-exclude.html), but then my application won't find the properties files when I run it in Eclipse (right click on the module -> Run As -> Java Application)

UPDATE: Thanks for your useful answers. I think I'd better spend time to learn Maven, for now I just choose the simplest solution.

Answer: 
To exclude any file from a jar / target directory you can use the `<excludes>` tag in your pom.xml file.

In the next example, all files with `.properties` extension will not be included:

```xml
<build>
    <resources>
        <resource>
            <directory>src/main/resources</directory>
            <excludes>
                <exclude>*.properties</exclude>
            </excludes>
            <filtering>false</filtering>
        </resource>
    </resources>
</build>

```
Do you mean to property files located in `src/main/resources`? Then you should exclude them using the maven-resource-plugin. See the following page for details:

<http://maven.apache.org/plugins/maven-resources-plugin/examples/include-exclude.html>