如何为tomcat Maven插件添加存储库 [英] How to add repository for tomcat maven plugin

查看:109
本文介绍了如何为tomcat Maven插件添加存储库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何包含找到的tomcat Maven插件的存储库这里)?我在中央Maven存储库中找不到2.0版,因此我想我必须自己包含它.我没有在我的pom.xml文件中这样做的运气.有什么想法,如果这是错误的语法?

How do I include the repository for the tomcat maven plugin found here)? I can't find version 2.0 in the central maven repository so I am guessing I have to include it myself. I am not getting luck doing that in my pom.xml file. Any ideas if this is the wrong syntax?

<pluginRepositories>
    <pluginRepository>
        <id>maven-tomcat</id>
        <url>http://svn.apache.org/repos/asf/tomcat/maven-plugin/trunk/tomcat-maven-plugin</url>
    </pluginRepository>
</pluginRepositories>

<plugin>
    <groupId>org.apache.tomcat.maven</groupId>
    <artifactId>tomcat-maven-plugin</artifactId>
    <version>2.0-SNAPSHOT</version>
</plugin>

这是我执行tomcat:run目标时得到的警告:

This is the warning that I get when I execute the tomcat:run goal:

用于的POM org.apache.tomcat.maven:tomcat-maven-plugin:jar:2.0-SNAPSHOT是 丢失,没有可用的依赖项信息

The POM for org.apache.tomcat.maven:tomcat-maven-plugin:jar:2.0-SNAPSHOT is missing, no dependency information available

推荐答案

似乎此插件在maven中央存储库中,因此您只需要在pom中对其进行配置(如果您需要覆盖插件的默认配置值) .

It seems this plugin is in the maven central repository, so you only need to configure it in your pom (if you need to overwrite the plugin's default configuration values).

该svn地址不适合该地址,它是此插件的源代码所在的地址,而不是二进制文件. Maven希望在那里有一个Maven插件存储库的地址.这些二进制文件位于默认存储库中,并且在调用其目标之一时,Maven将自动下载任何需要的依赖项.例如mvn tomcat:deploy

That svn address doesn't fit there, it's the address where source code for this plugin is, not the binaries. Maven expects the address of a Maven Plugin repository there. The binaries are in the default repository and Maven will download any needed dependencies automatically when invoking one of its goals. For instance mvn tomcat:deploy

此处,您可以找到如何在pom.xml中进行配置.

Here you can find how to configure it in your pom.xml.

此处您可以找到其目标以及使用方法.

And here you can find its goals and how to use it.

这篇关于如何为tomcat Maven插件添加存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