How to run a Maven Project In Tomcat From Eclipse

Viewed 70853

I am running a multi level maven project. It has webapps packaged as WAR, which depend on components packaged as JAR files

Most of the code changes that i do belong to those JAR files.

To test the changes, i need to repackage the JAR and the WAR and deploy externally in tomcat.

I tried using sysdeo-tomcat-maven-eclipse plugin, but it did not work as expected.

Please advise if anyone has a solution for this problem

Thanks Gaurav

4 Answers

I use the eclipse webtools plugin, and run my Tomcat from it. It has a republish method that publishes the jars as well (if not, you just clean the directory and republish).

In the pom file, you should have the following lines so that the webtools will be supported automatically

<build>
    ...
    <plugins>
        <plugin>
            <artifactId>maven-eclipse-plugin</artifactId>
            <configuration>
                <wtpversion>1.5</wtpversion>
                ...
            </configuration>
        </plugin>
        ...
    </plugins>
    ...
</build> 
Related