You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Martin Gainty (JIRA)" <ji...@apache.org> on 2018/01/18 01:33:00 UTC

[jira] [Created] (CXF-7615) cxf-xjc-plugin

Martin Gainty created CXF-7615:
----------------------------------

             Summary: cxf-xjc-plugin
                 Key: CXF-7615
                 URL: https://issues.apache.org/jira/browse/CXF-7615
             Project: CXF
          Issue Type: Bug
          Components: JAXB Databinding
    Affects Versions: 3.2.1
         Environment: <plugin>
 <groupId>org.apache.cxf</groupId>
 <artifactId>cxf-xjc-plugin</artifactId>
 <version>3.2.1</version>
 <executions>
 <execution>
 <id>compile-xsd</id>
 <phase>generate-sources</phase>
 <goals>
 <goal>xsdtojava</goal>
 </goals>
 </execution>
 </executions>
 <configuration>
 <extensions>
 <sourceRoot>${basedir}/target/generated/src/main/java</sourceRoot>
 </extensions>
<xsdOptions>
 <xsdOption>
 <xsd>${basedir}/../activemq-spring/target/classes/activemq.xsd</xsd>
 <bindingFile>${basedir}/src/main/resources/binding.xjb</bindingFile>

in AbstractXSDToJavaMojo.run method a relative path from sourceRoot is specifiedĀ 

xsdFile=C:\Maven-plugin\activemq\activemq-parent-5.15.2\activemq-runtime-config/../activemq-spring/target/classes/activemq.xsd

appears relative path sourceRoot fubars the parserĀ 

outputDir=C:\Maven-plugin\activemq\activemq-parent-5.15.2\activemq-runtime-config\target/generated/src/main/java

later on private List<File> resolve(String artifactDescriptor)
the assignment for artifact gets mucked during split

String[] s = artifactDescriptor.split(":");
 System.out.println("AbstractXSDToJavaMojo::resolve LINE 294 s[0]="+s[0]);

/* AbstractXSDToJavaMojo::resolve LINE 294 s[0]=C */

 System.out.println("AbstractXSDToJavaMojo::resolve LINE 294 s[1]="+s[1]);
AbstractXSDToJavaMojo::resolve LINE 294 s[1]=\Maven-plugin\activemq\activemq-parent-5.15.2\activemq-runtime-config/target/generated/src/main/java

 System.out.println("AbstractXSDToJavaMojo::resolve LINE 294 s[2]="+s[2]);
/* s[2] is null */

to correct omit <sourceRoot> and insert <extension> to specify GAV for artifact
 <extensions>
 <extension>org.jvnet.jaxb2_commons:jaxb2-basics:0.6.4</extension>
 </extensions>
            Reporter: Martin Gainty


there should be logic to beg off AbstractXSDToJavaMojo::resolve if <extension> is missing



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)