2015-09-01 113 views
0

我試圖生成通過使用WSDL URL的模式,但失敗了,得到這個錯誤代碼:Maven的JAXB2-插件無法生成WSDL架構

Execution default of goal org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.12.3:generate failed: Plugin org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.12.3 or one of its dependencies could not be resolved: The following artifacts could not be resolved: org.jvnet.jaxb2.maven2:maven-jaxb22-plugin:jar:0.12.3, org.glassfish.jaxb:jaxb-runtime:jar:2.2.11, org.glassfish.jaxb:jaxb-xjc:jar:2.2.11, org.apache.maven.plugin-tools:maven-plugin-annotations:jar:3.2: Failure to transfer org.jvnet.jaxb2.maven2:maven-jaxb22-plugin:jar:0.12.3 from http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.jvnet.jaxb2.maven2:maven-jaxb22-plugin:jar:0.12.3 from/to central (http://repo.maven.apache.org/maven2): The operation was cancelled. (org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.12.3:generate:default:generate-sources)

我POM:

  <plugin> 
      <groupId>org.jvnet.jaxb2.maven2</groupId> 
      <artifactId>maven-jaxb2-plugin</artifactId> 
      <version>0.12.3</version> 
      <executions> 
       <execution> 
        <goals> 
         <goal>generate</goal> 
        </goals> 
       </execution> 
      </executions> 
      <configuration> 
       <schemaLanguage>WSDL</schemaLanguage> 
       <generatePackage>soap.test</generatePackage> 
       <schemas> 
        <schema> 
         <url>http://www.webservicex.com/globalweather.asmx?wsdl</url> 
        </schema> 
       </schemas> 
      </configuration> 
     </plugin> 

我試圖降級版本,但我仍然有同樣的錯誤。

有什麼建議嗎?

在此先感謝。

回答

0

您的本地Maven存儲庫似乎有問題。找到您的存儲庫文件夾並刪除org/jvnet/jaxb2/maven2下的所有內容。

0

嘗試沒有版本:

<plugin> 
    <groupId>org.jvnet.jaxb2.maven2</groupId> 
    <artifactId>maven-jaxb2-plugin</artifactId> 
      <executions> 
       <execution> 
        <goals> 
         <goal>generate</goal> 
        </goals> 
       </execution> 
      </executions> 
      <configuration> 
       <schemaLanguage>WSDL</schemaLanguage> 
       <generatePackage>com.concretepage.wsdl</generatePackage> 
       <forceRegenerate>true</forceRegenerate> 
       <schemas> 
        <schema> 
         <url>http://www.webservicex.com/globalweather.asmx?wsdl</url> 
        </schema> 
       </schemas> 
      </configuration> 
     </plugin> 
相關問題