LoginSignup
5
3

More than 5 years have passed since last update.

pom.xmlではpackagingはjar指定なのに、failOnMissingWebXmlのエラーが表示され続けるときの対処

Last updated at Posted at 2016-05-15

問題内容

プロジェクトでのpom.xmlの指定は、<packaging>jar</packaging>のはずなのに、意図していない「web.xmlがない」、「failOnMissingWebXmlを設定してください」という警告がeclipse上で表示され続けて、精神衛生上良くない。しかもmavenによるbuildは通るため「性が悪い」

環境

Eclipse/java

 Eclipse Version: Mars.2 Release (4.5.2)/1.8

対処方法

一旦、pom.xmlを以下の設定にします。

パッケージを、
<packaging>war</packaging>

プロパティの設定を、
<properties>
<failOnMissingWebXml>false</failOnMissingWebXml>
</properties>

ビルドすると、警告は消えます。
そのあと元の設定に戻してください。

5
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
3