2013-03-05 50 views
2

我試圖與Maven的依賴PicoContainer的

<dependency> 
    <groupId>org.jacorb</groupId> 
    <artifactId>jacorb</artifactId> 
    <version>2.3.1</version> 
</dependency> 

依賴性被解析Maven的依賴,包括,但它造成的問題與其他依賴,PicoContainer的:

[ERROR] Failed to execute goal on project s_s: Could not resolve dependencies 
for project my.package:s_s:war:1: Failed to collect dependencies for org.jacorb:jacorb:jar:2.3.1 (compile), picocontainer:picocontainer:jar:1.2 (compile)]: Failed to read artifact descriptor for picocontainer:picocontainer:jar:${picocontainer.version}: Could not transfer artifact picocontainer:picocontainer:pom:${picocontainer.version} from/to central (http://repo.maven.apache.org/maven2): IllegalArgumentException: Illegal character in path at index 65: http://repo.maven.apache.org/maven2/picocontainer/picocontainer/${picocontainer.version}/picocontainer-${picocontainer.version}.pom -> [Help 1] 

當我檢查本地回購,版本名爲${picocontainer.version}已創建。我試過包括自己的依賴:

<dependency> 
    <groupId>picocontainer</groupId> 
    <artifactId>picocontainer</artifactId> 
    <version>1.2</version> 
</dependency> 

但它沒有幫助,有人可以幫我嗎?

回答

2

好,我想通了:)我應該從org.jacorb這樣排除依賴:

<dependency> 
     <groupId>org.jacorb</groupId> 
     <artifactId>jacorb</artifactId> 
     <version>2.3.1</version> 
     <exclusions> 
      <exclusion> 
       <groupId>picocontainer</groupId> 
       <artifactId>picocontainer</artifactId> 
      </exclusion> 
      <exclusion> 
       <groupId>picocontainer</groupId> 
       <artifactId>picocontainer-tck</artifactId> 
      </exclusion> 
      <exclusion> 
       <groupId>picocontainer</groupId> 
       <artifactId>picocontainer-gems</artifactId> 
      </exclusion> 
     </exclusions> 
</dependency> 

,包括必要的一個

<dependency> 
     <groupId>picocontainer</groupId> 
     <artifactId>picocontainer</artifactId> 
     <version>1.2</version> 
    </dependency> 
    <dependency> 
     <groupId>picocontainer</groupId> 
     <artifactId>picocontainer-tck</artifactId> 
     <version>1.2</version> 
    </dependency> 
    <dependency> 
     <groupId>picocontainer</groupId> 
     <artifactId>picocontainer-gems</artifactId> 
     <version>1.2</version> 
    </dependency> 

我想這是行家損壞的神器?