Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xjc fails when two xsd files share a type #58

Open
axlsml opened this issue Jun 29, 2023 · 1 comment
Open

xjc fails when two xsd files share a type #58

axlsml opened this issue Jun 29, 2023 · 1 comment

Comments

@axlsml
Copy link

axlsml commented Jun 29, 2023

I am unable to generate java classes for the ITxPT spec. But the files can be generated individually. It seems to be a problem with the type IPv4Type that is used in both SubscribeRequestMessage.xsd and UnsubscribeRequestMessage.xsd

The failure message I am getting is:

2023-06-29T12:18:53.343+0200 [INFO] [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:jaxb] failure in the XJC task. Use the Ant -verbose switch for more details

To reproduce the issue:

plugins {
    id 'com.intershop.gradle.jaxb' version '6.0.0'
}

jaxb {
     javaGen {
        itxpt {
            schemas = fileTree("xsd/")
            packageName = "itxpt"
        }
    }
}
@meshpaul
Copy link

I think the work-around could be adding config element to resolve these and package name need to be set to empty so XJC will genereate using default package settings see

jaxb {
     javaGen {
        itxpt {
            schemas = fileTree("xsd/")
            packageName = ""
            arg("-XautoNameResolution")
        }
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants