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

Intermediary classes still referenced #1

Closed
kontrafiktion opened this issue Jul 31, 2012 · 1 comment
Closed

Intermediary classes still referenced #1

kontrafiktion opened this issue Jul 31, 2012 · 1 comment
Assignees
Milestone

Comments

@kontrafiktion
Copy link

I have the following Schema:

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
    <xsd:element name="Foobar">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element name="Ersteller" type="xsd:string"/>
                <xsd:element name="Files">
                    <xsd:complexType>
                        <xsd:sequence>
                            <xsd:element name="File" maxOccurs="unbounded">
                                <xsd:complexType>
                                    <xsd:all>
                                        <xsd:element name="Name" type="xsd:string"/>
                                        <xsd:element name="Pruefsumme" type="xsd:string"/>
                                    </xsd:all>
                                </xsd:complexType>
                            </xsd:element>
                        </xsd:sequence>
                    </xsd:complexType>
                </xsd:element>
                <xsd:element name="Pruefsumme" type="xsd:string"/>
            </xsd:sequence>
        </xsd:complexType>
    </xsd:element>
</xsd:schema>

and the plugin generates code:

...
@XmlElementWrapper(name = "Files", required = true)
@XmlElement(name = "File")
protected List<Foobar.Files.File> files;
...

But the "Files" class (and the "File") class are not generated.

Output (verbose) of the Maven run:

Compilation:
Date         :  -
Version      :  -
JAXB version :  2.2.5-2
Include file :  <none>
Exclude file :  <none>
Summary file :  <none>
Instantiate  :  LAZY
Collection   :  class java.util.ArrayList
Interface    :  interface java.util.List
Delete       :  true

Candidates:
[!]: (default): de.db.idis.poc.leidas.Foobar.Files
1 candidate(s) being considered.

Modifications:
de.db.idis.poc.leidas.Foobar#files  de.db.idis.poc.leidas.Foobar.Files
1 modification(s) to original code.

Deletions:
Removing method de.db.idis.poc.leidas.Foobar.Files createFoobarFiles from de.db.idis.poc.leidas.ObjectFactory
Removing class de.db.idis.poc.leidas.Foobar.Files from class de.db.idis.poc.leidas.Foobar
2 deletion(s) from original code.
@dmak
Copy link
Owner

dmak commented Aug 11, 2012

The problem in the code is that it does not process inner classes correctly. I will try to address this.

As a matter of temporary workaround specify -Xxew:delete=false. This will keep all classes, but result extra classes & methods.

@ghost ghost assigned dmak May 6, 2013
@dmak dmak closed this as completed in 486fab7 May 6, 2013
@dmak dmak added this to the 1.1 milestone Nov 11, 2014
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