If I run mvn package
, while a file — such as src/main/resources/log4j2.xml
— is open in gvim, Maven will copy the .log4j2.xml.swp
into target/classes/
and then bundle it in the target JAR.
How would I exclude anything matching the .??*
glob-pattern? The pom.xml
is fairly simple (albeit with very large list of dependencies), and, in particular, the only <plugin>
under <build>
is:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>appassembler-maven-plugin</artifactId>
<version>2.1.0</version>
<executions>
<execution>
<id>classpath-generation</id>
<phase>compile</phase>
<goals>
<goal>assemble</goal>
</goals>
<configuration>
<platforms>
<platform>unix</platform>
</platforms>
<unixScriptTemplate>src/templates/tools_env.sh</unixScriptTemplate>
<assembleDirectory>${project.build.directory}/classes</assembleDirectory>
<binFolder>.</binFolder>
<generateRepository>false</generateRepository>
<programs>
<program>
<id>tools_env.sh</id>
<mainClass>-</mainClass>
</program>
</programs>
</configuration>
</execution>
</executions>
</plugin>