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

Linux directory switching implementation code example

Switching files is a common operation in Linux. W...

WEB Chinese Font Application Guide

Using fonts on the Web is both a fundamental skill...

Summary of essential knowledge points for MySQL query optimization

Preface Query optimization is not something that ...

Differences between MySQL MyISAM and InnoDB

the difference: 1. InnoDB supports transactions, ...

Detailed explanation of persistent storage of redis under docker

In this chapter, we will start to operate redis i...

Problems installing TensorRT in docker container

Uninstall the installed version on Ubuntu: sudo a...

Vue+ElementUI implements paging function-mysql data

Table of contents 1. Problem 2. Solution 2.1 Pagi...

MySQL 5.6.27 Installation Tutorial under Linux

This article shares the installation tutorial of ...

harborRestart operation after modifying the configuration file

I won't say much nonsense, let's just loo...

Pure CSS to implement iOS style open and close selection box function

1 Effect Demo address: https://www.albertyy.com/2...

JavaScript to achieve lottery effect

This article shares the specific code of JavaScri...

Detailed explanation of common MySQL operation commands in Linux terminal

Serve: # chkconfig --list List all system service...

MySQL performance optimization tips

MySQL Performance Optimization MySQL is widely us...