Intellij IDEA maven jar: exclude config files
Create new java maven project in IDEA. create new file resource/test.txt add new JAR artifact, check “include in project build” to exclude resource/test.txt from .jar file, add to pom.xml : <build> <resources> <resource> <directory>src/main/resources</directory> <excludes> <exclude>*</exclude> </excludes> </resource> </resources> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <version>3.3.0</version> <executions> <execution> <id>default-jar</id> <phase>package</phase> <goals> <goal>jar</goal> </goals> </execution> </executions> <configuration> <excludes> […]