2012-02-09 108 views
1

試圖與NetBeans未能建立一個Maven化項目:的Maven插件JAXB2錯誤

未能執行目標org.jvnet.jaxb2.maven2:項目MyProject的生成(默認):Maven的JAXB2-插件:0.7.5 :目標org.jvnet.jaxb2.maven2的

執行默認:Maven的JAXB2-插件:0.7.5:生成失敗:

必修課是在執行org.jvnet.jaxb2.maven2丟失:行家-jaxb2-plugin:0.7.5:generate:org/codehaus/plexus/util/DirectoryScanner

realm = plugin>org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.7.5 

strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy 

urls[0] = file:/C:/Users/user/.m2/repository/org/jvnet/jaxb2/maven2/maven-jaxb2-plugin/0.7.5/maven-jaxb2-plugin-0.7.5.jar 

urls[1] = file:/C:/Users/user/.m2/repository/org/jvnet/jaxb2/maven2/maven-jaxb2-plugin-core/0.7.5/maven-jaxb2-plugin-core-0.7.5.jar 

urls[2] = file:/C:/Users/user/.m2/repository/com/sun/org/apache/xml/internal/resolver/20050927/resolver-20050927.jar 

urls[3] = file:/C:/Users/user/.m2/repository/backport-util-concurrent/backport-util-concurrent/3.1/backport-util-concurrent-3.1.jar 

urls[4] = file:/C:/Users/user/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.11/plexus-interpolation-1.11.jar 

urls[5] = file:/C:/Users/user/.m2/repository/org/codehaus/plexus/plexus-utils/1.5.15/plexus-utils-1.5.15.jar 

urls[6] = file:/C:/Users/user/.m2/repository/junit/junit/4.8.1/junit-4.8.1.jar 

urls[7] = file:/C:/Users/user/.m2/repository/org/jfrog/maven/annomojo/maven-plugin-anno/1.3.1/maven-plugin-anno-1.3.1.jar 

urls[8] = file:/C:/Users/user/.m2/repository/org/jvnet/jaxb2/maven2/maven-jaxb22-plugin/0.7.5/maven-jaxb22-plugin-0.7.5.jar 

urls[9] = file:/C:/Users/user/.m2/repository/com/sun/xml/bind/jaxb-impl/2.2.2/jaxb-impl-2.2.2.jar 

urls[10] = file:/C:/Users/user/.m2/repository/javax/xml/bind/jaxb-api/2.2.2/jaxb-api-2.2.2.jar 

urls[11] = file:/C:/Users/user/.m2/repository/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar 

urls[12] = file:/C:/Users/user/.m2/repository/javax/activation/activation/1.1/activation-1.1.jar 

urls[13] = file:/C:/Users/user/.m2/repository/com/sun/xml/bind/jaxb-xjc/2.2.2/jaxb-xjc-2.2.2.jar 

Number of foreign imports: 1 

import: Entry[import from realm ClassRealm[maven.api, parent: null]] 

我的pom.xml看起來是這樣的:

<plugin> 
    <groupId>org.jvnet.jaxb2.maven2</groupId> 
    <artifactId>maven-jaxb2-plugin</artifactId> 
    <version>0.7.5</version> 
    <executions> 
     <execution> 
      <goals> 
       <goal>generate</goal> 
      </goals> 
     </execution> 
    </executions> 

    <configuration> 
     <schemaDirectory>src/main</schemaDirectory> 
     <schemaIncludes> 
      <include>package/aFile.xsd</include> 
     </schemaIncludes> 
     <generateDirectory>src/generated</generateDirectory> 
     <generatePackage>package.jaxb2</generatePackage> 
     <readOnly>true</readOnly> 
    </configuration> 
</plugin> 

的DirectoryScanner類是一部分叢-utils的,我已被列爲依賴關係,並安裝在我的本地庫。

編輯:顯然,一切,如果我添加了一個叢-utils的依賴爲JAXB2插件的工作原理。

回答