How to change tomcat version in Tomcat maven plugin?

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

By default this plugin gives Tomcat version 7.0.37, how can we point to Tomcat version 7.0.91? As our security team came up with some vulnerabilities for 7.0.37, we need to upgrade to 7.0.91. Is there any way we can configure the dependencies for the plugin?

aurelius :

there is a newer version of tomcat7-maven-plugin which uses the tomcat 7.0.47 version. Maybe you want to give it a try.

if you really want to update the version referenced by the plugin you can try to exclude the particular references in the plugin and add dependencies in the dependencies section for the ones you excluded.

<dependencies>
    ... 
    <dependency>
        <groupId>org.apache.tomcat</groupId>
        <artifactId>tomcat-util</artifactId>
         <version>7.0.91</version>
    </dependency>
</dependencies>

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

            <dependencies>
                <dependency>
                    <groupId>org.apache.tomcat.maven</groupId>
                    <artifactId>tomcat7-maven-plugin</artifactId>
                    <version>2.1</version>
                    <exclusions>
                        <exclusion>
                            <groupId>org.apache.tomcat</groupId>
                            <artifactId>tomcat-util</artifactId>
                        </exclusion>
                    </exclusions>
                </dependency>
            </dependencies>
        </plugin>
    <plugins>
<build>

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=95368&siteId=1