My maven projects in Eclipse Luna are giving me this two warnings:
Broken single-root rule: Only one element with a deploy path of "/" is allowed for a web project or an EAR project
and
Broken single-root rule: The output folder for a web project must be /WEB-INF/classes configurations-web
This happens because the maven plugin sets the project configuration with the follow wb-resources in org.eclipse.wst.common.component
<?xml version="1.0" encoding="UTF-8"?> <project-modules id="moduleCoreId" project-version="1.5.0"> <wb-module deploy-name="sample-web"> <wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/> <wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/> <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/> <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/> <wb-resource deploy-path="/WEB-INF/classes" source-path="/.apt_generated"/> <property name="context-root" value="sample"/> <property name="java-output-path" value="/sample-web/target/classes"/> </wb-module> </project-modules>
How can I disable this validation to get rid of this annoying warnings?
This is what i did to get rid of such superfluous warning;
Window->Preferences->Validation.
Now here look for Project Structure Validation
, uncheck both (Manual and Build) and the warning will not bother anymore.
In my Gradle based Spring Boot project there are similar resource directories causing issue but not any more.
Hope this will help others.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With