Detailed tutorial on using the tomcat8-maven-plugin plugin in Maven

Detailed tutorial on using the tomcat8-maven-plugin plugin in Maven

I searched a lot of articles online but didn't find a solution. I only found the plugin for tomcat7-maven-plugin, as follows:

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

The tomcat8-maven-plugin plugin was not found. There is no such plugin in Maven's central repository:

https://repository.apache.org/content/repositories/snapshots/org/apache/tomcat/maven/

Found a repository in mvnrepository

When adding the above dependency to POM.XML, it either prompts that the dependency cannot be found, or it cannot be downloaded. After searching for a long time, I found a solution, which is to use <pluginRepositories> in Maven. <pluginRepositories> is used to configure the plugin address. Because all functions of Maven are implemented using plugins, the plugin package needs to be downloaded from a specific address.

Add the following to POM.XML

 <pluginRepositories>  
	 <pluginRepository>  
		<id>alfresco-public</id>  
		<url>https://artifacts.alfresco.com/nexus/content/groups/public</url>  
	 </pluginRepository>  
	 <pluginRepository>  
		<id>alfresco-public-snapshots</id>  
		<url>https://artifacts.alfresco.com/nexus/content/groups/public-snapshots</url>  
		<snapshots>  
		 <enabled>true</enabled>  
		 <updatePolicy>daily</updatePolicy>  
		</snapshots>  
	 </pluginRepository>  
	 <pluginRepository>  
		<id>beardedgeeks-releases</id>  
		<url>http://beardedgeeks.googlecode.com/svn/repository/releases</url>  
	 </pluginRepository>  
 </pluginRepositories>

Add tomcat8-maven-plugin dependency

 <plugin>
     <groupId>org.apache.tomcat.maven</groupId>
     <artifactId>tomcat8-maven-plugin</artifactId>
     <version>3.0-r1655215</version>
    </plugin>

Then you can use the tomcat8-maven-plugin plug-in.

Then I found several repositories with this plugin on the Internet:

http://mvnrepository.com/artifact/org.apache.tomcat.maven/tomcat8-maven-plugin/3.0-r1655215

https://svn.apache.org/repos/asf/tomcat/maven-plugin/branches/tc8.x/

https://github.com/apache/tomcat-maven-plugin

This is the end of this article about the detailed tutorial on how to use the tomcat8-maven-plugin plugin with Maven. For more information about how to use the tomcat8-maven-plugin plugin with Maven, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • dockerfile-maven-plugin minimalist tutorial (recommended)
  • Detailed explanation of the role of the spring-boot-maven-plugin plugin

<<:  JavaScript to achieve the effect of tab bar switching

>>:  Several ways to connect tables in MySQL

Recommend

HTML+CSS to achieve surround reflection loading effect

This article mainly introduces the implementation...

Solution to the garbled problem of web pages when the encoding is set to utf-8

Recently, when I was writing web pages with PHP, I...

Alibaba Cloud domain name and IP binding steps and methods

1 Enter the Alibaba Cloud console, find the domai...

Markup language - specify CSS styles for text

Click here to return to the 123WORDPRESS.COM HTML ...

A brief discussion on using Vue to complete the mobile apk project

Table of contents Basic Configuration Entry file ...

How to implement the Vue mouse wheel scrolling switching routing effect

A root routing component (the root routing compon...

Which loop is the fastest in JavaScript?

Knowing which for loop or iterator is right for o...

Summary of common commands for building ZooKeeper3.4 middleware under centos7

1. Download and decompress 1. Introduction to Zoo...

4 Practical Tips for Web Page Design

Related articles: 9 practical tips for creating we...

Solve the scroll-view line break problem of WeChat applet

Today, when I was writing a small program, I used...

js implements the algorithm for specifying the order and amount of red envelopes

This article shares the specific code of js to im...

12 types of component communications in Vue2

Table of contents 1. props 2..sync 3.v-model 4.re...