Maven使用tomcat8-maven-plugin插件的详细教程

2025-05-26 0 40

在网上搜索一堆文章没找到解决方法,只找到了tomcat7-mavenpluginplugin,如下:

?

1

2

3

4

5
<plugin>

<groupId>org.apache.tomcat.maven</groupId>

<artifactId>tomcat7-maven-plugin</artifactId>

<version>2.2</version>

</plugin>

并没有找到tomcat8-maven-pluginplugin,在Maven的中央仓库中根本就没有这个插件:

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

Maven使用tomcat8-maven-plugin插件的详细教程

在mvnrepository仓库中找到了一个

Maven使用tomcat8-maven-plugin插件的详细教程

把上面的依赖加入到POM.XML中要么就是提示找不到该依赖,要么就是下载不下来.找了半天找到了一个解决方法,就是使用Maven中的<pluginRepositories> ,<pluginRepositories>是用来配置插件地址的,因为maven的所有功能都是使用插件来实现功能的,因此需要从特定的地址下载插件包。

在POM.XML中加入以下内容

?

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18
<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>

加入tomcat8-maven-plugin依赖

?

1

2

3

4

5
<plugin>

<groupId>org.apache.tomcat.maven</groupId>

<artifactId>tomcat8-maven-plugin</artifactId>

<version>3.0-r1655215</version>

</plugin>

然后就能使用tomcat8-maven-plugin插件了。

然后在网上还找到了几个有这个插件的仓库:

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

到此这篇关于Maven使用tomcat8-maven-plugin插件的详细教程的文章就介绍到这了,更多相关Maven使用tomcat8-maven-plugin插件内容请搜索快网idc以前的文章或继续浏览下面的相关文章希望大家以后多多支持快网idc!

原文链接:https://blog.csdn.net/u011781521/article/details/75194071

收藏 (0) 打赏

感谢您的支持,我会继续努力的!

打开微信/支付宝扫一扫,即可进行扫码打赏哦,分享从这里开始,精彩与您同在
点赞 (0)

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。

快网idc优惠网 建站教程 Maven使用tomcat8-maven-plugin插件的详细教程 https://www.kuaiidc.com/54522.html

相关文章

发表评论
暂无评论