exclude files from jar or war in eclipse

前端 未结 4 1929
别那么骄傲
别那么骄傲 2020-12-01 22:01

Is there a way to tell Eclipse to not include specified files, directories, or patterns in a JAR or WAR?

4条回答
  •  攒了一身酷
    2020-12-01 22:03

    You can specify includes and excludes by opening the Project Properties (alt-enter) then opening Java Build Path and the Source tab. Against each source location there is a little plus sign, click on that then select Included or Excluded then select the Edit... button.

    source path screenshot http://help.eclipse.org/ganymede/topic/org.eclipse.jdt.doc.user/gettingStarted/images/qs-WorkingWithExistingLayout26.png

    You can then specify multiple patterns for files to be included/excluded. These files will not be processed to the output directory. The patterns follow Ant's wildcard patterns so you have quite fine-grained control over what to include.


    (source: eclipse.org)

提交回复
热议问题