We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi,
It seems in my example , xsd2java is not taking option parameter value when it's generating code
here is my example
xsd2java { def contractDir = "$buildDir/extractedContracts" File perContract = new File("$contractDir/Enterprise.xsd") File adContract = new File("$contractDir/AdFpc.xsd") File adListContract = new File("$contractDir/AdListData.xsd")
xsdsToGenerate = [ [file("$perContract"), 'com.performance.contract',[value:"-Xtbs -XautoNameResolution"]], [file("$adContract"), 'ad.contract',[value:"-Xtbs -XautoNameResolution"]], [file("$adListContract"), 'ad.list.contract',[value:"-Xtbs -XautoNameResolution"]], ] generatedXsdDir = file(project.ext.generatedSrcDir) }
-Xtbs generate equals, hashcode and toString method.
while it's successfully generating using below code.
task generateSources << { def genSrcDir = new File(project.ext.generatedSrcDir) genSrcDir.mkdirs() def perContractJar = configurations.generate.find { it.name.equals("per-contract-1.0.0-18.jar") } def aeroContractJar = configurations.generate.find { it.name.equals("aero1.0.0-11.jar") } ant.taskdef(name: 'xjc', classname: 'com.sun.tools.xjc.XJC2Task', classpath: configurations.generate.asPath) ant.xjc(package: 'com.performance.contract', destdir: project.ext.generatedSrcDir, extension: 'true', schema: "jar:file:///$perContractJar!/Enterprise.xsd" ) { arg(line:"-XautoNameResolution -Xtbs") } ant.xjc(package: 'ad.dispatchper.contract', destdir: project.ext.generatedSrcDir, extension: 'true', schema: "jar:file:///$aeroContractJar!/AdFpc.xsd" ) { arg(line:"-XautoNameResolution -Xtbs") } sourceSets.main.java.srcDirs += project.ext.generatedSrcDir }
Let me know your suggestion what needs to be change in my syntax to make it work.
The text was updated successfully, but these errors were encountered:
xsd2java has been removed from this plugin to reduce the scope. Feel free to clone the old sources and publish a new plugin based on it.
Sorry, something went wrong.
No branches or pull requests
Hi,
It seems in my example , xsd2java is not taking option parameter value when it's generating code
here is my example
xsd2java {
def contractDir = "$buildDir/extractedContracts"
File perContract = new File("$contractDir/Enterprise.xsd")
File adContract = new File("$contractDir/AdFpc.xsd")
File adListContract = new File("$contractDir/AdListData.xsd")
xsdsToGenerate = [
[file("$perContract"), 'com.performance.contract',[value:"-Xtbs -XautoNameResolution"]],
[file("$adContract"), 'ad.contract',[value:"-Xtbs -XautoNameResolution"]],
[file("$adListContract"), 'ad.list.contract',[value:"-Xtbs -XautoNameResolution"]],
]
generatedXsdDir = file(project.ext.generatedSrcDir)
}
-Xtbs generate equals, hashcode and toString method.
while it's successfully generating using below code.
task generateSources << {
def genSrcDir = new File(project.ext.generatedSrcDir)
genSrcDir.mkdirs()
def perContractJar = configurations.generate.find { it.name.equals("per-contract-1.0.0-18.jar") }
def aeroContractJar = configurations.generate.find { it.name.equals("aero1.0.0-11.jar") }
ant.taskdef(name: 'xjc', classname: 'com.sun.tools.xjc.XJC2Task', classpath: configurations.generate.asPath)
ant.xjc(package: 'com.performance.contract', destdir: project.ext.generatedSrcDir, extension: 'true',
schema: "jar:file:///$perContractJar!/Enterprise.xsd" ) { arg(line:"-XautoNameResolution -Xtbs") }
ant.xjc(package: 'ad.dispatchper.contract', destdir: project.ext.generatedSrcDir, extension: 'true',
schema: "jar:file:///$aeroContractJar!/AdFpc.xsd" ) { arg(line:"-XautoNameResolution -Xtbs") }
sourceSets.main.java.srcDirs += project.ext.generatedSrcDir
}
Let me know your suggestion what needs to be change in my syntax to make it work.
The text was updated successfully, but these errors were encountered: