$MAVEN_PLUGIN\xjc-maven-plugin\xjc-maven-plugin>mvn -e -X generate-sources
Apache Maven 3.0.2 (r1056850; 2011-01-08 19:58:10-0500) Java version: 1.6.0_23, vendor: Sun Microsystems Inc. Java home: C:\Java\jdk1.6.0_23\jre Default locale: en_US, platform encoding: Cp1252 OS name: "windows xp", version: "5.1", arch: "x86", family: "windows" [INFO] Error stacktraces are turned on. [DEBUG] Reading global settings from $M2_HOME\bin\..\conf\set tings.xml [DEBUG] Reading user settings from ${user.home}\.m2\s ettings.xml [DEBUG] Using local repository at ${user.home}\.m2\re pository [DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10 for ${user.home}\.m2\repository [INFO] Scanning for projects... [DEBUG] Extension realms for project org.apache.maven.plugins:xjc-maven-plugin:m aven-plugin:1.0: (none) [DEBUG] Looking up lifecyle mappings for packaging maven-plugin from ClassRealm[ plexus.core, parent: null] [WARNING] [WARNING] Some problems were encountered while building the effective model for org.apache.maven.plugins:xjc-maven-plugin:maven-plugin:1.0 [WARNING] 'repositories.repository.layout' for java.net uses the unsupported val ue 'legacy', artifact resolution might fail. @ line 31, column 15 [WARNING] [WARNING] It is highly recommended to fix these problems because they threaten t he stability of your build. [WARNING] [WARNING] For this reason, future Maven versions might no longer support buildin g such malformed projects. [WARNING] [DEBUG] === REACTOR BUILD PLAN ================================================ [DEBUG] Project: org.apache.maven.plugins:xjc-maven-plugin:maven-plugin:1.0 [DEBUG] Tasks: [generate-sources] [DEBUG] Style: Regular [DEBUG] ======================================================================= [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building xjc-maven-plugin 1.0 [INFO] ------------------------------------------------------------------------ [DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-so urces, generate-resources, process-resources, compile, process-classes, generate -test-sources, process-test-sources, generate-test-resources, process-test-resou rces, test-compile, process-test-classes, test, prepare-package, package, pre-in tegration-test, integration-test, post-integration-test, verify, install, deploy ] [DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean] [DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy] [DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-so urces, generate-resources, process-resources, compile, process-classes, generate -test-sources, process-test-sources, generate-test-resources, process-test-resou rces, test-compile, process-test-classes, test, prepare-package, package, pre-in tegration-test, integration-test, post-integration-test, verify, install, deploy ] [DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean] [DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy] [DEBUG] === PROJECT BUILD PLAN ================================================ [DEBUG] Project: org.apache.maven.plugins:xjc-maven-plugin:1.0 [DEBUG] Dependencies (collect): [] [DEBUG] Dependencies (resolve): [test] [DEBUG] Repositories (dependencies): [java.net (http://download.java.net/maven/1 , releases=true, snapshots=true, managed=false), central (http://repo1.maven.org /maven2, releases=true, snapshots=false, managed=false)] [DEBUG] Repositories (plugins) : [central (http://repo1.maven.org/maven2, re leases=true, snapshots=false, managed=false)] [DEBUG] ----------------------------------------------------------------------- [DEBUG] Goal: org.codehaus.mojo:xjc-maven-plugin:1.0:xjc (default) [DEBUG] Style: Regular [DEBUG] Configuration: <?xml version="1.0" encoding="UTF-8"?> <configuration> <project>${project}</project> <task><xjc schema="target/test-classes/org/codehaus/mojo/xjc/invalidsimple.xsd" package="com.invalidsimple"/></task> </configuration> [DEBUG] ======================================================================= [DEBUG] org.apache.maven.plugins:xjc-maven-plugin:maven-plugin:1.0 [DEBUG] jaxb:jaxb:jar:2.2:compile [DEBUG] jaxb:jaxb-impl:jar:2.1.9:compile [DEBUG] org.apache:jaxen:jar:1.1.3:compile [INFO] [INFO] --- xjc-maven-plugin:1.0:xjc (default) @ xjc-maven-plugin --- [DEBUG] org.codehaus.mojo:xjc-maven-plugin:jar:1.0: [DEBUG] jaxb:jaxb:jar:2.2:runtime [DEBUG] jaxb:jaxb-impl:jar:2.1.9:runtime [DEBUG] org.apache:jaxen:jar:1.1.3:runtime [DEBUG] org.apache.maven:maven-plugin-api:jar:2.0:compile [DEBUG] org.apache.maven:maven-project:jar:2.0:compile [DEBUG] org.apache.maven:maven-profile:jar:2.0:compile [DEBUG] org.apache.maven:maven-model:jar:2.0:compile [DEBUG] org.apache.maven:maven-artifact-manager:jar:2.0:compile [DEBUG] org.apache.maven:maven-repository-metadata:jar:2.0:compile [DEBUG] org.codehaus.plexus:plexus-utils:jar:1.0.4:compile [DEBUG] org.apache.maven:maven-artifact:jar:2.0:compile [DEBUG] org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-8:compi le [DEBUG] junit:junit:jar:3.8.2:test (scope managed from compile) (versio n managed from 3.8.1) [DEBUG] classworlds:classworlds:jar:1.1-alpha-2:compile [DEBUG] org.codehaus.mojo:mant-maven-plugin:jar:1.0:compile [DEBUG] xerces:xercesImpl:jar:2.7.1:compile [DEBUG] xml-apis:xml-apis:jar:1.3.02:compile [DEBUG] dom4j:dom4j:jar:1.6.1:compile [DEBUG] ant:ant:jar:1.5.4:compile [DEBUG] jaxb:jaxb-xjc:jar:1.0.5:compile [DEBUG] jaxb:jaxb-libs:jar:1.0.5:compile [DEBUG] jaxb:jaxb-api:jar:1.0:compile [DEBUG] Created new class realm maven.api [DEBUG] Importing foreign packages into class realm maven.api [DEBUG] Imported: org.apache.maven.wagon.events < plexus.core [DEBUG] Imported: org.sonatype.aether.transfer < plexus.core [DEBUG] Imported: org.apache.maven.exception < plexus.core [DEBUG] Imported: org.sonatype.aether.metadata < plexus.core [DEBUG] Imported: org.codehaus.plexus.util.xml.Xpp3Dom < plexus.core [DEBUG] Imported: org.sonatype.aether.collection < plexus.core [DEBUG] Imported: org.sonatype.aether.version < plexus.core [DEBUG] Imported: org.apache.maven.monitor < plexus.core [DEBUG] Imported: org.apache.maven.wagon.repository < plexus.core [DEBUG] Imported: org.apache.maven.repository < plexus.core [DEBUG] Imported: org.apache.maven.wagon.resource < plexus.core [DEBUG] Imported: org.codehaus.plexus.logging < plexus.core [DEBUG] Imported: org.apache.maven.profiles < plexus.core [DEBUG] Imported: org.sonatype.aether.repository < plexus.core [DEBUG] Imported: org.apache.maven.classrealm < plexus.core [DEBUG] Imported: org.apache.maven.execution < plexus.core [DEBUG] Imported: org.sonatype.aether.artifact < plexus.core [DEBUG] Imported: org.sonatype.aether.spi < plexus.core [DEBUG] Imported: org.apache.maven.reporting < plexus.core [DEBUG] Imported: org.apache.maven.usability < plexus.core [DEBUG] Imported: org.codehaus.plexus.container < plexus.core [DEBUG] Imported: org.codehaus.plexus.component < plexus.core [DEBUG] Imported: org.codehaus.plexus.util.xml.pull.XmlSerializer < plexus.cor e [DEBUG] Imported: org.apache.maven.wagon.authentication < plexus.core [DEBUG] Imported: org.apache.maven.lifecycle < plexus.core [DEBUG] Imported: org.codehaus.plexus.classworlds < plexus.core [DEBUG] Imported: org.sonatype.aether.graph < plexus.core [DEBUG] Imported: org.sonatype.aether.* < plexus.core [DEBUG] Imported: org.apache.maven.settings < plexus.core [DEBUG] Imported: org.codehaus.classworlds < plexus.core [DEBUG] Imported: org.sonatype.aether.impl < plexus.core [DEBUG] Imported: org.apache.maven.wagon.* < plexus.core [DEBUG] Imported: org.apache.maven.toolchain < plexus.core [DEBUG] Imported: org.sonatype.aether.deployment < plexus.core [DEBUG] Imported: org.apache.maven.wagon.observers < plexus.core [DEBUG] Imported: org.codehaus.plexus.util.xml.pull.XmlPullParserException < p lexus.core [DEBUG] Imported: org.codehaus.plexus.util.xml.pull.XmlPullParser < plexus.cor e [DEBUG] Imported: org.apache.maven.configuration < plexus.core [DEBUG] Imported: org.apache.maven.cli < plexus.core [DEBUG] Imported: org.sonatype.aether.installation < plexus.core [DEBUG] Imported: org.codehaus.plexus.context < plexus.core [DEBUG] Imported: org.apache.maven.wagon.authorization < plexus.core [DEBUG] Imported: org.apache.maven.project < plexus.core [DEBUG] Imported: org.codehaus.plexus.lifecycle < plexus.core [DEBUG] Imported: org.codehaus.plexus.configuration < plexus.core [DEBUG] Imported: org.apache.maven.artifact < plexus.core [DEBUG] Imported: org.apache.maven.model < plexus.core [DEBUG] Imported: org.apache.maven.* < plexus.core [DEBUG] Imported: org.apache.maven.wagon.proxy < plexus.core [DEBUG] Imported: org.sonatype.aether.resolution < plexus.core [DEBUG] Imported: org.apache.maven.plugin < plexus.core [DEBUG] Imported: org.codehaus.plexus.* < plexus.core [DEBUG] Imported: org.codehaus.plexus.personality < plexus.core [DEBUG] Populating class realm maven.api [DEBUG] Created new class realm plugin>org.codehaus.mojo:xjc-maven-plugin:1.0 [DEBUG] Importing foreign packages into class realm plugin>org.codehaus.mojo:xjc -maven-plugin:1.0 [DEBUG] Imported: < maven.api [DEBUG] Populating class realm plugin>org.codehaus.mojo:xjc-maven-plugin:1.0 [DEBUG] Included: org.codehaus.mojo:xjc-maven-plugin:jar:1.0 [DEBUG] Included: jaxb:jaxb:jar:2.2 [DEBUG] Included: jaxb:jaxb-impl:jar:2.1.9 [DEBUG] Included: org.apache:jaxen:jar:1.1.3 [DEBUG] Included: org.codehaus.plexus:plexus-utils:jar:1.0.4 [DEBUG] Included: org.codehaus.mojo:mant-maven-plugin:jar:1.0 [DEBUG] Included: xerces:xercesImpl:jar:2.7.1 [DEBUG] Included: xml-apis:xml-apis:jar:1.3.02 [DEBUG] Included: dom4j:dom4j:jar:1.6.1 [DEBUG] Included: ant:ant:jar:1.5.4 [DEBUG] Included: jaxb:jaxb-xjc:jar:1.0.5 [DEBUG] Included: jaxb:jaxb-libs:jar:1.0.5 [DEBUG] Included: jaxb:jaxb-api:jar:1.0 [DEBUG] Excluded: org.apache.maven:maven-plugin-api:jar:2.0 [DEBUG] Excluded: org.apache.maven:maven-project:jar:2.0 [DEBUG] Excluded: org.apache.maven:maven-profile:jar:2.0 [DEBUG] Excluded: org.apache.maven:maven-model:jar:2.0 [DEBUG] Excluded: org.apache.maven:maven-artifact-manager:jar:2.0 [DEBUG] Excluded: org.apache.maven:maven-repository-metadata:jar:2.0 [DEBUG] Excluded: org.apache.maven:maven-artifact:jar:2.0 [DEBUG] Excluded: org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-8 [DEBUG] Excluded: junit:junit:jar:3.8.2 [DEBUG] Excluded: classworlds:classworlds:jar:1.1-alpha-2 [DEBUG] Configuring mojo org.codehaus.mojo:xjc-maven-plugin:1.0:xjc from plugin realm ClassRealm[plugin>org.codehaus.mojo:xjc-maven-plugin:1.0, parent: sun.misc .Launcher$AppClassLoader@11b86e7] [DEBUG] Configuring mojo 'org.codehaus.mojo:xjc-maven-plugin:1.0:xjc' with basic configurator --> [DEBUG] (f) project = MavenProject: org.apache.maven.plugins:xjc-maven-plugin: 1.0 @ C:\maven-plugin\xjc-maven-plugin\xjc-maven-plugin\pom.xml [DEBUG] (f) task = <xjc schema="target/test-classes/org/codehaus/mojo/xjc/inva lidsimple.xsd" package="com.invalidsimple"/> [DEBUG] -- end configuration -- [INFO] <?xml version="1.0" encoding="UTF-8"?> <project default="run" basedir="${maven.plugin}\xjc-maven-plugin\xjc-maven-plugi n"> <path id="project.class.path"> <pathelement location="${user.home}\.m2\repositor y\jaxb\jaxb\2.2\jaxb-2.2.jar"/> <pathelement location="${user.home}\.m2\repositor y\jaxb\jaxb-impl\2.1.9\jaxb-impl-2.1.9.jar"/> <pathelement location="${user.home}\.m2\repositor y\org\apache\jaxen\1.1.3\jaxen-1.1.3.jar"/> </path> <target name="run"> <taskdef name="xjc" classname="com.sun.tools.xjc.XJCTask" classpathref="proj ect.class.path"/> <xjc schema="target/test-classes/org/codehaus/mojo/xjc/invalidsimple.xsd" package="com.invalidsimple" target="C:\maven-plugin\xjc-maven-plugin\xjc-maven-plugin\target\generated\src\main\java"/> </target> </project> version is V2_2 [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2.329s [INFO] Finished at: Fri Mar 18 10:49:55 EDT 2011 [INFO] Final Memory: 2M/15M I had to change a large majority of kawaguchi code and build routines in order to refactor kawaguchi jaxb work to produce java output from xsd in maven-3 here is the input: <?xml version="1.0"?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.schemas.acme/simple" xmlns="http://www.schemas.acme/simple" elementFormDefault="qualified"> <xsd:element name="simple"> <xsd:complexType> <xsd:sequence> <xsd:element name="name" type="xsd:string"/> <xsd:element name="age" type="xsd:string"/> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema> here is the output: $MAVEN_PLUGINS\xjc-maven-plugin\xjc-maven-plugin\com\invalidsimple 03/18/2011 09:49 AM <DIR> . 03/18/2011 09:49 AM <DIR> .. 03/18/2011 09:49 AM 1,427 ObjectFactory.java 03/18/2011 09:49 AM 552 package-info.java 03/18/2011 09:49 AM 3,232 Simple.java 3 File(s) 5,211 bytes Martin Gainty ______________________________________________ "all we have done is to awaken a sleeping giant and fill him with a terrible resolve" - Admiral Yamamoto > Date: Wed, 16 Mar 2011 05:40:21 -0700 > From: arvind.venugo...@verizonbusiness.com > To: users@maven.apache.org > Subject: Error during compiling xsd's using maven xjc > > Hi > > When i try to compile and generate java files using jaxb through xjc maven > plugin i am getting the error. > > Please suggest how to use the jaxb:extensionBindingPrefixes by disabling the > strict mode or by using the extension > > The issue is because in the xsd schema in using > jaxb:extensionBindingPrefixes="xjc" as follows: > > > [ERROR] file:/C:/mvnExample/SampleConfig.xsd[16,32] > org.xml.sax.SAXParseException: vendor extension bindings > (jaxb:extensionBindingPrefixes) are not allowed in the strict mode. Use > -extension. > at > com.sun.tools.xjc.reader.AbstractExtensionBindingChecker.error(AbstractExtensionBindingChecker.java:202) > at > com.sun.tools.xjc.reader.ExtensionBindingChecker.startElement(ExtensionBindingChecker.java:116) > at > org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:527) > at > com.sun.tools.xjc.reader.xmlschema.parser.IncorrectNamespaceURIChecker.startElement(IncorrectNamespaceURIChecker.java:113) > at > org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:527) > at > com.sun.tools.xjc.reader.xmlschema.parser.CustomizationContextChecker.startElement(CustomizationContextChecker.java:188) > at > org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:527) > at > com.sun.tools.xjc.ModelLoader$SpeculationChecker.startElement(ModelLoader.java:455) > at > org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:527) > at > com.sun.tools.xjc.reader.internalizer.VersionChecker.startElement(VersionChecker.java:98) > at > org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:527) > at > com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501) > at > com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:400) > at > com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(XMLNSDocumentScannerImpl.java:626) > at > com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3103) > at > com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:922) > at > com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648) > at > com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140) > at > com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511) > at > com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808) > at > com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737) > at > com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119) > at > com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205) > at > com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522) > at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333) > at com.sun.xml.xsom.parser.JAXPParser.parse(JAXPParser.java:115) > at com.sun.tools.xjc.ModelLoader$2.parse(ModelLoader.java:479) > at > com.sun.tools.xjc.ModelLoader$XMLSchemaParser.parse(ModelLoader.java:262) > at > com.sun.xml.xsom.impl.parser.NGCCRuntimeEx.parseEntity(NGCCRuntimeEx.java:337) > at > com.sun.xml.xsom.impl.parser.ParserContext.parse(ParserContext.java:124) > at com.sun.xml.xsom.parser.XSOMParser.parse(XSOMParser.java:183) > at > com.sun.tools.xjc.ModelLoader.createXSOMSpeculative(ModelLoader.java:496) > at com.sun.tools.xjc.ModelLoader.loadXMLSchema(ModelLoader.java:366) > at com.sun.tools.xjc.ModelLoader.load(ModelLoader.java:167) > at com.sun.tools.xjc.ModelLoader.load(ModelLoader.java:113) > at com.sun.tools.xjc.Driver.run(Driver.java:313) > at > org.codehaus.mojo.jaxb2.AbstractXjcMojo.execute(AbstractXjcMojo.java:297) > at > org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) > at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) > at > org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) > at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) > at > org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) > > > Thank you > > -- > View this message in context: > http://maven.40175.n5.nabble.com/Error-during-compiling-xsd-s-using-maven-xjc-tp3779661p3779661.html > Sent from the Maven - Users mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org >