0

I want to exclude a specific file from the base jar while running my project (which will use the base jar as dependency)

Base project structure looks like:-

baselib
|
|----src
|     |
|     |--some packages
|     |
|     |--resources
|          | -- somefile.xml      
|     
|---target

Another project called "mycustomproject" will have "baselib" as dependency jar in pom.xml

My question i,s how to debug/run (Debug As/Run As-> Spring Boot App) the "mycustomproject" by excluding "somefile.xml" alone. I cannot remove this file in "baselib" since some one is using it.

Could someone share some inputs here?

NANDAKUMAR THANGAVELU
  • 611
  • 3
  • 15
  • 34
  • I understand you are using maven, right? You can use the resource configuration in the pom or the resources . plugin check here https://stackoverflow.com/a/5663653/2598606 – kiuby_88 Apr 04 '19 at 11:43
  • simplest solution is not to add that file in the `src/main/resources` directory. ? Apart from that I don't understand your question..? – khmarbaise Apr 04 '19 at 18:44
  • @kiuby_88 : Thx for the reply. Yes I am using maven. I tried that solution already but no luck. And that configuration will execute when building our solution right? I am sure that, the xml is not excluded when running my project. Any idea? – NANDAKUMAR THANGAVELU Apr 05 '19 at 09:55
  • @khmarbaise: Hi, Thx for the reply. That lib is used by some one else too. So modification over there will impact. Any idea? Thx. – NANDAKUMAR THANGAVELU Apr 05 '19 at 09:57
  • If you like to prevent that file in the jar you have to remove it from the project and rebuild.... – khmarbaise Apr 05 '19 at 15:22

0 Answers0