I have a maven project:
...
target/
|__ my-application-1.0.0-standalone.jar
I would like to ignore everything in the target folder except for the JAR file that matches the pattern:
my-application-<version>-standalone.jar
I need to include a specific pattern as above.
This should work.
#Ignore everything in target folder
/target/*
#Don't ignore jar
!/target/my-application-*-standalone.jar