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: 
Exclude specific pattern of file during creation of maven jar using maven-jar-plugin.

```
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-jar-plugin</artifactId>
  <version>2.3</version>
  <configuration>
    <excludes>
      <exclude>**/*.properties</exclude>
      <exclude>**/*.xml</exclude>
      <exclude>**/*.exe</exclude>
      <exclude>**/*.java</exclude>
      <exclude>**/*.xls</exclude>
    </excludes>
  </configuration>
</plugin>

```
> 
> When I create an executable jar with dependencies (using this guide), all properties files are packaged into that jar too. How to stop it from happening? Thanks.
> 
> 
> 

Properties files from where? Your main jar? Dependencies? 

In the former case, putting resources under `src/test/resources` as suggested is probably the most straight forward and simplest option. 

In the later case, you'll have to create a custom assembly descriptor with special `excludes/exclude` in the [`unpackOptions`](http://maven.apache.org/plugins/maven-assembly-plugin/assembly.html#class_unpackOptions).