標記爲排除常春藤不容忽視罐子這是我的ivy.xml:在POM
<dependencies defaultconf="default">
<dependency org="com.mycompany" name="custom" rev="1.0"/>
</dependencies>
ivysettings.xml:
<ivysettings>
<settings defaultResolver="repo.mycompany.com" />
<resolvers>
<ibiblio name="repo.mycompany.com" root="http://repo.mycompany.com/maven/" m2compatible="true" usepoms="true" />
</resolvers>
</ivysettings>
神器com.mycompany:自定義:1.0作爲Maven POM文件創建和發佈到repo.mycompany.com:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany</groupId>
<artifactId>custom</artifactId>
<version>1.0</version>
<packaging>pom</packaging>
<dependencies>
<dependency>
<artifactId>commons-logging</artifactId>
<groupId>commons-logging</groupId>
<version>1.1</version>
<exclusions>
<exclusion>
<groupId>logkit</groupId>
<artifactId>logkit</artifactId>
</exclusion>
<exclusion>
<groupId>avalon-framework</groupId>
<artifactId>avalon-framework</artifactId>
</exclusion>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</project>
Wheh我下載常春藤庫有這樣的代碼:
排除10<target name="ivy-init">
<mkdir dir="${internal-libs}"/>
<ivy:settings file="${ivy.settings.dir}/ivysettings.xml"/>
<ivy:retrieve pattern="${internal-libs}/[artifact]-[revision].[ext]" sync="true" />
</target>
常春藤下載的DEP阿瓦隆框架:阿瓦隆框架:4.1.3和logkit:logkit:1.0.1
爲什麼?我把它排除在pom上!
如何排除它與常春藤,保持相同的簡單ivy.xml?
你使用哪個版本的ivy? – oers
它可能是這個[bug](https://issues.apache.org/jira/browse/IVY-974)它在2.1 – oers