title: How to change port number for tomcat server using maven
body: <p>I am writing a Rest service using spring mvc framework and maven. I am using tomcat server for now. My pom for the project is </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0"      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0     http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
  &lt;groupId&gt;org.springframework&lt;/groupId&gt;
  &lt;artifactId&gt;gs-rest-service&lt;/artifactId&gt;
  &lt;version&gt;0.1.0&lt;/version&gt;
  
  &lt;parent&gt;
      &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
      &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
      &lt;version&gt;1.2.5.RELEASE&lt;/version&gt;
  &lt;/parent&gt;
  
  &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
  
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  
  &lt;properties&gt;
      &lt;java.version&gt;1.8&lt;/java.version&gt;
  &lt;/properties&gt;
  
  
  &lt;build&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
          &lt;/plugin&gt;
  
      &lt;/plugins&gt;
  
  &lt;/build&gt;
  
  &lt;repositories&gt;
      &lt;repository&gt;
          &lt;id&gt;spring-releases&lt;/id&gt;
          &lt;url&gt;https://repo.spring.io/libs-release&lt;/url&gt;
      &lt;/repository&gt;
  &lt;/repositories&gt;
  &lt;pluginRepositories&gt;
      &lt;pluginRepository&gt;
          &lt;id&gt;spring-releases&lt;/id&gt;
          &lt;url&gt;https://repo.spring.io/libs-release&lt;/url&gt;
      &lt;/pluginRepository&gt;
  &lt;/pluginRepositories&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>This project uses tomcat server and runs on port 8080 by default. can anyone help me understand from where it picks up this configuration and how to change the port on which tomcat runs.</p>
  
  <p>My preliminary analysis tells me there is some configuration done in spring.boot plugin that I need to override in my pom. Can anyone help me in overriding tomcat default port and run it on some other port.</p>