pax_global_header00006660000000000000000000000064116014653770014524gustar00rootroot0000000000000052 comment=c811bfe5ffa68198b6a59825ded19061b49355bd xmlbeans-maven-plugin-2.3.3/000077500000000000000000000000001160146537700157425ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/pom.xml000066400000000000000000000273111160146537700172630ustar00rootroot00000000000000 4.0.0 mojo-parent org.codehaus.mojo 21 xmlbeans-maven-plugin maven-plugin Maven XML Beans Plugin 2.3.3 hudson http://davidkarlsen.com/hudson/job/xmlbeans-maven-plugin/ true true true true email Runs the xmlbeans parser/code generator against schemas in files and dependent jars. The Apache Software License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0.txt repo 2.0.6 2005 scm:svn:http://svn.codehaus.org/mojo/tags/xmlbeans-maven-plugin-2.3.3 scm:svn:https://svn.codehaus.org/mojo/tags/xmlbeans-maven-plugin-2.3.3 http://fisheye.codehaus.org/browse/mojo/tags/xmlbeans-maven-plugin-2.3.3 jira http://jira.codehaus.org/browse/MXMLBEANS djencks David Jencks david_jencks@yahoo.com Apache Geronimo Project http://geronimo.apache.org Maintainer EST brett Brett Porter Apache Maven Project http://maven.apache.org Port of Original Code david David J. M. Karlsen david@codehaus.org codehaus.org http://www.codehaus.org +1 http://www.davidkarlsen.com Maintainer Terence Haddock protected Patch Contributor Nathan Sowatskey protected Active User Dan Allen protected Patch Contributor Brian Bonner protected Active User Piotr Burdylo protected Active User Mike Perham protected Active User Martin Desruisseaux protected Active User Rafal Rusin protected Patch Contributor Christian Domsch protected Active User Anita Kulshreshtha protected Active User xml-resolver xml-resolver 1.2 compile org.apache.maven maven-model 2.0.6 compile org.apache.maven maven-artifact 2.0.6 compile org.apache.maven maven-project 2.0.6 compile org.apache.maven maven-plugin-api 2.0.6 compile org.apache.xmlbeans xmlbeans 2.4.0 compile org.codehaus.plexus plexus-utils 1.5.6 compile install run-its org.apache.maven.plugins maven-invoker-plugin 1.3 true src/it **/pom.xml **/mxmlbeans-21-jar/pom.xml **/mxmlbeans-21-test/pom.xml **/mxmlbeans-45-jar/pom.xml **/mxmlbeans-45-test/pom.xml validate ${project.build.directory}/local-repo clean package src/it/settings.xml ${project.build.directory}/it integration-test install run stage-distribution stage.distributionUrl stage-repository ${stage.distributionUrl}/repository stage-snapshot-repository ${stage.distributionUrl}/snapshot-repository stage-site ${stage.distributionUrl}/site org.apache.maven.plugins maven-changes-plugin 2.1 Key,Summary,Status,Resolution,Assignee,Type,Version,Fix Version Fix Version ${project.url} true dev@mojo.codehaus.org user@mojo.codehaus.org users@maven.apache.org org.codehaus.mojo findbugs-maven-plugin 1.2 Normal org.codehaus.mojo jdepend-maven-plugin 2.0-beta-2 xmlbeans-maven-plugin-2.3.3/src/000077500000000000000000000000001160146537700165315ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/000077500000000000000000000000001160146537700171455ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mojo-114/000077500000000000000000000000001160146537700204145ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mojo-114/goals.txt000066400000000000000000000000151160146537700222560ustar00rootroot00000000000000clean packagexmlbeans-maven-plugin-2.3.3/src/it/mojo-114/pom.xml000066400000000000000000000041521160146537700217330ustar00rootroot00000000000000 4.0.0 xmlbeans-mojo-114 org.codehaus.mojo 1.0 jar Test Case for MOJO-114 org.apache.xmlbeans xmlbeans 2.4.0 org.codehaus.mojo xmlbeans-maven-plugin @pom.version@ xmlbeans xmlbeans-test true xmlbeans-maven-plugin-2.3.3/src/it/mojo-54/000077500000000000000000000000001160146537700203375ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mojo-54/goals.txt000066400000000000000000000000151160146537700222010ustar00rootroot00000000000000clean packagexmlbeans-maven-plugin-2.3.3/src/it/mojo-54/pom.xml000066400000000000000000000046111160146537700216560ustar00rootroot00000000000000 4.0.0 xmlbeans-mojo-54 org.codehaus.mojo 1.0 jar Test Case for MOJO-54 org.apache.xmlbeans xmlbeans 2.4.0 org.codehaus.mojo xmlbeans-maven-plugin @pom.version@ xmlbeans true src/main/xsdconfig src/main/xsdconfig2/explicit.xsdconfig xmlbeans-maven-plugin-2.3.3/src/it/mojo-54/src/000077500000000000000000000000001160146537700211265ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mojo-54/src/main/000077500000000000000000000000001160146537700220525ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mojo-54/src/main/xsd/000077500000000000000000000000001160146537700226505ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mojo-54/src/main/xsd/easypo.xsd000066400000000000000000000041311160146537700246670ustar00rootroot00000000000000 xmlbeans-maven-plugin-2.3.3/src/it/mojo-54/src/main/xsdconfig/000077500000000000000000000000001160146537700240365ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mojo-54/src/main/xsdconfig/easypo.xsdconfig000066400000000000000000000017351160146537700272520ustar00rootroot00000000000000 com.easypo Xml xmlbeans-maven-plugin-2.3.3/src/it/mojo-54/src/main/xsdconfig2/000077500000000000000000000000001160146537700241205ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mojo-54/src/main/xsdconfig2/explicit.xsdconfig000066400000000000000000000015671160146537700276600ustar00rootroot00000000000000 Bean xmlbeans-maven-plugin-2.3.3/src/it/mojo-72/000077500000000000000000000000001160146537700203375ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mojo-72/goals.txt000066400000000000000000000000151160146537700222010ustar00rootroot00000000000000clean packagexmlbeans-maven-plugin-2.3.3/src/it/mojo-72/pom.xml000066400000000000000000000043061160146537700216570ustar00rootroot00000000000000 4.0.0 xmlbeans-mojo-72 org.codehaus.mojo 1.0 jar Test Case for MOJO-72 org.apache.xmlbeans xmlbeans 2.4.0 org.codehaus.mojo xmlbeans-maven-plugin @pom.version@ xmlbeans 50m 80m xmlbeans-maven-plugin-2.3.3/src/it/mojo-72/src/000077500000000000000000000000001160146537700211265ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mojo-72/src/main/000077500000000000000000000000001160146537700220525ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mojo-72/src/main/xsd/000077500000000000000000000000001160146537700226505ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mojo-72/src/main/xsd/easypo.xsd000066400000000000000000000041311160146537700246670ustar00rootroot00000000000000 xmlbeans-maven-plugin-2.3.3/src/it/mojo-72/src/test/000077500000000000000000000000001160146537700221055ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mojo-72/src/test/xsd/000077500000000000000000000000001160146537700227035ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mojo-72/src/test/xsd/easypo.xsd000066400000000000000000000041311160146537700247220ustar00rootroot00000000000000 xmlbeans-maven-plugin-2.3.3/src/it/mojo-89/000077500000000000000000000000001160146537700203475ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mojo-89/goals.txt000066400000000000000000000000151160146537700222110ustar00rootroot00000000000000clean packagexmlbeans-maven-plugin-2.3.3/src/it/mojo-89/pom.xml000066400000000000000000000041501160146537700216640ustar00rootroot00000000000000 4.0.0 xmlbeans-mojo-89 org.codehaus.mojo 1.0 jar Test Case for MOJO-89 org.apache.xmlbeans xmlbeans 2.4.0 org.codehaus.mojo xmlbeans-maven-plugin @pom.version@ xmlbeans xmlbeans-test true xmlbeans-maven-plugin-2.3.3/src/it/mojo-89/src/000077500000000000000000000000001160146537700211365ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mojo-89/src/main/000077500000000000000000000000001160146537700220625ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mojo-89/src/main/xsd/000077500000000000000000000000001160146537700226605ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mojo-89/src/main/xsd/easypo.xsd000066400000000000000000000041311160146537700246770ustar00rootroot00000000000000 xmlbeans-maven-plugin-2.3.3/src/it/mojo-89/src/test/000077500000000000000000000000001160146537700221155ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mojo-89/src/test/xsd/000077500000000000000000000000001160146537700227135ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mojo-89/src/test/xsd/easypo.xsd000066400000000000000000000041311160146537700247320ustar00rootroot00000000000000 xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-17/000077500000000000000000000000001160146537700213605ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-17/goals.txt000066400000000000000000000000151160146537700232220ustar00rootroot00000000000000clean packagexmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-17/pom.xml000066400000000000000000000042501160146537700226760ustar00rootroot00000000000000 4.0.0 xmlbeans-mxmlbeans-17 org.codehaus.mojo 1.0 jar Test Case for MXMLBEANS-17 org.apache.xmlbeans xmlbeans 2.4.0 org.codehaus.mojo xmlbeans-maven-plugin @pom.version@ xmlbeans ${project.build.directory}/libs/result.jar xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-17/src/000077500000000000000000000000001160146537700221475ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-17/src/main/000077500000000000000000000000001160146537700230735ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-17/src/main/xsd/000077500000000000000000000000001160146537700236715ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-17/src/main/xsd/easypo.xsd000066400000000000000000000041311160146537700257100ustar00rootroot00000000000000 xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-17/src/test/000077500000000000000000000000001160146537700231265ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-17/src/test/xsd/000077500000000000000000000000001160146537700237245ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-17/src/test/xsd/easypo.xsd000066400000000000000000000041311160146537700257430ustar00rootroot00000000000000 xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-21/000077500000000000000000000000001160146537700213535ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-21/goals.txt000066400000000000000000000000151160146537700232150ustar00rootroot00000000000000clean installxmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-21/mxmlbeans-21-jar/000077500000000000000000000000001160146537700243335ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-21/mxmlbeans-21-jar/pom.xml000066400000000000000000000025421160146537700256530ustar00rootroot00000000000000 4.0.0 org.codehaus.mojo xmlbeans-mxmlbeans-21-jar jar 1.0 XMLBeans test dependency for MXMLBEANS-21 xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-21/mxmlbeans-21-jar/src/000077500000000000000000000000001160146537700251225ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-21/mxmlbeans-21-jar/src/main/000077500000000000000000000000001160146537700260465ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-21/mxmlbeans-21-jar/src/main/resources/000077500000000000000000000000001160146537700300605ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-21/mxmlbeans-21-jar/src/main/resources/easypo.xsd000066400000000000000000000041311160146537700320770ustar00rootroot00000000000000 xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-21/mxmlbeans-21-jar/src/main/resources/subdir/000077500000000000000000000000001160146537700313505ustar00rootroot00000000000000datetime.xsd000066400000000000000000000033321160146537700336060ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-21/mxmlbeans-21-jar/src/main/resources/subdir xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-21/mxmlbeans-21-test/000077500000000000000000000000001160146537700245365ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-21/mxmlbeans-21-test/pom.xml000066400000000000000000000053001160146537700260510ustar00rootroot00000000000000 4.0.0 org.codehaus.mojo xmlbeans-mxmlbeans-21-test jar 1.0 XMLBeans discrete xsd's in a jar test for MXMLBEANS-21 org.apache.xmlbeans xmlbeans 2.4.0 org.codehaus.mojo xmlbeans-mxmlbeans-21-jar ${project.version} org.codehaus.mojo xmlbeans-maven-plugin xmlbeans true org.codehaus.mojo:xmlbeans-mxmlbeans-21-jar subdir/datetime.xsd xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-21/pom.xml000066400000000000000000000033771160146537700227020ustar00rootroot00000000000000 4.0.0 org.codehaus.mojo xmlbeans-mxmlbeans-21 pom 1.0 XMLBeans testcase for MXMLBEANS-21 org.codehaus.mojo xmlbeans-maven-plugin @pom.version@ mxmlbeans-21-jar mxmlbeans-21-test xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-21/validate.groovy000066400000000000000000000006671160146537700244240ustar00rootroot00000000000000// should not exist since easypo.xsd wasn't specified in sourceSchema def file = new File(basedir, 'mxmlbeans-21-test/target/classes/org/openuri/easypo/Customer.class') assert !file.exists() // should exist since it exists in datetime.xsd, which was specified in sourceSchema file = new File(basedir, 'mxmlbeans-21-test/target/classes/org/apache/xmlbeans/samples/datetime/DatetimeDocument.class') assert file.exists() return true xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-24/000077500000000000000000000000001160146537700213565ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-24/goals.txt000066400000000000000000000000151160146537700232200ustar00rootroot00000000000000clean packagexmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-24/pom.xml000066400000000000000000000044321160146537700226760ustar00rootroot00000000000000 4.0.0 xmlbeans-mxmlbeans-24 org.codehaus.mojo 1.0 jar Test Case for MXMLBEANS-24 org.apache.xmlbeans xmlbeans 2.4.0 org.codehaus.mojo xmlbeans-maven-plugin @pom.version@ xmlbeans easypo.xsd easypo2.xsd xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-24/src/000077500000000000000000000000001160146537700221455ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-24/src/main/000077500000000000000000000000001160146537700230715ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-24/src/main/catalog/000077500000000000000000000000001160146537700245035ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-24/src/main/catalog/resolver-catalog.xml000066400000000000000000000006661160146537700305060ustar00rootroot00000000000000 xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-24/src/main/xsd/000077500000000000000000000000001160146537700236675ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-24/src/main/xsd/easypo.xsd000066400000000000000000000041311160146537700257060ustar00rootroot00000000000000 xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-24/src/main/xsd/easypo2.xsd000066400000000000000000000041401160146537700257700ustar00rootroot00000000000000 xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-25/000077500000000000000000000000001160146537700213575ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-25/goals.txt000066400000000000000000000000151160146537700232210ustar00rootroot00000000000000clean packagexmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-25/pom.xml000066400000000000000000000044361160146537700227030ustar00rootroot00000000000000 4.0.0 org.codehaus.mojo xmlbeans-mxmlbeans-25 jar 1.0 XMLBeans testcase for MXMLBEANS-25 org.apache.xmlbeans xmlbeans 2.4.0 org.codehaus.mojo xmlbeans-maven-plugin @pom.version@ xmlbeans true src/main/xsd true false xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-25/src/000077500000000000000000000000001160146537700221465ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-25/src/main/000077500000000000000000000000001160146537700230725ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-25/src/main/xsd/000077500000000000000000000000001160146537700236705ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-25/src/main/xsd/subdir/000077500000000000000000000000001160146537700251605ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-25/src/main/xsd/subdir/datetime.xsd000066400000000000000000000033321160146537700274750ustar00rootroot00000000000000 xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-3/000077500000000000000000000000001160146537700212735ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-3/goals.txt000066400000000000000000000000151160146537700231350ustar00rootroot00000000000000clean packagexmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-3/pom.xml000066400000000000000000000040711160146537700226120ustar00rootroot00000000000000 4.0.0 xmlbeans-mxmlbeans-3 org.codehaus.mojo 1.0 jar Test Case for MXMLBEANS-3 org.apache.xmlbeans xmlbeans 2.4.0 org.codehaus.mojo xmlbeans-maven-plugin @pom.version@ xmlbeans true xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-3/src/000077500000000000000000000000001160146537700220625ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-3/src/main/000077500000000000000000000000001160146537700230065ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-3/src/main/catalog/000077500000000000000000000000001160146537700244205ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-3/src/main/catalog/resolver-catalog.xml000066400000000000000000000006661160146537700304230ustar00rootroot00000000000000 xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-3/src/main/xsd/000077500000000000000000000000001160146537700236045ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-3/src/main/xsd/easypo.xsd000066400000000000000000000041311160146537700256230ustar00rootroot00000000000000 xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-33/000077500000000000000000000000001160146537700213565ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-33/goals.txt000066400000000000000000000000151160146537700232200ustar00rootroot00000000000000clean packagexmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-33/pom.xml000066400000000000000000000044001160146537700226710ustar00rootroot00000000000000 4.0.0 org.codehaus.mojo xmlbeans-mxmlbeans-33 jar 1.0 XMLBeans mishandled classes dir MXMLBEANS-33 org.apache.xmlbeans xmlbeans 2.4.0 org.codehaus.mojo xmlbeans-maven-plugin @pom.version@ xmlbeans true target/generated-classes/xmlbeans-away xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-33/src/000077500000000000000000000000001160146537700221455ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-33/src/main/000077500000000000000000000000001160146537700230715ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-33/src/main/xsd/000077500000000000000000000000001160146537700236675ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-33/src/main/xsd/easypo.xsd000066400000000000000000000041311160146537700257060ustar00rootroot00000000000000 xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-38/000077500000000000000000000000001160146537700213635ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-38/goals.txt000066400000000000000000000000151160146537700232250ustar00rootroot00000000000000clean packagexmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-38/pom.xml000066400000000000000000000020471160146537700227030ustar00rootroot00000000000000 4.0.0 bar.com foo war 1.0-SNAPSHOT foo Maven Webapp http://maven.apache.org org.apache.xmlbeans xmlbeans 2.4.0 foo org.codehaus.mojo xmlbeans-maven-plugin @pom.version@ xmlbeans src/main/xsd xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-38/src/000077500000000000000000000000001160146537700221525ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-38/src/main/000077500000000000000000000000001160146537700230765ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-38/src/main/webapp/000077500000000000000000000000001160146537700243545ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-38/src/main/webapp/WEB-INF/000077500000000000000000000000001160146537700254035ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-38/src/main/webapp/WEB-INF/web.xml000066400000000000000000000003271160146537700267040ustar00rootroot00000000000000 Archetype Created Web Application xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-38/src/main/webapp/index.jsp000066400000000000000000000000641160146537700262010ustar00rootroot00000000000000

