1

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.

silver
  • 5,023
  • 15
  • 55
  • 90

1 Answers1

2

This should work.

#Ignore everything in target folder
/target/*

#Don't ignore jar
!/target/my-application-*-standalone.jar
Tejas Anil Shah
  • 1,231
  • 9
  • 18