Couple of issues :In for my maven project in Eclipse Run as -- Run on Server is not coming. 2)So i want to run in directly in tomcat server ,wo when i try to create war the following error is coming up .please help me out , i have my web.xml in the specified path only
Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.1.1:war (default-war)
on project SchoolMgmtApp: The specified web.xml file
'F:\WorkSpace\SchoolMgmtApp\src\main\webapp\WEB-INF\web.xml' does not exist -
Using the mvn:war:exploded command, we can generate the exploded WAR as a directory inside the target directory. This is a normal directory, and all the files inside the WAR file are contained inside the exploded WAR directory.
Profiles can be activated in the Maven settings, via the <activeProfiles> section. This section takes a list of <activeProfile> elements, each containing a profile-id inside. Profiles listed in the <activeProfiles> tag would be activated by default every time a project use it.
I think the error is self-explaining. You have no web.xml
in your project. Is this intended? In theory you can have a WAR file without a web.xml
file as Servlet 3.0 supports this kind of deployments. In this case you have to configure the maven-war-plugin like this:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.2</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
Your web.xml may not be in a standard location. Some Eclipse project creation wizards put web.xml in WebContent/WEB_INF. In this case you can rearrange the project so that maven likes it, or you can tell maven where to find your web.xml in the pom.xml.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<webXml>WebContent\WEB-INF\web.xml</webXml>
...
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