Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jaxb2-maven-plugin always prints warning when generating beans from XSD

I'm trying to generate beans from an xsd by using the jaxb2-maven-plugin maven plugin, however each time the beans are generated i get the following warning. Note that the result beans work. Does anyone know why this happens?

--snip--
[INFO]    task-segment: [deploy]
[INFO] ------------------------------------------------------------------------
[INFO] [jaxb2:xjc {execution: default}]
[INFO] Generating source...
[INFO] parsing a schema...
[INFO] compiling a schema...
[WARNING] null[-1,-1]
org.xml.sax.SAXParseException: generating code
        at com.sun.tools.xjc.ErrorReceiver.debug(ErrorReceiver.java:113)
        at com.sun.tools.xjc.Driver.run(Driver.java:315)
        at org.codehaus.mojo.jaxb2.XjcMojo.execute(XjcMojo.java:301)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
--snip--

This is the config in the pom.xml

        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>jaxb2-maven-plugin</artifactId>
            <version>1.2</version>
            <executions>
                <execution>
                    <goals>
                        <goal>xjc</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <packageName>com.some.package.jaxb</packageName>
                <verbose>true</verbose>
            </configuration>
        </plugin>

While i think i'm technically using 2.0.3 (not 2.0), here is the line of code that starts this issue: http://grepcode.com/file/repo1.maven.org/maven2/com.sun.xml.bind/jaxb-xjc/2.0/com/sun/tools/xjc/Driver.java#315

**If i set verbose to false in the pom i don't get the warning. Is this just a sloppy logging mechanism? **

Thanks

--Matthias

like image 310
mlathe Avatar asked Aug 11 '10 00:08

mlathe


1 Answers

The "problem" lies in verbose option set to true - it you'll take it out, the warning disappears.

like image 195
Dmitry Avatar answered Nov 13 '22 16:11

Dmitry