Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What defines the "war-ness" of my project?

Tags:

java

maven

I'm running the goal: tomcat:deploy. There are no errors, but it's not deploying my project into tomcat. I noticed this message:

[INFO] Skipping non-war project

What defines the "war-ness" of my project? How do I make my Eclipse project a war project?

Here's my plugin setting:

    <plugin>
        <groupId>org.apache.tomcat.maven</groupId>
        <artifactId>tomcat7-maven-plugin</artifactId>
        <version>2.1</version>
    </plugin>

I have my structure like this:

src > main > java 
src > main > webapp > WEB-INF > web.xml

This one works with the maven:war plugin. I'm able to build a war with this structure.

My end objective is to do away with the war building part and be able to deploy my project to tomcat with one maven command.

like image 383
Question Everything Avatar asked Dec 16 '22 12:12

Question Everything


1 Answers

Maybe you are missing the 'packaging' element in your pom.xml:

     <packaging>war</packaging>

If you don't include one, the default packaging is 'jar'.

like image 116
Stephen C Avatar answered Jan 03 '23 04:01

Stephen C