> -----Original Message-----
> From: Daniel Kulp [mailto:[email protected]]
> Sent: Friday, November 19, 2010 2:52 PM
> To: [email protected]
> Cc: KARR, DAVID (ATTSI)
> Subject: Re: cxf-xjc-plugin fails with "Failure to find
javax.xml:jaxb-
> api:jar:2.1"
> 
> 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.

Ok, looks good.

After I implemented this, I see that there's still something wrong with
the configuration of the extension.  I now see:

[ERROR] Failed to execute goal
org.apache.cxf:cxf-xjc-plugin:2.3.0:xsdtojava (generate-sources) on
project SunlightDataService-war: unrecognized parameter -Xxew -> [Help
1]

I've run it "-X" and that didn't show me any obvious problems.  For
instance, this section seems to be all ok:
---------------------------
[DEBUG] Configuring mojo org.apache.cxf:cxf-xjc-plugin:2.3.0:xsdtojava
from plugin realm ClassRealm[plugin>org.apache.cxf:cxf-xjc-plugin:2.3.0,
parent: ClassRealm[maven.api, parent: null]]
[DEBUG] Configuring mojo 'org.apache.cxf:cxf-xjc-plugin:2.3.0:xsdtojava'
with basic configurator -->
[DEBUG]   (f) extensions =
[JAXBXMLElementWrapperPlugin:JAXBXMLElementWrapperPlugin:0.0.1-SNAPSHOT]
[DEBUG]   (f) localRepository =        id: local
      url: file:///.../.m2/repository/
   layout: none

[DEBUG]   (f) markerDirectory = ...\target\cxf-xsd-plugin-markers
[DEBUG]   (f) project = MavenProject: MyApp:MyApp-war:0.0.1-SNAPSHOT @
...\MyApp\pom.xml
[DEBUG]   (f) remoteArtifactRepositories = [       id: central
      url: http://repo1.maven.org/maven2
   layout: default
snapshots: [enabled => false, update => daily]
 releases: [enabled => true, update => daily]
]
[DEBUG]   (f) sourceRoot = ...\MyApp\target/generated/src/main/java
[DEBUG]   (s) xsd =
...\MyApp/src/main/resources/schema/serviceCallResults.xsd
[DEBUG]   (s) bindingFile =
...\MyApp/src/main/resources/xjc/bindings.xml
[DEBUG]   (s) extension = true
[DEBUG]   (s) extensionArgs = [-Xxew, -summary
...\MyApp/target/xew-summary.txt, -instantiate lazy]
[DEBUG]   (f) xsdOptions =
[org.apache.cxf.maven_plugin.xsdopt...@1ad0839]
[DEBUG] -- end configuration --
---------------------------------

Reply via email to