Questions tagged [schemagen]

51 questions
2
votes
2 answers

SchemaGen wrongly generates unnecessary association tables

I have a very simple DB schema, the classic Order ---(one to many)---> OrderItem <---(many to one)--- Product However when I use SchemaGen to generate the DDL it creates an extra layer orders_orders_item, and product_orders_item, in effect adding a…
Oliver Watkins
  • 12,575
  • 33
  • 119
  • 225
2
votes
1 answer

schemagen ant task ignores package-info.java

The scenario is the following: I have a java package (myapp.config) that contains all my JAXB-annotated classes, from which I'd like to generate an XML schema file. In the package, there is also a package-info.java file, which contains the…
buc
  • 6,268
  • 1
  • 34
  • 51
2
votes
1 answer

jaxb2-maven-plugin - how to turn off recursive directory traversal when generating xsd from classes

I am using jaxb2-maven-plugin for generating XSD from jaxb annotated classes. The configuration looks like that rest-api-execution-schemagen schemagen
mdzh
  • 1,030
  • 2
  • 17
  • 34
2
votes
1 answer

A xml schema created by "Schemagen" of Ant task can customize any more?

Now, I have two Java classes like this. public class HogeDomain { private User userDomain; public HogeDomain() { } and getter/setter.. } public class User { public User() { } private String id; private…
Take
  • 213
  • 1
  • 6
  • 12
2
votes
1 answer

JAXB ignoring XmlElement directives

I have a problem generating the schema for a class I have. What I have is: @XmlRootElement @XmlAccessorType(XmlAccessType.FIELD) public Class User { .... @XmlElement(required = true) protected String name; .... } Now, when I generate the…
arg20
  • 4,893
  • 1
  • 50
  • 74
2
votes
3 answers

Jena schemagen in maven processing multiple ontologies

I am working on a project which uses multiple ontologies defined over several files. I am hoping to use Jena to generate the java classes to help with development but I can't seem to find a way to have Jena process multiple files as a maven goal. I…
Ed Mackenzie
  • 679
  • 6
  • 16
2
votes
1 answer

schemagen gradle build error

I am trying to migrate existing maven project to gradle build. In the maven project i am using jaxb2-maven-plugin to generate xsd(schemagen)/classes(xjc). I wanted to get the same functionality in gradle. I have few classes with jaxb annotation but…
rajn
  • 180
  • 2
  • 13
2
votes
2 answers

schemagen: How to share classes, but not their namespaces?

I have two top-level classes which share a third class by composition. Example: @XmlRootElement @XmlType(namespace = "http://example.com/foo") public class Foo { public Shared shared; } @XmlRootElement @XmlType(namespace =…
Christian Schlichtherle
  • 3,125
  • 1
  • 23
  • 47
2
votes
1 answer

schemagen NullpointerException

Java class: @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "user", propOrder = { "id", "name" }) public class User { @XmlAttribute(required=true) private long id; …
Achow
  • 8,600
  • 6
  • 39
  • 49
2
votes
1 answer

Where does xmlns:tns come from when using schemagen

We are using schemagen to create an XSD from some annotated POJOs. Here is our ant target
Paul Reiners
  • 8,576
  • 33
  • 117
  • 202
1
vote
0 answers

GraphQL Schemagen doesn't include deprecation reason

I am using schemagen (run via gradle) to generate my .graphqls and .json schema files. However, when I run schemagen it doesn't include the reason on deprecated fields and gives me an ESLint error (ESLint: Directive "@deprecated" must have a reason!…
Tom Delebo
  • 21
  • 2
1
vote
0 answers

jaxb schemagen ignores @XmlAttribute when used with lombok

say i have a class that must be marshalled/unmarshalled using jaxb @XmlAccessorType(XmlAccessType.NONE) @XmlRootElement(name = "myEvent") @SuperBuilder() @NoArgsConstructor @Getter @Setter public class MyEvent extends SomeBaseClass { …
k31
  • 57
  • 4
1
vote
1 answer

schemagen Ant task not working as expected using gradle

Because the schemagen tool from JAXB is not part of JDK 11 anymore, i wanted to setup a project using gradle which provides the functionality of the schemagen tool via the available ant task. Although, i got it running the ant task does not behave…
rlight
  • 70
  • 8
1
vote
1 answer

jaxb2-maven-plugin to report problems on Console

I have a maven-based build script that runs jaxb2-maven-plugin (schemagen) to generate XSD from Java classes. I have done something wrong and it won't generate it. The project is very complex and it is difficult to re-create in console the exact…
onkami
  • 8,791
  • 17
  • 90
  • 176
1
vote
0 answers

JAXB schemagen when you can't annotate?

Schemagen doesn't appear to create elements in the xsd unless you've got the @XmlElement annotation (or similar, like XmlAttribute). I need schemagen to create xsd information for some POJOs that come from a 3rd party jar, so I can't annotation…
Chris Kessel
  • 5,583
  • 4
  • 36
  • 55