[ 
https://jira.codehaus.org/browse/JIBX-468?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=284602#comment-284602
 ] 

Klaus Claszen commented on JIBX-468:
------------------------------------

As a workaround, you could try to unpack the xsd from the artifact with the 
[unpack-dependencies|http://maven.apache.org/plugins/maven-dependency-plugin/usage.html#The_dependency:unpack-dependencies_mojo]
 goal of the 
[maven-dependency-plugin|http://maven.apache.org/plugins/maven-dependency-plugin/unpack-dependencies-mojo.html]
 and use the unpacked version in your xs:import definition.
{code}
<plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
                <execution>
                        <id>unpack-xsd</id>
                        <phase>initialize</phase>
                        <goals>
                                <goal>unpack-dependencies</goal>
                        </goals>
                        <configuration>
                                <includeArtifactIds>foo-bar</includeArtifactIds>
                                <includes>foo-bar.xsd</includes>
                                
<outputDirectory>${basedir}/src/main/config/xsd</outputDirectory>
                                <overWriteReleases>false</overWriteReleases>
                                <overWriteSnapshots>true</overWriteSnapshots>
                        </configuration>
                </execution>
        </executions>
</plugin>
{code}

> Allow JibX to find additional schema XSDs in third party JAR
> ------------------------------------------------------------
>
>                 Key: JIBX-468
>                 URL: https://jira.codehaus.org/browse/JIBX-468
>             Project: JiBX
>          Issue Type: New Feature
>          Components: CodeGen
>    Affects Versions: JiBX 1.2.3
>         Environment: Maven 3, latest JIBx
>            Reporter: gregory bonk
>
> We are interested in moving from JAXB to JibX.  Our problem is that it 
> appears that JibX will not lookfor/resove XSDs in other third party JARs or 
> on the classpath.  A third party provides us a JAR file with schema XSDs that 
> we import into our main XSD with '<xs:import'.
> When the code gen is running in JibX it can't find the XSD becuase it's in a 
> JAR.  The maven-jaxb2-plugin lets us supply a list of JAR files that then are 
> searched when there's an import that can't be resolved locally.  
> We would like this functionality to be implemented into the Maven 2 JiBX 
> Plugin.  Doesn't have to be quite as fancy, just that we need a classpath 
> option as well and a server URI.
> See how they do it in JAXb:  
> http://confluence.highsource.org/display/MJIIP/User+Guide#UserGuide-Usingcatalogs

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
jibx-devs mailing list
jibx-devs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-devs

Reply via email to