On Friday 19 November 2010 5:15:05 pm KARR, DAVID (ATTSI) wrote:
> I'm converting my CXF/JAX-RS app from Ant to Maven.  I'm having some
> trouble getting through "cxf-xjc-plugin".  When I run it, I'm seeing
> this:
> 
> [ERROR] Failed to execute goal
> org.apache.cxf:cxf-xjc-plugin:2.3.0:xsdtojava (generate-sources) on
> project MyApp-war: Could not download extension artifact: Requested
> download does not exist. Failure to find javax.xml:jaxb-api:jar:2.1 in
> http://repo1.maven.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
> 
> Looking in the CXF lib directory, I see "jaxb-api-2.2.1.jar".  I wonder
> if that version difference is related to this?

No.  This looks like a problem with your JAXBXMLElementWrapperPlugin.   If you 
run a "mvn dependency:tree" or similar on that, what show up?

The issue is that the jaxb-api jar SHOULD be:

javax.xml.bind:jaxb-api:jar:2.1
not:
java.xml.jaxb-api:jar:2.1

so something funny is going on with the extension.   Most likely, all the jaxb 
related things in your extension pom should be marked 
"<scope>provided</scope>" since the plugin would provide it.

Dan



> 
> The following is my plugin element:
> ----------------------------------
>               <plugin>
>                       <groupId>org.apache.cxf</groupId>
>                       <artifactId>cxf-xjc-plugin</artifactId>
>                       <version>2.3.0</version>
>                       <executions>
>                               <execution>
>                                       <id>generate-sources</id>
>                                       <phase>generate-sources</phase>
>                                       <goals>
>                                               <goal>xsdtojava</goal>
>                                       </goals>
>                                       <configuration>
>                                        <extensions>
> 
> <extension>JAXBXMLElementWrapperPlugin:JAXBXMLElementWrapperPlugin:0.0.1
> -SNAPSHOT</extension>
>                                        </extensions>
>                                        <xsdOptions>
>                                            <xsdOption>
> 
> <xsd>${basedir}/src/main/resources/schema/serviceCallResults.xsd</xsd>
> 
> <bindingFile>${basedir}/src/main/resources/xjc/bindings.xml</bindingFile
> 
> 
> <extension>true</extension>
>                                                <extensionArgs>
> 
> <extensionArg>-Xxew</extensionArg>
> 
> <extensionArg>-summary ${basedir}/target/xew-summary.txt</extensionArg>
> 
> <extensionArg>-instantiate lazy</extensionArg>
>                                                </extensionArgs>
>                                            </xsdOption>
>                                        </xsdOptions>
>                                       </configuration>
>                               </execution>
>                       </executions>
>               </plugin>
> --------------------
> 
> The JAXBXMLElementWrapperPlugin is an artifact I built locally.

-- 
Daniel Kulp
[email protected]
http://dankulp.com/blog

Reply via email to