How To Run tomcat7-maven-plugin On Different Port Then 8080 ?

How To Run tomcat7-maven-plugin On Different Port Then 8080 ?

This post tells the needed command  to run tomcat7-maven-plugin On Different Port then 8080.

Usually the built project (war) via MVN with tomcat7 plugin used to be run with command

: mvn tomcat7:run  , On this it takes default port as 8080

But in a situation where it require to change the port other than 8080 then add the following option :  -Dmaven.tomcat.port=8181

So overall command line : mvn  tomcat7:run -Dmaven.tomcat.port=8181 ( if running from command line)

This is how its configured on Idea Intellij:

Customized Port Command for Tomcat7 Maven Plugin
Customized Port Command for Tomcat7 Maven Plugin

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s