In Maven how to exclude resources from the generated jar?

后端 未结 8 1153
余生分开走
余生分开走 2020-11-30 01:46

When I create an executable jar with dependencies (using this guide), all properties files are packaged into that jar too. How to stop it from happening? Thanks.

UPD

8条回答
  •  臣服心动
    2020-11-30 02:01

    Do you mean to property files located in src/main/resources? Then you should exclude them using the maven-resource-plugin. See the following page for details:

    http://maven.apache.org/plugins/maven-resources-plugin/examples/include-exclude.html

提交回复
热议问题