Q:

How to include logger configuration as separate file in maven assembly

I've got a Maven (Java) project in which I am using the Logback logger, using a file logback.xml to configure the logger. Currently, logback.xml resides in src/main/resources. This makes sure that when I execute the project from Eclipse, that logger configuration is automatically included in the jar file and used at runtime.
However, I also want to create a binary distribution of my project (using the assembly plugin), in which the logger configuration should be available outside the jar file (e.g. in a separate conf/ directory). I'm struggling with the best way to set this up. 
Including the file separately is not the issue (I can use a simple fileSet or file directive in the assembly descriptor for that), but I am unsure how I can make the assembly create a jar file for my project that does not include the logback.xml file.
The only way that I can think of is to move the file from src/main/resources/ so it won't be included in the jar, and instead add it into the target/ directory to make sure it is included on Eclipse's runtime classpath (and then copy it from there explicitly in the assembly descriptor). I'm reluctant to have any checked-in files in target/ though, so was hoping there was a better way to do this. 

A:

I have just figured it out, rather simple really.
I fixed it by adding a configuration for the maven-jar-plugin to my project's pom:
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-jar-plugin</artifactId>
            <version>2.4</version>
            <configuration>
                <excludes>
                    <exclude>**/logback.xml</exclude>
                </excludes>
            </configuration>
        </plugin>

This makes sure that although the file is still available for Eclipse's runtime classpath (in target/classes), it is not included when a jar is produced for my project.

