Hi I have followed some tutorials and written a schema which is as follows :
<xs:element name="User" type="kmcs:User"/>
<xs:element name="UserList" type="kmcs:UserList"/>
<xs:complexType name="User">
<xs:sequence>
<xs:element name="id" type="xs:long" minOccurs="0" />
<xs:element name="name" type="xs:string" />
<xs:element name="registrationDate" type="xs:dateTime" />
</xs:sequence>
<xs:attribute name = ""/>
</xs:complexType>
<xs:complexType name="UserList">
<xs:complexContent>
<xs:extension base="kmcs:User">
<xs:sequence>
<xs:element name="user" minOccurs="0"
maxOccurs="unbounded" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:schema>
It generates the following :
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "User", propOrder = {
"id",
"name",
"registrationDate"
})
@XmlSeeAlso({
UserList.class
})
@Entity
@XmlRootElement(name = "{@id}")
@Table(schema = "schemaname", uniqueConstraints = {
}, name = "BillingAccountNumberDetailsInfo")
public class User
implements Serializable, ToString
{
I wanted something like this :
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "User", propOrder = {
"id",
"name",
"registrationDate"
})
@XmlSeeAlso({
UserList.class
})
@Entity
@XmlRootElement(name ="user")
@Table(schema = "schema_name", uniqueConstraints = {
}, name = "User")
public class User
implements Serializable, ToString
{
So what I wanted is basically the table name which it picks whatever I provide as hard coded but I wanted it to show the class name or class object name .
Use this configuration.
the maven plugin configuration is