常春藤没有检索maven-wadl-plugin-1.12.jar

时间:2013-01-28 16:35:56

标签: maven ivy

我有一个项目,我正在实现Ivy,但它不会在常春藤:检索命令期间拉下一个依赖项。

ivy.xml exceprt:

    <dependency org="com.sun.jersey.contribs"   name="maven-wadl-plugin" rev="1.12" conf="support->default" >
        <!-- artifact name="maven-wadl-plugin" type="jar" /-->
        <exclude org="junit"                    module="junit" />
        <exclude org="org.apache.maven"         module="apache-maven" />
        <exclude org="org.apache.maven"         module="maven-artifact" />
        <exclude org="org.apache.maven"         module="maven-plugin-api" />
        <exclude org="xerces"                   module="xercesImpl" />
    </dependency>

我尝试过使用和不使用'排除'以确保我没有遗漏某些东西,但是当我删除排除时,它会下载比所需更多的罐子。

我使用maven-wadl-plugin.jar为休息应用程序生成WADL。我只是不确定这里到底缺少什么,但我感觉maven-wadl-plugin pom.xml和配置中有一些非常复杂的东西。

感谢您提供的任何帮助。

2 个答案:

答案 0 :(得分:0)

如果你只想要主工件,没有它的传递依赖,那么我建议按如下方式编写常春藤文件:

<dependencies>
    <dependency org="com.sun.jersey.contribs"   name="maven-wadl-plugin" rev="1.12" conf="support->master"/>
</dependencies>

神奇的是配置映射:

conf="support->master"

以下答案中描述了如何将配置映射到Maven范围:

特殊的“主”远程配置没有依赖关系,而“默认”会降低额外的编译依赖关系。

常春藤依赖报告

在相关问题上,我建议使用report任务生成依赖关系报告:

<target name="resolve" description="Use ivy to resolve classpaths">
    <ivy:resolve/>
    <ivy:report todir='build/ivy' graph='false' xml='false'/>
</target>

这将理解使用原始设置下载的42个附加文件之间的关系。

答案 1 :(得分:0)

我明白了。类型是maven-plugin。不是罐子。这就是它解决但不能检索的原因。非常感谢你的信息。

在build.xml中,我更改了ivy-retrieve,如下所示。

    <ivy:retrieve pattern="${support.dir}/[artifact]-[revision].[ext]" type="maven-plugin,jar,bundle" conf="support"/>

谢谢你。

相关问题