I am setting up a maven web app project in eclipse, maven likes to put the webapp resources in src/main/webapp
which is a pain to navigate to because I have to click three times to get to webapp contents.
In a typical WTP eclipse project there is only WebContent and is a top level folder so only one click is needed to get into it.
Is there an eclipse or m2e trick to make the webapp show up as a top level element under the project.
If it makes your life easier, you can override the webapp directory location to hang directly off ${basedir}
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version>
<configuration>
<warSourceDirectory>${basedir}/webapp</warSourceDirectory>
</configuration>
</plugin>
Right click the webapp folder and select Build Path -> Use as Source Folder
. The folder will be presented on top (in a hierarchical package presentation). It should have no side effects to the final war.
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