Hello World!

xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-38/src/main/xsd/000077500000000000000000000000001160146537700236745ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-38/src/main/xsd/sample.xsd000066400000000000000000000007251160146537700257010ustar00rootroot00000000000000 xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-38/src/main/xsd/sampleResponse.xsd000066400000000000000000000007361160146537700274220ustar00rootroot00000000000000 xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-38/validate.groovy000066400000000000000000000017121160146537700244240ustar00rootroot00000000000000for ( String filename in[ "target/foo/WEB-INF/lib/classworlds-1.1-alpha-2.jar", "target/foo/WEB-INF/lib/junit-3.8.1.jar", "target/foo/WEB-INF/lib/maven-artifact-2.0.6.jar", "target/foo/WEB-INF/lib/maven-artifact-manager-2.0.6.jar", "target/foo/WEB-INF/lib/maven-model-2.0.6.jar", "target/foo/WEB-INF/lib/maven-plugin-api-2.0.6.jar", "target/foo/WEB-INF/lib/maven-plugin-registry-2.0.6.jar", "target/foo/WEB-INF/lib/maven-profile-2.0.6.jar", "target/foo/WEB-INF/lib/maven-project-2.0.6.jar", "target/foo/WEB-INF/lib/maven-repository-metadata-2.0.6.jar", "target/foo/WEB-INF/lib/maven-settings-2.0.6.jar", "target/foo/WEB-INF/lib/plexus-container-default-1.0-alpha-9-stable-1.jar", "target/foo/WEB-INF/lib/plexus-utils-1.5.6.jar", "target/foo/WEB-INF/lib/wagon-provider-api-1.0-beta-2.jar", "target/foo/WEB-INF/lib/xml-resolver-1.2.jar"] ) { def file = new File( basedir, filename ) assert !file.exists() return true } xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-45/000077500000000000000000000000001160146537700213615ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-45/goals.txt000066400000000000000000000000171160146537700232250ustar00rootroot00000000000000clean install xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-45/mxmlbeans-45-jar/000077500000000000000000000000001160146537700243475ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-45/mxmlbeans-45-jar/pom.xml000066400000000000000000000026001160146537700256620ustar00rootroot00000000000000 4.0.0 org.codehaus.mojo xmlbeans-mxmlbeans-45-jar jar 1.0 XMLBeans test dependency for MXMLBEANS-45 xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-45/mxmlbeans-45-jar/src/000077500000000000000000000000001160146537700251365ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-45/mxmlbeans-45-jar/src/main/000077500000000000000000000000001160146537700260625ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-45/mxmlbeans-45-jar/src/main/resources/000077500000000000000000000000001160146537700300745ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-45/mxmlbeans-45-jar/src/main/resources/easypo.xsd000066400000000000000000000042221160146537700321140ustar00rootroot00000000000000 xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-45/mxmlbeans-45-jar/src/main/resources/subdir/000077500000000000000000000000001160146537700313645ustar00rootroot00000000000000datetime.xsd000066400000000000000000000034051160146537700336230ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-45/mxmlbeans-45-jar/src/main/resources/subdir xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-45/mxmlbeans-45-test/000077500000000000000000000000001160146537700245525ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-45/mxmlbeans-45-test/pom.xml000066400000000000000000000054731160146537700261000ustar00rootroot00000000000000 4.0.0 org.codehaus.mojo xmlbeans-mxmlbeans-45-test jar 1.0 XMLBeans discrete xsd's in a jar test for MXMLBEANS-45 org.apache.xmlbeans xmlbeans 2.4.0 org.codehaus.mojo xmlbeans-mxmlbeans-45-jar ${pom.version} org.codehaus.mojo xmlbeans-maven-plugin @pom.version@ xmlbeans true org.codehaus.mojo:xmlbeans-mxmlbeans-45-jar xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-45/pom.xml000066400000000000000000000027441160146537700227050ustar00rootroot00000000000000 4.0.0 org.codehaus.mojo xmlbeans-mxmlbeans-45 pom 1.0 XMLBeans testcase for MXMLBEANS-45 mxmlbeans-45-jar mxmlbeans-45-test xmlbeans-maven-plugin-2.3.3/src/it/mxmlbeans-45/validate.groovy000066400000000000000000000006051160146537700244220ustar00rootroot00000000000000// should exist since sourceSchema was not specified def file = new File(basedir, 'mxmlbeans-45-test/target/classes/org/openuri/easypo/Customer.class') assert file.exists() // should exist since sourceSchema was not specified file = new File(basedir, 'mxmlbeans-45-test/target/classes/org/apache/xmlbeans/samples/datetime/DatetimeDocument.class') assert file.exists() return true xmlbeans-maven-plugin-2.3.3/src/it/settings.xml000066400000000000000000000031741160146537700215340ustar00rootroot00000000000000 it-repo true local.central @localRepositoryUrl@ true true local.central @localRepositoryUrl@ true true xmlbeans-maven-plugin-2.3.3/src/main/000077500000000000000000000000001160146537700174555ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/main/java/000077500000000000000000000000001160146537700203765ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/main/java/org/000077500000000000000000000000001160146537700211655ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/main/java/org/codehaus/000077500000000000000000000000001160146537700227605ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/main/java/org/codehaus/mojo/000077500000000000000000000000001160146537700237245ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/main/java/org/codehaus/mojo/exception/000077500000000000000000000000001160146537700257225ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/main/java/org/codehaus/mojo/exception/CodedException.java000066400000000000000000000137521160146537700314720ustar00rootroot00000000000000package org.codehaus.mojo.exception; /** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import java.text.MessageFormat; import java.util.MissingResourceException; import java.util.ResourceBundle; import org.apache.maven.plugin.MojoExecutionException; /** * @author Kris Bravo * @version $Id: CodedException.java 6588 2008-03-28 12:22:57Z bentmann $ */ public abstract class CodedException extends MojoExecutionException { /** * The error message used when a key is missing from the resource bundles. */ protected static final Error MISSING_ERROR_KEY = new Error( "missing.error.key" ); /** * The error code for the specific error. */ protected Error error; /** * Any fields which would need to be filled in within the error message. */ protected String[] errorFields; /** * The shadow handle to the resource bundle. Since statics can only * be shadowed and not overridden, this provides the mechanism needed * to access a subclasses resource bundle from a super-class non-static * method. */ protected ResourceBundle errors = null; /** * Empty Constructor. Required for subclasses. */ public CodedException() { super( "" ); init( null, null ); } /** * An exception with a specific error code. * * @param code The code key used to look up the error text. */ public CodedException( final Error code ) { super( "" ); init( code, null ); } /** * An exception with an error code and fields in the * message. * * @param code The code key used to look up the error text. * @param fields An array of field values to replace fields in the error message. */ public CodedException( final Error code, final String[] fields ) { super( "" ); init( code, fields ); } /** * An exception with an error code and fields in the * message. * * @param code The code key used to look up the error text. * @param field A single value with which to replace the error message field. */ public CodedException( final Error code, final String field ) { super( "" ); String[] fields = new String[1]; fields[0] = field; init( code, fields ); } /** * Creates a new Coded Exception, given an error code and root cause. * * @param code The Error of this particular exception. * @param exception The root cause of the problem. */ public CodedException( final Error code, final Throwable exception ) { super( "", ( Exception ) exception ); init( code, null ); } /** * Creates a coded exception with fields and a root cause. * * @param code The code key used to look up the error text. * @param field A single value with which to replace the error message field. * @param exception The source of the error. */ public CodedException( final Error code, final String field, final Throwable exception ) { super( "", ( Exception ) exception ); String[] fields = new String[1]; fields[0] = field; init( code, fields ); } /** * Creates a coded exception with fields and a root cause. * * @param code The code key used to look up the error text. * @param fields An array of field values to replace fields in the error message. * @param exception The source of the error. */ public CodedException( final Error code, final String[] fields, final Throwable exception ) { super( "", ( Exception ) exception ); init( code, fields ); } /** * Initialize the instance. * * @param code The code key used to look up the error text. * @param fields An array of field values to replace fields in the error message. */ protected final void init( final Error code, final String[] fields ) { if ( code != null ) { error = code; } errorFields = fields; } /** * getMessage - Check the error code to see if * it's an ExtendedError. * Based on the result, pull the error string from the appropriate * resource bundle (business logic errors or general CAM errors). * * @return a String value */ public final String getMessage() { String message; // determine if it's a valid extended error. if ( ( errors != null ) && ( error != null ) ) { try { message = errors.getString( error.toString() ); // use the subclass resource bundle // if there are error fields, fill them in. if ( errorFields != null ) { message = MessageFormat.format( message, errorFields ); } } catch ( MissingResourceException e ) { message = errors.getString( MISSING_ERROR_KEY.getErrorKey() + ":" + e.getKey() ); } } else { message = "An unknown error occurred."; } return message; } } xmlbeans-maven-plugin-2.3.3/src/main/java/org/codehaus/mojo/exception/Error.java000066400000000000000000000036561160146537700276700ustar00rootroot00000000000000package org.codehaus.mojo.exception; /** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import java.io.Serializable; /** * A key for a particular CodedException. This key is used to look up the actual * error message text. * * @author Kris Bravo * @version $Id: Error.java 6588 2008-03-28 12:22:57Z bentmann $ */ public class Error implements Serializable { /** * */ private static final long serialVersionUID = 2107339436186274590L; /** * The error code's key. Used to look up the error text */ private String errorKey; /** * Creates a new error code with a lookup value of key. * * @param key The error code key. */ public Error( final String key ) { errorKey = key; } /** * Returns the error code key. * * @return The error key. */ public final String getErrorKey() { return errorKey; } /** * Displays the Error object as a string, namely it's errorKey value. * * @return The error key. */ public final String toString() { return errorKey; } } xmlbeans-maven-plugin-2.3.3/src/main/java/org/codehaus/mojo/xmlbeans/000077500000000000000000000000001160146537700255355ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/main/java/org/codehaus/mojo/xmlbeans/AbstractXmlBeansPlugin.java000066400000000000000000000671471160146537700327730ustar00rootroot00000000000000package org.codehaus.mojo.xmlbeans; /** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.DependencyResolutionRequiredException; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.project.MavenProject; import org.apache.xmlbeans.impl.tool.SchemaCompiler; import org.codehaus.plexus.util.DirectoryScanner; import org.codehaus.plexus.util.FileUtils; import org.xml.sax.EntityResolver; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; /** *

* A Maven 2 plugin which parses xsd files and produces a corresponding object * model based on the Apache XML Beans parser. *

*

* The plugin produces two sets of output files referred to as generated sources * and generated classes. The former is then compiled to the build * outputDirectory. The latter is generated in this directory. *

*

* Note that the descriptions for the goal's parameters have been blatently * copied from http://xmlbeans.apache.org/docs/2.0.0/guide/antXmlbean.html for * convenience. *

* * @author Brett Porter * @author Kris Bravo * @version $Id: AbstractXmlBeansPlugin.java 9412 2009-04-11 16:40:36Z david $ * @noinspection UnusedDeclaration */ public abstract class AbstractXmlBeansPlugin extends AbstractMojo implements PluginProperties { /** * Define the name of the jar file created. For instance, "myXMLBean.jar" * will output the results of this task into a jar with the same name. * * @parameter */ private File outputJar; /** * Define a set of Namespaces for which to ignore duplicate errors. * * @parameter */ private Set mdefNamespaces; /** * Set to true to permit the compiler to download URLs for imports and * includes. Defaults to false, meaning all imports and includes must be * copied locally. * * @parameter default-value="false" */ private boolean download; /** * Indicates whether source should be compiled with debug information; * defaults to off. If set to off, -g:none will be passed on the command * line for compilers that support it (for other compilers, no command line * argument will be used). If set to true, the value of the debug level * attribute determines the command line argument. * * @parameter default-value="false" */ private boolean debug; /** * The initial size of the memory for the underlying VM, if javac is run * externally; ignored otherwise. Defaults to the standard VM memory * setting. (Examples: 83886080, 81920k, or 80m) * * @parameter */ private String memoryInitialSize; /** * The maximum size of the memory for the underlying VM, if javac is run * externally; ignored otherwise. Defaults to the standard VM memory * setting. (Examples: 83886080, 81920k, or 80m) * * @parameter */ private String memoryMaximumSize; /** * The compiler implementation to use. If this attribute is not set, the * value of the build.compiler property, if set, will be used. Otherwise, * the default compiler for the current VM will be used. * * @parameter */ private String compiler; /** * Controls the amount of build message output. * * @parameter default-value="false" */ private boolean verbose; /** * Supress the normal amount of console output. * * @parameter default-value="true" */ private boolean quiet = true; /** * Do not enforce the unique particle attribution rule. * * @parameter default-value="false" */ private boolean noUpa; /** * Do not enforce the particle valid (restriction) rule. * * @parameter default-value="false" */ private boolean noPvr; /** * Todo: Unkown use. * * @parameter default-value="false" */ private boolean jaxb; /** * Don't compile the generated source files. * * @parameter default-value="false" */ private boolean noJavac; /** * Ignore annotations * * @parameter default-value="false" */ private boolean noAnn; /** * do not validate documentation elements * * @parameter default-value="false" */ private boolean noVDoc; /** * The location of the catalog used to resolve xml entities. * * @parameter expression="${xmlbeans.catalogLocation}" default-value="${basedir}/src/main/catalog/resolver-catalog.xml" */ protected File catalogLocation; /** * A List of source schema files. * * @parameter */ private List sourceSchemas; /** * Configuration files used by the object generator. For more information * about the format of these files, see Todo. * * @parameter */ private List xmlConfigs; /** * Returns the javasource parameter which specifies an option to the * XmlBeans code generator. * * @parameter * @return null. */ private String javaSource; /** * @parameter expression="${project.artifactMap}" * @required * @readonly */ private Map artifactMap; /** * A reference to the Maven Project metadata. * * @parameter expression="${project}" * @required * @readonly */ protected MavenProject project; /** * Used to find resources used by the XML compiler. Currently not passed to * the compiler, since everything is on the classpath. */ private EntityResolver entityResolver = null; /** * */ private static final File[] EMPTY_FILE_ARRAY = new File[0]; /** * Files to parse and generate models for. */ private File[] xsdFiles; private File[] wsdlFiles; /** * Empty constructor for the XML Beans plugin. */ public AbstractXmlBeansPlugin() { } /** *

* Map the parameters to the schema compilers parameter object, make sure * the necessary output directories exist, then call on the schema compiler * to produce the java objects and supporting resources. *

* * @throws MojoExecutionException Errors occurred during compile. * @number MOJO-270 */ public final void execute() throws MojoExecutionException { if ( hasSchemas() ) { try { SchemaCompiler.Parameters compilerParams = ParameterAdapter .getCompilerParameters( this ); boolean stale = isOutputStale(); if (stale) { try { compilerParams.getSrcDir().mkdirs(); boolean result = SchemaCompiler.compile( compilerParams ); if ( !result ) { StringBuffer errors = new StringBuffer(); for ( Iterator iterator = compilerParams.getErrorListener().iterator(); iterator .hasNext(); ) { Object o = iterator.next(); errors.append( "xml Error" ).append( o ); errors.append( "\n" ); } throw new XmlBeansException( XmlBeansException.COMPILE_ERRORS, errors .toString() ); } touchStaleFile(); } catch ( IOException ioe ) { throw new XmlBeansException( XmlBeansException.STALE_FILE_TOUCH, getStaleFile().getAbsolutePath(), ioe ); } } else { getLog().info( "All schema objects are up to date." ); } updateProject( project, compilerParams, stale); } catch ( DependencyResolutionRequiredException drre ) { throw new XmlBeansException( XmlBeansException.CLASSPATH_DEPENDENCY, drre ); } } else { getLog().info( "Nothing to generate." ); } } /** * Indicates whether or not there are schemas to compile. * * @return true if there are schema files in the source or artifacts. * @throws XmlBeansException if we cannot determine if there are xsd files */ private boolean hasSchemas() throws XmlBeansException { int xsds = getXsdFiles().length; int wsdls = getWsdlFiles().length; getLog().debug("Number of XSD Files: " + xsds ); getLog().debug("Number of WSDL Files: " + wsdls ); return xsds > 0 || wsdls > 0; } protected abstract void updateProject(MavenProject project, SchemaCompiler.Parameters compilerParams, boolean stale) throws DependencyResolutionRequiredException, XmlBeansException; protected abstract List getXsdJars(); protected abstract File getGeneratedSchemaDirectory(); private void touchStaleFile() throws IOException { File staleFile = getStaleFile(); if ( !staleFile.exists() ) { staleFile.getParentFile().mkdirs(); staleFile.createNewFile(); getLog().debug( "Stale flag file created." ); } else { staleFile.setLastModified( System.currentTimeMillis() ); } } /** * @return True if xsd or wsdl files have been modified since the last build (newer than the staleFlag file). * @throws XmlBeansException if we cannot locate one of the xsd or wsdl files */ private boolean isOutputStale() throws XmlBeansException { File staleFile = getStaleFile(); boolean stale = !staleFile.exists(); if ( !stale ) { getLog().debug( "Stale flag file exists." ); long staleMod = staleFile.lastModified(); // check xsds. getLog().debug( "Comparing to xsd's modification time." ); final File[] sourceXsds = getXsdFiles(); int fileCount = sourceXsds.length; getLog().debug( fileCount + " xsd to compare." ); for ( int i = 0; i < fileCount; i++ ) { if ( sourceXsds[i].lastModified() > staleMod ) { getLog().debug( sourceXsds[i].getName() + " is newer than the stale flag file." ); stale = true; } } // check wsdls getLog().debug( "Comparing to wsdl's modification time." ); final File[] sourceWsdls = getWsdlFiles(); fileCount = sourceWsdls.length; getLog().debug( fileCount + " wsdl to compare." ); for ( int i = 0; i < fileCount; i++ ) { if ( sourceWsdls[i].lastModified() > staleMod ) { getLog().debug( sourceWsdls[i].getName() + " is newer than the stale flag file." ); stale = true; } } } return stale; } public abstract File getBaseDir(); public abstract File getStaleFile(); public abstract File getDefaultXmlConfigDir(); /** * Returns the directory where the schemas are located. Note that this is * the base directory of the schema compiler, not the maven project. * * @return The schema directory. */ public abstract File getSchemaDirectory(); /** * Returns a classpath for the compiler made up of artifacts from the * project. * * @return Array of classpath entries. */ public final File[] getClasspath() throws DependencyResolutionRequiredException { List results = new ArrayList(); for ( Iterator i = project.getCompileClasspathElements().iterator(); i.hasNext(); ) { results.add( new File( (String) i.next() ) ); } return ( File[] ) results.toArray( EMPTY_FILE_ARRAY ); } /** * Returns null. Currently the compiler preference isn't passwed to the xml * beans compiler. * * @return null. */ public final String getCompiler() { return compiler; } /** * Returns configuration files identified in the xmlConfigs string passed by * the project configuration. If none were identified, a check is made for * the default xsd config directory src/xsdconfig. * * @return An array of configuration files. */ public final File[] getConfigFiles() throws XmlBeansException { File defaultXmlConfigDir = getDefaultXmlConfigDir(); getLog().debug( "Creating a list of config files." ); try { if ( xmlConfigs != null ) { return ( File[] ) getFileList( xmlConfigs ).toArray( new File[]{} ); } else if ( defaultXmlConfigDir.exists() ) { getLog().debug( "Examining " + defaultXmlConfigDir + " for config files." ); List defaultDir = new ArrayList(); defaultDir.add( defaultXmlConfigDir ); return ( File[] ) getFileList( defaultDir ).toArray( new File[]{} ); } else { return null; } } catch ( XmlBeansException xmlbe ) { throw new XmlBeansException( XmlBeansException.INVALID_CONFIG_FILE, xmlbe ); } } /** * Recursively travers the file list and it's subdirs and produce a single * flat list of the files. * * @param fileList list of files * @return files */ private final List getFileList( List fileList ) throws XmlBeansException { if ( fileList != null ) { getLog().debug( "A list was given." ); List files = new ArrayList(); File nextFile; DirectoryScanner scanner = new DirectoryScanner(); // String[] includes = {"**/*"}; // scanner.setIncludes(includes); scanner.setCaseSensitive( false ); scanner.addDefaultExcludes(); for ( Iterator iterator = fileList.iterator(); iterator.hasNext(); ) { nextFile = ( File ) iterator.next(); if ( nextFile.exists() ) { if ( nextFile.isDirectory() ) { scanner.setBasedir( nextFile ); scanner.scan(); String[] fileArray = scanner.getIncludedFiles(); if ( fileArray != null ) { for ( int i = 0; i < fileArray.length; i++ ) { getLog().debug( "Adding " + fileArray[i] ); files.add( new File( nextFile, fileArray[i] ) ); } } } else { files.add( nextFile ); } } else { throw new XmlBeansException( XmlBeansException.MISSING_FILE, nextFile .getAbsolutePath() ); } } return files; } else { getLog().debug( "No list was given. Returning." ); return null; } } /** * Returns a null entity resolver. * * @return entityResolver set to null. */ public final EntityResolver getEntityResolver() { return entityResolver; } /** * Returns an empty collection the compiler will store error message Strings * in. * * @return An empty ArrayList. */ public final Collection getErrorListeners() { return new ArrayList(); } /** * Todo: Not certain of the purpose of this. * * @return null at this time. */ public final List getExtensions() { return null; } /** * Used during testing. * * @param project the maven project we are setting. */ final void setProject( MavenProject project ) { this.project = project; } /** * An array of other source files. Currently an empty array. * * @return An empty file array. */ public final File[] getJavaFiles() { return new File[]{}; } /** * Returns null at this time. Passed to the schema compiler. * * @return null. */ public final Set getMdefNamespaces() { return mdefNamespaces; } /** * * * */ public final String getJavaSource() { return javaSource; } /** * Returns the initial size of the memory allocation for the schema compile * process. * * @return The initial memory size value. */ public final String getMemoryInitialSize() { return memoryInitialSize; } /** * Returns the maximum size of the memory allocation for the schema compile * process. * * @return The max memory size value. */ public final String getMemoryMaximumSize() { return memoryMaximumSize; } /** * Returns null at this time. This is passed to the schema compiler. * * @return null. */ public final String getName() { return null; } /** * Returns the location of the output jar file should one be produced. If * it has been set, make sure the directories exist before passing it * to the xml beans compiler. * * @return The jar file location. * @number MXMLBEANS-17 */ public final File getOutputJar() { if ( outputJar != null ) { outputJar.getParentFile().mkdirs(); } return outputJar; } /** * Todo: Not certain of the purpose of this. * * @return null at this time. */ public final String getRepackage() { return null; } /** * Returns the name of the file used to resolve xml entities. * * @return The entity resolver catalog file location. * @number MXMLBEANS-3 */ public final boolean hasCatalogFile() { getLog().debug( "looking for resolver catalog at " + catalogLocation.getAbsolutePath() ); return catalogLocation.exists(); } /** * Returns the name of the file used to resolve xml entities. * * @return The entity resolver catalog file location. * @number MXMLBEANS-3 */ public final String getCatalogFile() { getLog().debug( "Using resolver catalog." ); return catalogLocation.getAbsolutePath(); } /** * Returns a file array of xsd files to translate to object models. * * @return An array of schema files to be parsed by the schema compiler. * @number MXMLBEANS-21 */ public final File[] getXsdFiles() throws XmlBeansException { xsdFiles = getFiles(xsdFiles, "**/*.xsd"); return xsdFiles; } /** * Returns a file array of wsdl files to translate to object models. * * @return An array of wsdl files to be parsed by the schema compiler. */ public final File[] getWsdlFiles() throws XmlBeansException { wsdlFiles = getFiles(wsdlFiles, "**/*.wsdl"); return wsdlFiles; } private File[] getFiles( final File[] schemaFiles, final String includeFilter ) throws XmlBeansException { // Already got files once before, so no need to do the work again if ( schemaFiles != null ) { return schemaFiles; } final List schemas = new ArrayList(); File schemaDirectory = getSchemaDirectory(); getLog().debug( "The schema Directory is " + schemaDirectory ); // if list of schemas to process exists, add schemas from xsdJars and schemaDirectory only if ( sourceSchemas != null ) { // collect schemas from artifacts Map artifactSchemas = getArtifactSchemas(); File nextFile; for ( Iterator iterator = sourceSchemas.iterator(); iterator.hasNext(); ) { String schemaName = (String) iterator.next(); String ext = FileUtils.getExtension( schemaName ); if ( !includeFilter.endsWith( ext ) ) { continue; } nextFile = new File( schemaDirectory, schemaName ); if ( nextFile.exists() ) { // add schema if it exists in schemaDirectory schemas.add( nextFile ); } else if ( artifactSchemas.containsKey( schemaName ) ) { // add schema if it's in an artfact schemas.add( artifactSchemas.get( schemaName ) ); } else { // throw exception if schema can't be found String[] fields = new String[3]; fields[0] = schemaName; fields[1] = schemaDirectory.getAbsolutePath(); fields[2] = ( artifactMap.isEmpty() ? "" : " or the schema artifact(s)" ); throw new XmlBeansException( XmlBeansException.MISSING_SCHEMA_FILE, fields ); } } return (File[]) schemas.toArray( new File[schemas.size()] ); } // if list of schemas to process was not provided // add all schemas from xsdJars that match filter Map artifactSchemas = getArtifactSchemas(); if ( !artifactSchemas.isEmpty() ) { File nextFile; for ( Iterator fileIterator = artifactSchemas.values().iterator(); fileIterator.hasNext(); ) { nextFile = (File) fileIterator.next(); String ext = FileUtils.getExtension( nextFile.getName() ); if ( includeFilter.endsWith( ext ) ) { schemas.add( nextFile ); } } } // add all schemas from xsdJars that match filter if ( schemaDirectory.exists() ) { DirectoryScanner scanner = new DirectoryScanner(); scanner.setBasedir( schemaDirectory ); getLog().debug( "Scanning for " + includeFilter ); String[] includes = {includeFilter}; scanner.setIncludes( includes ); scanner.addDefaultExcludes(); scanner.setCaseSensitive( false ); scanner.scan(); String[] files = scanner.getIncludedFiles(); if ( files != null ) { for ( int i = 0; i < files.length; i++ ) { getLog().debug( "Adding " + files[i] ); schemas.add( new File( schemaDirectory, files[i] ) ); } } } return (File[]) schemas.toArray( new File[schemas.size()] ); } /** * Sweep through the jar artifacts which contain xsds and produce a list of * paths to each xsd within the file. Leave it up to the entity resolver to * pass the actual file to the compiler. * * @return A list of path's to the XSD's in the artifact jars. This doesn't * include the jar paths. * @number MXMLBEANS-21 */ private Map getArtifactSchemas() throws XmlBeansException { getLog().debug( "Artifact count: " + artifactMap.size() ); SchemaArtifactLookup lookup = new SchemaArtifactLookup( artifactMap, getLog() ); Map artifactSchemas = new HashMap(); List xsdJars = getXsdJars(); File prefix = getGeneratedSchemaDirectory(); int count = xsdJars.size(); // Collect the file paths to the actual jars Artifact nextArtifact; getLog().debug( "looking for artifact schemas." ); for ( int i = 0; i < count; i++ ) { if ( getLog().isDebugEnabled() ) { getLog().debug( "resolving " + xsdJars.get( i ) + " into a file path." ); } nextArtifact = lookup.find( ( String ) xsdJars.get( i ) ); artifactSchemas.putAll( SchemaArtifact.getFilePaths( nextArtifact, getLog(), prefix ) ); } return artifactSchemas; } /** * Returns the state of debuggin. * * @return true if debug mode. */ public final boolean isDebug() { return debug; } /** * Returns true if dependencies are to be downloaded by the schema compiler. * * @return true if resources should be downloaded. */ public final boolean isDownload() { return download; } /** * Returns true if jaxb is set. * * @return true if the jaxb flag on the schema compiler should be set. */ public final boolean isJaxb() { return jaxb; } public final boolean isNoAnn() { return noAnn; } public final boolean isNoVDoc() { return noVDoc; } /** * Returns True if generated source files are not to be compiled. * * @return true if no compiling should occur. */ public final boolean isNoJavac() { return noJavac; } /** * Do not enforce the particle valid (restriction) rule if true. * * @return true if no enforcement should occur. */ public final boolean isNoPvr() { return noPvr; } /** * If true, do not enforce the unique particle attribution rule. * * @return particle attibution enforcement */ public final boolean isNoUpa() { return noUpa; } /** * Returns true if the schema compiler should reduce verbosity. * * @return true if message suppression is on. */ public final boolean isQuiet() { return quiet; } /** * Returns true if the schema compiler should increase verbosity. * * @return true if verbose mode is on. */ public final boolean isVerbose() { return verbose; } /** * No validation beyond those done by the maven plugin occur at this time. * * @throws XmlBeansException Currently not used. */ public final void validate() throws XmlBeansException { } } xmlbeans-maven-plugin-2.3.3/src/main/java/org/codehaus/mojo/xmlbeans/CompileXmlBeansMojo.java000066400000000000000000000140061160146537700322500ustar00rootroot00000000000000package org.codehaus.mojo.xmlbeans; /** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.apache.maven.artifact.DependencyResolutionRequiredException; import org.apache.maven.project.MavenProject; import org.apache.maven.model.Resource; import org.apache.xmlbeans.impl.tool.SchemaCompiler; import org.codehaus.plexus.util.FileUtils; /** *

A Maven 2 plugin which parses xsd files and produces a corresponding object * model based on the Apache XML Beans parser.

*

*

The plugin produces two sets of output files referred to as generated sources * and generated classes. The former is then compiled to the build * outputDirectory. The latter is generated in this directory.

*

*

Note that the descriptions for the goal's parameters have been blatently * copied from http://xmlbeans.apache.org/docs/2.0.0/guide/antXmlbean.html for * convenience.

* * @author Brett Porter * @author Kris Bravo * @version $Id: CompileXmlBeansMojo.java 10704 2009-09-15 01:08:40Z djencks $ * @goal xmlbeans * @phase generate-sources * @requiresDependencyResolution compile * @description Creates java beans which map to XML schemas. */ public class CompileXmlBeansMojo extends AbstractXmlBeansPlugin { /** * The directory where .xsd files are to be found. * * @parameter default-value="${basedir}/src/main/xsd" * @required */ protected File schemaDirectory; /** * List of artifacts whose xsds need to be compiled. * * @parameter */ private List xsdJars; /** * The directory where .xsd's pulled from xsdJars will be stored. * * @parameter default-value="${project.build.directory}/xmlbeans-xsds" * @parameter */ private File generatedSchemaDirectory; /** * Set a location to generate CLASS files into. * * @parameter expression="${xmlbeans.classGenerationDirectory}" default-value="${project.build.directory}/generated-classes/xmlbeans" * @required */ protected File classGenerationDirectory; /** * Set a location to generate JAVA files into. * * @parameter expression="${xmlbeans.sourceGenerationDirectory}" default-value="${project.build.directory}/generated-sources/xmlbeans" * @required */ protected File sourceGenerationDirectory; /** * The location of the flag file used to determine if the output is stale. * * @parameter expression="${xmlbeans.staleFile}" default-value="${project.build.directory}/generated-sources/xmlbeans/.staleFlag" * @required */ protected File staleFile; /** * Default xmlConfigs directory. If no xmlConfigs list is specified, this * one is checked automatically. * * @parameter expression="${xmlbeans.defaultXmlConfigDir}" default-value="${basedir}/src/main/xsdconfig" */ protected File defaultXmlConfigDir; /** * Empty constructor for the XML Beans plugin. */ public CompileXmlBeansMojo() { } protected void updateProject( MavenProject project, SchemaCompiler.Parameters compilerParams, boolean stale ) throws DependencyResolutionRequiredException, XmlBeansException { getLog().debug( "Adding " + compilerParams.getSrcDir().getAbsolutePath() + " to the project's compile sources." ); project.addCompileSourceRoot( compilerParams.getSrcDir().getAbsolutePath() ); Resource resource = new Resource(); resource.setDirectory(compilerParams.getClassesDir().getAbsolutePath()); resource.setFiltering(false); project.addResource(resource); } /** * Returns the directory where the schemas are located. Note that this is * the base directory of the schema compiler, not the maven project. * * @return The schema directory. */ public File getBaseDir() { return getSchemaDirectory(); } /** * Returns the class directory of the project. * * @return The project build classes directory. */ public final File getGeneratedClassesDirectory() { return classGenerationDirectory; } /** * Returns the directory for saving generated source files. * * @return The generated=sources directory. */ public final File getGeneratedSourceDirectory() { return sourceGenerationDirectory; } public File getStaleFile() { return staleFile; } public File getDefaultXmlConfigDir() { return defaultXmlConfigDir; } /** * Returns the directory where the schemas are located. Note that this is * the base directory of the schema compiler, not the maven project. * * @return The schema directory. */ public File getSchemaDirectory() { return schemaDirectory; } /** * Returns the list of xsd jars. */ protected List getXsdJars() { if ( xsdJars == null ) { xsdJars = new ArrayList(); } return xsdJars; } protected File getGeneratedSchemaDirectory() { return generatedSchemaDirectory; } } xmlbeans-maven-plugin-2.3.3/src/main/java/org/codehaus/mojo/xmlbeans/FilteredJarFile.java000066400000000000000000000104031160146537700313710ustar00rootroot00000000000000package org.codehaus.mojo.xmlbeans; /** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; import java.util.Enumeration; import java.util.List; import java.util.jar.JarEntry; import java.util.jar.JarFile; import org.apache.maven.plugin.logging.Log; public class FilteredJarFile extends JarFile { private Log logger; public FilteredJarFile( File arg0, Log log ) throws IOException { super( arg0 ); logger = log; } public List getEntryPathsAndExtract( String[] filter, File prefix ) throws IOException { final List entries = new ArrayList(); JarEntry nextEntry; for ( Enumeration e = entries(); e.hasMoreElements(); ) { nextEntry = ( ( JarEntry ) e.nextElement() ); if ( !nextEntry.isDirectory() && !isFiltered( nextEntry.getName(), filter ) ) { logger.debug( "adding and extracting " + nextEntry.getName() ); extractEntry( prefix, nextEntry ); entries.add( nextEntry.getName() ); } } return entries; } private boolean isFiltered( final String name, final String[] filter ) { int size = filter.length; if ( name != null ) { for ( int i = 0; i < size; i++ ) { if ( name.endsWith( filter[i] ) ) { logger.debug( "Accepting " + name ); return false; } } logger.debug( "Filtering " + name ); return true; } else { logger.debug( "Filtering out null." ); return true; } } /** * Unpack this entry into the given file location. * * @param prefix The directory to unpack to. * @param entry The entry to unpack. * @throws java.io.IOException if entry cannot be extracted. */ public void extractEntry( File prefix, JarEntry entry ) throws IOException { File output = new File( prefix, entry.getName() ); // only do this if the file doesn't exist; otherwise we throw off the // stale file check. if ( !output.exists() ) { output.getParentFile().mkdirs(); output.createNewFile(); InputStream ios = null; FileOutputStream fos = null; try { ios = getInputStream( entry ); fos = new FileOutputStream( output ); byte[] buf = new byte[8192]; while ( true ) { int length = ios.read( buf ); if ( length < 0 ) break; fos.write( buf, 0, length ); } } finally { if ( ios != null ) { try { ios.close(); } catch ( IOException ignore ) { //ignore } } if ( fos != null ) { try { fos.close(); } catch ( IOException ignore ) { //ignore } } } } } } xmlbeans-maven-plugin-2.3.3/src/main/java/org/codehaus/mojo/xmlbeans/ParameterAdapter.java000066400000000000000000000117501160146537700316250ustar00rootroot00000000000000package org.codehaus.mojo.xmlbeans; /** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import java.io.IOException; import org.apache.maven.artifact.DependencyResolutionRequiredException; import org.apache.xml.resolver.CatalogManager; import org.apache.xml.resolver.tools.CatalogResolver; import org.apache.xmlbeans.impl.tool.SchemaCompiler; import org.xml.sax.EntityResolver; import org.xml.sax.InputSource; import org.xml.sax.SAXException; /** * @author Kris Bravo * @version $Id: ParameterAdapter.java 6588 2008-03-28 12:22:57Z bentmann $ */ public final class ParameterAdapter { /** * Creates a new instance of ParameterAdapter. */ private ParameterAdapter() { } /** * Returns a parameter set appropriate for the SchemaCompiler. * * @param properties XML Bean Plugin properties. * @return Parameters for the schema compiler * @throws DependencyResolutionRequiredException * Maven Dependencies were * not resolved. * @number MXMLBEANS-3 * @throws XmlBeansException if we cannot translate the compiler parameters */ static SchemaCompiler.Parameters getCompilerParameters( final PluginProperties properties ) throws DependencyResolutionRequiredException, XmlBeansException { SchemaCompiler.Parameters params = new SchemaCompiler.Parameters(); params.setBaseDir( properties.getBaseDir() ); params.setXsdFiles( properties.getXsdFiles() ); params.setWsdlFiles( properties.getWsdlFiles() ); params.setJavaFiles( properties.getJavaFiles() ); params.setConfigFiles( properties.getConfigFiles() ); params.setClasspath( properties.getClasspath() ); params.setOutputJar( properties.getOutputJar() ); params.setName( properties.getName() ); params.setSrcDir( properties.getGeneratedSourceDirectory() ); params.setClassesDir( properties.getGeneratedClassesDirectory() ); params.setCompiler( properties.getCompiler() ); params.setMemoryInitialSize( properties.getMemoryInitialSize() ); params.setMemoryMaximumSize( properties.getMemoryMaximumSize() ); params.setNojavac( properties.isNoJavac() ); params.setQuiet( properties.isQuiet() ); params.setVerbose( properties.isVerbose() ); params.setDownload( properties.isDownload() ); params.setNoUpa( properties.isNoUpa() ); params.setNoPvr( properties.isNoPvr() ); params.setNoAnn( properties.isNoAnn() ); params.setNoVDoc( properties.isNoVDoc() ); params.setDebug( properties.isDebug() ); if ( properties.hasCatalogFile() ) { CatalogManager catalogManager = CatalogManager.getStaticManager(); catalogManager.setCatalogFiles( properties.getCatalogFile() ); EntityResolver entityResolver = new CatalogResolver(); entityResolver = new PassThroughResolver( entityResolver ); params.setEntityResolver( entityResolver ); } params.setErrorListener( properties.getErrorListeners() ); params.setRepackage( properties.getRepackage() ); params.setExtensions( properties.getExtensions() ); params.setMdefNamespaces( properties.getMdefNamespaces() ); params.setJavaSource( properties.getJavaSource() ); return params; } private static class PassThroughResolver implements EntityResolver { private final EntityResolver delegate; public PassThroughResolver( EntityResolver delegate ) { this.delegate = delegate; } public InputSource resolveEntity( String publicId, String systemId ) throws SAXException, IOException { if ( delegate != null ) { InputSource is = delegate.resolveEntity( publicId, systemId ); if ( is != null ) { return is; } } System.out.println( "Could not resolve publicId: " + publicId + ", systemId: " + systemId + " from catalog, looking in current directory" ); return new InputSource( systemId ); } } } xmlbeans-maven-plugin-2.3.3/src/main/java/org/codehaus/mojo/xmlbeans/PluginProperties.java000066400000000000000000000162431160146537700317210ustar00rootroot00000000000000package org.codehaus.mojo.xmlbeans; /** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import java.io.File; import java.util.Collection; import java.util.List; import java.util.Set; import org.apache.maven.artifact.DependencyResolutionRequiredException; import org.xml.sax.EntityResolver; /** * An object which isolates the properties the XML Bean plugin uses to operate. * If you pass this object a handle to the MavenProject, it will * return an instance of itself populated to reflect the project. * * @author Kris Bravo * @version $Id: PluginProperties.java 8037 2008-11-10 23:34:57Z kbravo $ */ interface PluginProperties { /** * Returns configuration files identified in the xmlConfigs string passed * by the project configuration. * * @return An array of configuration files. */ File[] getConfigFiles() throws XmlBeansException; /** * Returns a file array of xsd files to translate to object models. * * @return An array of schema files to be parsed by the schema compiler. */ File[] getXsdFiles() throws XmlBeansException; /** * Returns the directory where the schemas are located. Note that this is * the base directory of the schema compiler, not the maven project. * * @return The schema directory. */ File getBaseDir(); /** * Returns the location of the output jar file should one be produced. * * @return The jar file location. */ File getOutputJar(); /** * The name of the package that the TypeSystemHolder class should be * generated in. Normally this should be left unspecified. None of the * XMLBeans are generated in this package. Use .xsdconfig files to modify * XMLBean package or class names. * * @return The name of the package. */ String getName(); /** * Returns null. Currently the compiler preference isn't passwed to the xml beans * compiler. * * @return null. */ String getCompiler(); /** * Returns an array of the WSDL files used for the schema object generation. * * @return A file array of wsdl files. */ File[] getWsdlFiles() throws XmlBeansException; /** * Returns the java source files to compile. * * @return An array of java files. */ File[] getJavaFiles(); /** * Returns true if the catalog file exists. * * @return The existence of the catalog file. * @number MXMLBEANS-3 */ boolean hasCatalogFile(); /** * Returns the name of the file used to resolve xml entities. * * @return The entity resolver catalog file location. * @number MXMLBEANS-3 */ String getCatalogFile(); /** * Returns a classpath for the compiler made up of artifacts from the project. * * @return Array of classpath entries. * @throws DependencyResolutionRequiredException * Maven Dependencies weren't resolved. */ File[] getClasspath() throws DependencyResolutionRequiredException; /** * Returns the directory for saving generated source files. * * @return The generated=sources directory. */ File getGeneratedSourceDirectory(); /** * Returns the class directory of the project. * * @return The project build classes directory. */ File getGeneratedClassesDirectory(); /** * Returns an empty collection the compiler will store error message Strings * in. * * @return An empty ArrayList. */ Collection getErrorListeners(); /** * Returns a null entity resolver. * * @return entityResolver set to null. */ EntityResolver getEntityResolver(); /** * Returns the initial size of the memory allocation for the schema compile process. * * @return The initial memory size value. */ String getMemoryInitialSize(); /** * Returns the maximum size of the memory allocation for the schema compile process. * * @return The max memory size value. */ String getMemoryMaximumSize(); /** * Todo: Not certain of the purpose of this. * * @return null at this time. */ String getRepackage(); /** * Todo: Not certain of the purpose of this. * * @return null at this time. */ List getExtensions(); /** * Returns null at this time. Passed to the schema compiler. * * @return null. */ Set getMdefNamespaces(); /** * Returns the javasource parameter which specifies an option to * the XmlBeans code generator. * * @return null. */ String getJavaSource(); /** * Returns True if generated source files are not to be compiled. * * @return true if no compiling should occur. */ boolean isNoJavac(); /** * Returns true if the schema compiler should reduce verbosity. * * @return true if message suppression is on. */ boolean isQuiet(); /** * Returns true if the schema compiler should increase verbosity. * * @return true if verbose mode is on. */ boolean isVerbose(); /** * Returns true if dependencies are to be downloaded by the schema compiler. * * @return true if resources should be downloaded. */ boolean isDownload(); /** * If true, do not enforce the unique particle attribution rule. * * @return particle attibution enforcement */ boolean isNoUpa(); /** * Do not enforce the particle valid (restriction) rule if true. * * @return true if no enforcement should occur. */ boolean isNoPvr(); /** * Returns the debug flag setting. * * @return True if debugging is turned on. */ boolean isDebug(); /** * Returns the jaxb setting. * * @return True if the jaxb flag is set. */ boolean isJaxb(); /** * If true, annotations in the schema are ignored * * @return true if annotations in the source schema are to be ignored */ boolean isNoAnn(); /** * If true, documentation elements in the source schema are ignored. * * @return */ boolean isNoVDoc(); /** * Validate all of the fields for proper usage. * * @throws XmlBeansException Validation failed. */ void validate() throws XmlBeansException; } xmlbeans-maven-plugin-2.3.3/src/main/java/org/codehaus/mojo/xmlbeans/SchemaArtifact.java000066400000000000000000000050531160146537700312610ustar00rootroot00000000000000package org.codehaus.mojo.xmlbeans; /** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import java.io.File; import java.io.IOException; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import org.apache.maven.artifact.Artifact; import org.apache.maven.plugin.logging.Log; public class SchemaArtifact { private static final String[] XSD_SUFFIXES = {"xsd", "XSD"}; /** * Assuming that the artifact has a file handle, returns a collection of strings * pointing to each xsd file within the jar. * * @return Collection of xsd file paths relative to the jar file. * @number MXMLBEANS-21 */ public static Map getFilePaths( Artifact artifact, Log logger, File prefix ) throws XmlBeansException { Map xsds = new HashMap(); File artifactFile = artifact.getFile(); List nextSet; if ( artifactFile != null ) { try { FilteredJarFile jarFile = new FilteredJarFile( artifactFile, logger ); nextSet = jarFile.getEntryPathsAndExtract( XSD_SUFFIXES, prefix ); String fileName; for ( Iterator i = nextSet.iterator(); i.hasNext(); ) { fileName = ( String ) i.next(); logger.debug( "Adding " + fileName + "from an artifact." ); xsds.put( fileName, new File( prefix, fileName ) ); } } catch ( IOException ioe ) { throw new XmlBeansException( XmlBeansException.XSD_ARTIFACT_JAR, ioe ); } } else { throw new XmlBeansException( XmlBeansException.ARTIFACT_FILE_PATH, artifact.toString() ); } return xsds; } } xmlbeans-maven-plugin-2.3.3/src/main/java/org/codehaus/mojo/xmlbeans/SchemaArtifactLookup.java000066400000000000000000000057571160146537700324660ustar00rootroot00000000000000package org.codehaus.mojo.xmlbeans; /** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import java.util.Map; import java.util.StringTokenizer; import org.apache.maven.artifact.Artifact; import org.apache.maven.plugin.logging.Log; public class SchemaArtifactLookup { private Log logger; private Map artifacts; public SchemaArtifactLookup( Map projectArtifacts, Log log ) { artifacts = projectArtifacts; logger = log; } /** * Finds an artifact in the list of project artifacts and * returns a casted version of it with extra helper methods. * * @param string * @return */ public Artifact find( String string ) throws XmlBeansException { Artifact result = null; if ( artifacts.containsKey( string ) ) { result = ( Artifact ) artifacts.get( string ); } else { throw new XmlBeansException( XmlBeansException.INVALID_ARTIFACT_REFERENCE, string ); } return result; } private class ArtifactReference { String groupId; String artifactId; private ArtifactReference( String path ) throws XmlBeansException { StringTokenizer tokens = new StringTokenizer( path, ":" ); if ( tokens.countTokens() == 2 ) { groupId = tokens.nextToken(); artifactId = tokens.nextToken(); } else { throw new XmlBeansException( XmlBeansException.INVALID_ARTIFACT_REFERENCE, path ); } } public boolean equals( Object candidate ) { boolean outcome = false; if ( candidate instanceof Artifact ) { Artifact artifact = ( Artifact ) candidate; outcome = groupId.equals( artifact.getGroupId() ) && artifactId.equals( artifact.getArtifactId() ); } return outcome; } public int hashCode() { int result; result = ( groupId != null ? groupId.hashCode() : 0 ); result = 31 * result + ( artifactId != null ? artifactId.hashCode() : 0 ); return result; } } } xmlbeans-maven-plugin-2.3.3/src/main/java/org/codehaus/mojo/xmlbeans/TestXmlBeansMojo.java000066400000000000000000000136661160146537700316120ustar00rootroot00000000000000package org.codehaus.mojo.xmlbeans; /** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.apache.maven.artifact.DependencyResolutionRequiredException; import org.apache.maven.project.MavenProject; import org.apache.maven.model.Resource; import org.apache.xmlbeans.impl.tool.SchemaCompiler; import org.codehaus.plexus.util.FileUtils; /** *

A Maven 2 plugin which parses xsd files and produces a corresponding object * model based on the Apache XML Beans parser.

*

*

The plugin produces two sets of output files referred to as generated sources * and generated classes. The former is then compiled to the build * outputDirectory. The latter is generated in this directory.

*

*

Note that the descriptions for the goal's parameters have been blatently * copied from http://xmlbeans.apache.org/docs/2.0.0/guide/antXmlbean.html for * convenience.

* * @author Brett Porter * @author Kris Bravo * @version $Id: TestXmlBeansMojo.java 10704 2009-09-15 01:08:40Z djencks $ * @goal xmlbeans-test * @phase generate-test-sources * @requiresDependencyResolution compile * @description Creates java beans which map to XML schemas. */ public class TestXmlBeansMojo extends AbstractXmlBeansPlugin { /** * The directory where .xsd files are to be found. * * @parameter default-value="${basedir}/src/test/xsd" * @required */ protected File schemaDirectory; /** * List of artifacts whose xsds need to be compiled. * * @parameter */ private List testXsdJars; /** * The directory where .xsd's pulled from xsdJars will be stored. * * @parameter default-value="${project.build.directory}/test-xmlbeans-xsds" * @parameter */ private File generatedSchemaDirectory; /** * Set a location to generate CLASS files into. * * @parameter expression="${xmlbeans.classGenerationDirectory}" default-value="${project.build.directory}/generated-classes/test-xmlbeans" * @required */ protected File classGenerationDirectory; /** * Set a location to generate JAVA files into. * * @parameter expression="${xmlbeans.sourceGenerationDirectory}" default-value="${project.build.directory}/generated-sources/test-xmlbeans" * @required */ protected File sourceGenerationDirectory; /** * The location of the flag file used to determine if the output is stale. * * @parameter expression="${xmlbeans.staleFile}" default-value="${project.build.directory}/generated-sources/test-xmlbeans/.staleFlag" * @required */ protected File staleFile; /** * Default xmlConfigs directory. If no xmlConfigs list is specified, this * one is checked automatically. * * @parameter expression="${xmlbeans.defaultXmlConfigDir}" default-value="${basedir}/src/test/xsdconfig" */ protected File defaultXmlConfigDir; /** * Empty constructor for the XML Beans plugin. */ public TestXmlBeansMojo() { } protected void updateProject( MavenProject project, SchemaCompiler.Parameters compilerParams, boolean stale ) throws DependencyResolutionRequiredException, XmlBeansException { project.addTestCompileSourceRoot( compilerParams.getSrcDir().getAbsolutePath() ); Resource resource = new Resource(); resource.setDirectory(compilerParams.getClassesDir().getAbsolutePath()); resource.setFiltering(false); project.addTestResource(resource); } /** * Returns the directory where the schemas are located. Note that this is * the base directory of the schema compiler, not the maven project. * * @return The schema directory. */ public File getBaseDir() { return getSchemaDirectory(); } /** * Returns the class directory of the project. * * @return The project build classes directory. */ public final File getGeneratedClassesDirectory() { return classGenerationDirectory; } /** * Returns the directory for saving generated source files. * * @return The generated=sources directory. */ public final File getGeneratedSourceDirectory() { return sourceGenerationDirectory; } public File getStaleFile() { return staleFile; } public File getDefaultXmlConfigDir() { return defaultXmlConfigDir; } /** * Returns the directory where the schemas are located. Note that this is * the base directory of the schema compiler, not the maven project. * * @return The schema directory. */ public File getSchemaDirectory() { return schemaDirectory; } /** * Returns the list of xsd jars. */ protected List getXsdJars() { if ( testXsdJars == null ) { testXsdJars = new ArrayList(); } return testXsdJars; } protected File getGeneratedSchemaDirectory() { return generatedSchemaDirectory; } } xmlbeans-maven-plugin-2.3.3/src/main/java/org/codehaus/mojo/xmlbeans/XmlBeansException.java000066400000000000000000000127621160146537700320000ustar00rootroot00000000000000package org.codehaus.mojo.xmlbeans; /** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import java.util.ResourceBundle; import org.codehaus.mojo.exception.CodedException; import org.codehaus.mojo.exception.Error; /** * An error occurring within the XmlBeans plugin. Look, hardcoding strings, bad * idea, correct? This subclass of CodedException has all varieties of this * exception indicated by a static Error object. To throw an exception, pass the * specific Error constant as the first parameter in it's constructor. All * of the error messages themselves may be found in XmlBeansException.properties * * @author Kris Bravo * @version $Id: XmlBeansException.java 6588 2008-03-28 12:22:57Z bentmann $ */ public class XmlBeansException extends CodedException { /** * */ private static final long serialVersionUID = -7072954264233215003L; /** * The publisher specified in the configuration isn't valid. */ public static final Error REQ_FILE_MISSING = new Error( "file.requirements.missing" ); /** * setProject was never called on XmlBeansPlugin so the PluginProperties was never set. */ public static final Error UNSET_PROPERTIES = new Error( "properties.unset" ); /** * We need the schema directory to continue. */ public static final Error MISSING_SCHEMA_DIRECTORY = new Error( "directory.schema.missing" ); /** * Errors occurred during the compile phase of the plugins process. */ public static final Error COMPILE_ERRORS = new Error( "compile.errors" ); /** * Something went wrong while looking up the classpath. */ public static final Error CLASSPATH_DEPENDENCY = new Error( "classpath.dependency" ); public static final Error MISSING_FILE = new Error( "file.missing" ); public static final Error INVALID_CONFIG_FILE = new Error( "file.config.missing" ); public static final Error XSD_ARTIFACT_JAR = new Error( "xsd.artifact.missing" ); public static final Error ARTIFACT_FILE_PATH = new Error( "xsd.artifact.file.missing" ); public static final Error INVALID_ARTIFACT_REFERENCE = new Error( "artifact.path.invalid" ); /** * The handle to the resource bundle containing the errors. */ private static final ResourceBundle ERROR_TABLE = ResourceBundle.getBundle( XmlBeansException.class.getName() ); public static final Error STALE_FILE_TOUCH = new Error( "file.stale.io" ); public static final Error MISSING_SCHEMA_FILE = new Error( "missing.schema.file" ); public static final Error COPY_CLASSES = new Error( "copy.classes" ); /** * A part specific exception with a specific error code. * * @param code */ public XmlBeansException( Error code ) { super( code ); initResource(); } /** * A part specific exception with an error code and fields in the * message. * * @param code * @param fields */ public XmlBeansException( Error code, String[] fields ) { super( code, fields ); initResource(); } /** * A part specific exception with an error code and fields in the * message. * * @param code * @param field */ public XmlBeansException( Error code, String field ) { super( code, field ); initResource(); } /** * Creates a new Coded CAM Exception, given an error code and root cause. * * @param code The Error of this particular exception. * @param exception The root cause of the problem. */ public XmlBeansException( Error code, Throwable exception ) { super( code, exception ); initResource(); } /** * Creates a coded exception with fields and a root cause. * * @param code The code key used to look up the error text. * @param field A single value with which to replace the error message field. * @param exception The source of the error. */ public XmlBeansException( Error code, String field, Throwable exception ) { super( code, field, exception ); initResource(); } /** * Creates a coded exception with fields and a root cause. * * @param code The code key used to look up the error text. * @param fields An array of field values to replace fields in the error message. * @param exception The source of the error. */ public XmlBeansException( Error code, String[] fields, Throwable exception ) { super( code, fields, exception ); initResource(); } /** * Set the resource bundle table for this subclass of CodedException. */ private void initResource() { errors = ERROR_TABLE; } } xmlbeans-maven-plugin-2.3.3/src/main/resources/000077500000000000000000000000001160146537700214675ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/main/resources/META-INF/000077500000000000000000000000001160146537700226275ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/main/resources/META-INF/archetype.xml000066400000000000000000000023631160146537700253410ustar00rootroot00000000000000 xmlbeans-maven-plugin true src/main/xsd/placeholder.txt src/main/xsdconfig/placeholder.txt src/test/xsd/placeholder.txt src/test/xsdconfig/placeholder.txt xmlbeans-maven-plugin-2.3.3/src/main/resources/archetype-resources/000077500000000000000000000000001160146537700254635ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/main/resources/archetype-resources/pom.xml000066400000000000000000000050461160146537700270050ustar00rootroot00000000000000 4.0.0 ${groupId} ${artifactId} jar ${version} TODO: Project name here. http://www.myproject.org org.codehaus.mojo xmlbeans-maven-plugin generate-sources xmlbeans org.codehaus.mojo xmlbeans-maven-plugin generate-sources xmlbeans-test true src/test/xsd xmlbeans-maven-plugin-2.3.3/src/main/resources/archetype-resources/src/000077500000000000000000000000001160146537700262525ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/main/resources/archetype-resources/src/main/000077500000000000000000000000001160146537700271765ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/main/resources/archetype-resources/src/main/xsd/000077500000000000000000000000001160146537700277745ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/main/resources/archetype-resources/src/main/xsd/placeholder.txt000066400000000000000000000000001160146537700330050ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/main/resources/archetype-resources/src/main/xsdconfig/000077500000000000000000000000001160146537700311625ustar00rootroot00000000000000placeholder.txt000066400000000000000000000000001160146537700341140ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/main/resources/archetype-resources/src/main/xsdconfigxmlbeans-maven-plugin-2.3.3/src/main/resources/archetype-resources/src/test/000077500000000000000000000000001160146537700272315ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/main/resources/archetype-resources/src/test/xsd/000077500000000000000000000000001160146537700300275ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/main/resources/archetype-resources/src/test/xsd/placeholder.txt000066400000000000000000000000001160146537700330400ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/main/resources/archetype-resources/src/test/xsdconfig/000077500000000000000000000000001160146537700312155ustar00rootroot00000000000000placeholder.txt000066400000000000000000000000001160146537700341470ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/main/resources/archetype-resources/src/test/xsdconfigxmlbeans-maven-plugin-2.3.3/src/main/resources/org/000077500000000000000000000000001160146537700222565ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/main/resources/org/codehaus/000077500000000000000000000000001160146537700240515ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/main/resources/org/codehaus/mojo/000077500000000000000000000000001160146537700250155ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/main/resources/org/codehaus/mojo/xmlbeans/000077500000000000000000000000001160146537700266265ustar00rootroot00000000000000XmlBeansException.properties000066400000000000000000000036061160146537700342620ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/main/resources/org/codehaus/mojo/xmlbeans## ## Licensed to the Apache Software Foundation (ASF) under one ## or more contributor license agreements. See the NOTICE file ## distributed with this work for additional information ## regarding copyright ownership. The ASF licenses this file ## to you under the Apache License, Version 2.0 (the ## "License"); you may not use this file except in compliance ## with the License. You may obtain a copy of the License at ## ## http://www.apache.org/licenses/LICENSE-2.0 ## ## Unless required by applicable law or agreed to in writing, ## software distributed under the License is distributed on an ## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ## KIND, either express or implied. See the License for the ## specific language governing permissions and limitations ## under the License. ## ## ## $Id: XmlBeansException.properties 6588 2008-03-28 12:22:57Z bentmann $ ## # Error messages for the XmlBeans plugin: properties.missing=The following parameters are required by the XmlBeans plugin but have not been set:\n\ {0}\n\ Add these to your pom.xml file and try again. properties.unset=The XML Beans Plugin was never given a handle to the Maven Project description. directory.schema.missing=The schema directory was not provided. Please add schemaDirectory to the xmlbeans \ plugin's configuration. compile.errors=XmlBeans compile failed:\n \ {0} classpath.dependency=Problems occurred while obtaining the default classpath. file.missing=Unable to find the file {0}. Are you sure it exists? file.config.missing=A specific xsd config file was missing. file.stale.io=Unable to create the stale output file. Attempted to put it here: {0} missing.error.key=The proper error message is missing from the table. artifact.path.invalid=The xsd artifact {0} was not found. missing.schema.file=The xsd file {0} was not found in {1}{2}. copy.classes=Unable to copy the xml beans generated classes to {0}.xmlbeans-maven-plugin-2.3.3/src/site/000077500000000000000000000000001160146537700174755ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/site/apt/000077500000000000000000000000001160146537700202615ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/site/apt/index.apt.vm000066400000000000000000000023101160146537700225130ustar00rootroot00000000000000 ------ Introduction ------ ------ $Id: index.apt 6588 2008-03-28 12:22:57Z bentmann $ ~~ ~~ Licensed to the Apache Software Foundation (ASF) under one ~~ or more contributor license agreements. See the NOTICE file ~~ distributed with this work for additional information ~~ regarding copyright ownership. The ASF licenses this file ~~ to you under the Apache License, Version 2.0 (the ~~ "License"); you may not use this file except in compliance ~~ with the License. You may obtain a copy of the License at ~~ ~~ http://www.apache.org/licenses/LICENSE-2.0 ~~ ~~ Unless required by applicable law or agreed to in writing, ~~ software distributed under the License is distributed on an ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ~~ KIND, either express or implied. See the License for the ~~ specific language governing permissions and limitations ~~ under the License. ~~ Introduction Provides integration of the {{{http://xmlbeans.apache.org/}Apache XML Beans}} for Maven 2. * Goals Overview * {{{xmlbeans-mojo.html}xmlbeans:xmlbeans}}: Compile XML Beans ouptut from schemas. * {{{xmlbeans-test-mojo.html}xmlbeans:xmlbeans-test}}: Compile XML Beans ouptut from schemas for tests. [] xmlbeans-maven-plugin-2.3.3/src/site/apt/usage.apt.vm000066400000000000000000000127041160146537700225200ustar00rootroot00000000000000 ------ Usage ------ ------ $Id: usage.apt 6588 2008-03-28 12:22:57Z bentmann $ ~~ ~~ Licensed to the Apache Software Foundation (ASF) under one ~~ or more contributor license agreements. See the NOTICE file ~~ distributed with this work for additional information ~~ regarding copyright ownership. The ASF licenses this file ~~ to you under the Apache License, Version 2.0 (the ~~ "License"); you may not use this file except in compliance ~~ with the License. You may obtain a copy of the License at ~~ ~~ http://www.apache.org/licenses/LICENSE-2.0 ~~ ~~ Unless required by applicable law or agreed to in writing, ~~ software distributed under the License is distributed on an ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ~~ KIND, either express or implied. See the License for the ~~ specific language governing permissions and limitations ~~ under the License. ~~ Usage Before you begin it may be necessary to familiarize yourself with the XMLBeans. A good tutorial can be found {{{http://xmlbeans.apache.org/documentation/index.html}here}}. *Basic Usage Basic usage consists of adding a reference to the plugins section of your Maven 2 project as shown here. -------------------------------------------- org.codehaus.mojo xmlbeans-maven-plugin ${project.version} xmlbeans true src/main/xsd -------------------------------------------- *Available Goals The goals available are are xmlbeans:xmlbeans and xmlbeans:xmlbeans-test. *Multiple XSDConfig Directories By default, the plugin looks for the src/main/xsd directory to exist, so it isn't necessary to specify it. Nor do you need to specify src/main/xsdconfig, the assumed location of any xsd config files to use during the parsing and creation of the object model. However, you can add additional xsdconfig directories as shown below. -------------------------------------------- org.codehaus.mojo xmlbeans-maven-plugin ${project.version} xmlbeans true src/main/xsdconfig src/main/xsdconfig2/explicit.xsdconfig -------------------------------------------- *Test Compile Support XML Beans models may be generated for the test compile as well. Although the schemaDirectory is defined in the example below, the default xsd directory for the test cycle is in fact src/test/xsd. -------------------------------------------- org.codehaus.mojo maven-xmlbeans-plugin ${project.version} xmlbeans-test true src/test/xsd -------------------------------------------- *Schema Jar Support Schemas located within an artifact jar your project is dependent upon can be used as source schemas. In the example below the geronimo-tomcat jar is expected to be a listed depedency of the project. Any schemas ending with .xsd or .XSD will be extracted from the artifact and an object model of these schemas will be produced. Also in the example, the memory max of the schema compiler is set - this may be needed for large schema sets. -------------------------------------------- org.codehaus.mojo xmlbeans-maven-plugin ${project.version} xmlbeans 50m 80m geronimo:geronimo-tomcat -------------------------------------------- *Relocating Generated Sources In some cases it's necessary to customize where the generated sources produced by the plugin are stored. This can be done by explicitly defining the source generation directory. The default is target/generated-sources/xmlbeans. -------------------------------------------- org.codehaus.mojo xmlbeans-maven-plugin ${project.version} xmlbeans target/generated/xmlbeans -------------------------------------------- xmlbeans-maven-plugin-2.3.3/src/site/fml/000077500000000000000000000000001160146537700202535ustar00rootroot00000000000000xmlbeans-maven-plugin-2.3.3/src/site/fml/faq.fml000066400000000000000000000026211160146537700215230ustar00rootroot00000000000000 Where do I put schema files?

By default, schema files should be in the ${basedir}/src/main/xsd directory.

Where do I put xmlconfig files?

By default, xmlconfig files should be in the ${basedir}/src/main/xsdconfig directory.

xmlbeans-maven-plugin-2.3.3/src/site/site.xml000066400000000000000000000026051160146537700211660ustar00rootroot00000000000000