├── .github ├── dependabot.yml └── workflows │ └── ci.yml ├── .gitignore ├── LICENSE ├── README.md ├── dist ├── .gitignore └── pom.xml ├── plugin-2.2 ├── .gitignore ├── pom.xml └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── jvnet │ │ │ └── mjiip │ │ │ └── v_2_2 │ │ │ ├── LoggingCodeWriter.java │ │ │ ├── LoggingErrorReceiver.java │ │ │ ├── OptionsFactory.java │ │ │ └── XJC22Mojo.java │ └── resources │ │ └── META-INF │ │ └── m2e │ │ └── lifecycle-mapping-metadata.xml │ └── site │ └── site.xml ├── plugin-2.3 ├── .gitignore ├── pom.xml └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── jvnet │ │ │ └── mjiip │ │ │ └── v_2_3 │ │ │ ├── LoggingCodeWriter.java │ │ │ ├── LoggingErrorReceiver.java │ │ │ ├── OptionsFactory.java │ │ │ └── XJC23Mojo.java │ └── resources │ │ └── META-INF │ │ └── m2e │ │ └── lifecycle-mapping-metadata.xml │ └── site │ └── site.xml ├── plugin-3.0 ├── .gitignore ├── pom.xml └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── jvnet │ │ │ └── mjiip │ │ │ └── v_3_0 │ │ │ ├── LoggingCodeWriter.java │ │ │ ├── LoggingErrorReceiver.java │ │ │ ├── OptionsFactory.java │ │ │ └── XJC30Mojo.java │ └── resources │ │ └── META-INF │ │ └── m2e │ │ └── lifecycle-mapping-metadata.xml │ └── site │ └── site.xml ├── plugin-core ├── .gitignore ├── pom.xml └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── jvnet │ │ │ └── jaxb2 │ │ │ └── maven2 │ │ │ ├── AbstractXJCMojo.java │ │ │ ├── DependencyResource.java │ │ │ ├── IDependencyResourceResolver.java │ │ │ ├── IOptionsFactory.java │ │ │ ├── OptionsConfiguration.java │ │ │ ├── ParentFirstClassLoader.java │ │ │ ├── RawXJC2Mojo.java │ │ │ ├── RawXJC3Mojo.java │ │ │ ├── RawXJCMojo.java │ │ │ ├── ResourceEntry.java │ │ │ ├── net │ │ │ ├── AbstractHTTPURILastModifiedResolver.java │ │ │ ├── AbstractSchemeAwareURILastModifiedResolver.java │ │ │ ├── CompositeURILastModifiedResolver.java │ │ │ ├── FileURILastModifiedResolver.java │ │ │ ├── HttpURILastModifiedResolver.java │ │ │ ├── HttpsURILastModifiedResolver.java │ │ │ ├── JarURILastModifiedResolver.java │ │ │ ├── SchemeAwareURILastModifiedResolver.java │ │ │ └── URILastModifiedResolver.java │ │ │ ├── plugin │ │ │ └── logging │ │ │ │ └── NullLog.java │ │ │ ├── resolver │ │ │ └── tools │ │ │ │ ├── ClasspathCatalogResolver.java │ │ │ │ ├── MavenCatalogResolver.java │ │ │ │ ├── ReResolvingEntityResolverWrapper.java │ │ │ │ └── ReResolvingInputSourceWrapper.java │ │ │ └── util │ │ │ ├── ArtifactUtils.java │ │ │ ├── CollectionUtils.java │ │ │ ├── IOUtils.java │ │ │ ├── LocaleUtils.java │ │ │ └── StringUtils.java │ └── resources │ │ └── org │ │ └── jvnet │ │ └── jaxb2 │ │ └── maven2 │ │ └── addIfExistsToEpisodeSchemaBindings.xslt │ └── test │ ├── java │ └── org │ │ └── jvnet │ │ └── jaxb2 │ │ └── maven2 │ │ ├── RawXJC2MojoTest.java │ │ ├── net │ │ └── tests │ │ │ └── URILastModifiedResolverTest.java │ │ ├── resolver │ │ └── tools │ │ │ └── tests │ │ │ └── MavenCatalogResolverTest.java │ │ ├── tests │ │ ├── AddIfExistsToEpisodeSchemaBindingsTest.java │ │ └── DependencyResourceTest.java │ │ └── util │ │ └── tests │ │ └── CollectionsUtilsTests.java │ └── resources │ └── org │ └── jvnet │ └── jaxb2 │ └── maven2 │ └── resolver │ └── tools │ └── tests │ ├── a │ ├── catalog.cat │ └── w3c │ │ └── 1999 │ │ └── xlink.xsd │ └── b │ ├── catalog.cat │ └── w3c │ └── 2005 │ └── atom-author-link.xsd ├── plugin ├── .gitignore ├── pom.xml └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── jvnet │ │ │ └── mjiip │ │ │ └── v_2 │ │ │ ├── OptionsFactory.java │ │ │ └── XJC2Mojo.java │ └── resources │ │ └── META-INF │ │ └── m2e │ │ └── lifecycle-mapping-metadata.xml │ └── site │ └── site.xml ├── pom.xml ├── qrelease.bat ├── qrelease.sh ├── samples ├── catalog │ ├── .gitignore │ ├── pom.xml │ ├── project-pom.xml │ └── src │ │ └── main │ │ ├── assembly │ │ └── maven-src.xml │ │ └── resources │ │ ├── catalog.cat │ │ ├── schema_a.xsd │ │ └── schema_b.xsd ├── dtd │ ├── .gitignore │ ├── pom.xml │ ├── project-pom.xml │ └── src │ │ └── main │ │ ├── assembly │ │ └── maven-src.xml │ │ └── resources │ │ ├── binding.xjb │ │ └── hibernate-mapping.dtd ├── episode │ ├── .gitignore │ ├── a │ │ ├── project-pom.xml │ │ └── src │ │ │ └── main │ │ │ └── resources │ │ │ └── a.xsd │ ├── b │ │ ├── project-pom.xml │ │ └── src │ │ │ └── main │ │ │ └── resources │ │ │ ├── b.xsd │ │ │ └── catalog.cat │ ├── c │ │ ├── project-pom.xml │ │ └── src │ │ │ └── main │ │ │ └── resources │ │ │ └── c.xsd │ ├── pom.xml │ ├── project-pom.xml │ └── src │ │ └── main │ │ └── assembly │ │ └── maven-src.xml ├── jaxbplugins │ ├── .gitignore │ ├── pom.xml │ ├── project-pom.xml │ └── src │ │ └── main │ │ ├── assembly │ │ └── maven-src.xml │ │ └── resources │ │ └── purchaseorder.xsd ├── po │ ├── .gitignore │ ├── pom.xml │ ├── project-pom.xml │ └── src │ │ └── main │ │ ├── assembly │ │ └── maven-src.xml │ │ └── resources │ │ └── purchaseorder.xsd └── pom.xml ├── src └── site │ └── site.xml ├── testing ├── .gitignore ├── pom.xml └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── jvnet │ │ │ └── jaxb2 │ │ │ └── maven2 │ │ │ └── test │ │ │ ├── RunXJC2Mojo.java │ │ │ └── plugin │ │ │ └── foo │ │ │ └── FooPlugin.java │ └── resources │ │ └── META-INF │ │ └── services │ │ └── com.sun.tools.xjc.Plugin │ ├── site │ └── site.xml │ └── test │ ├── java │ └── org │ │ └── jvnet │ │ └── jaxb2 │ │ └── maven2 │ │ └── test │ │ └── plugin │ │ └── foo │ │ └── tests │ │ └── RunFooPlugin.java │ └── resources │ ├── log4j.properties │ └── purchaseorder.xsd ├── tests ├── JAXB-1044 │ ├── .gitignore │ ├── pom.xml │ └── src │ │ ├── main │ │ └── resources │ │ │ ├── a.xjb │ │ │ ├── a.xsd │ │ │ ├── b.xsd │ │ │ └── catalog.cat │ │ └── test │ │ └── java │ │ └── org │ │ └── jvnet │ │ └── jaxb2 │ │ └── maven2 │ │ └── tests │ │ └── JAXB_1044 │ │ └── RunJAXB_1044Mojo.java ├── MAVEN_JAXB2_PLUGIN-49 │ ├── .gitignore │ ├── pom.xml │ └── src │ │ └── main │ │ ├── resources │ │ └── catalog.cat │ │ └── schema │ │ └── ogc │ │ └── wms │ │ └── 1.3.0 │ │ └── exceptions_1_3_0.xsd ├── MAVEN_JAXB2_PLUGIN-53 │ ├── a │ │ ├── .gitignore │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ └── resources │ │ │ └── a.xsd │ ├── b │ │ ├── .gitignore │ │ ├── pom.xml │ │ └── src │ │ │ ├── main │ │ │ └── resources │ │ │ │ ├── b.xsd │ │ │ │ └── catalog.cat │ │ │ └── test │ │ │ └── java │ │ │ └── org │ │ │ └── jvnet │ │ │ └── jaxb2 │ │ │ └── maven2 │ │ │ └── tests │ │ │ └── MAVEN_JAXB2_PLUGIN_53 │ │ │ └── b │ │ │ └── RunMAVEN_JAXB2_PLUGIN_53Mojo.java │ └── pom.xml ├── MAVEN_JAXB2_PLUGIN-69 │ ├── .gitignore │ ├── pom.xml │ └── src │ │ └── main │ │ └── resources │ │ └── simple.xsd ├── MAVEN_JAXB2_PLUGIN-70 │ ├── .gitignore │ ├── pom.xml │ └── src │ │ └── main │ │ └── resources │ │ └── bindings.xjb ├── MAVEN_JAXB2_PLUGIN-77 │ ├── common-types │ │ ├── .gitignore │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── project │ │ │ └── schemas │ │ │ ├── CommonTypes.xsd │ │ │ └── ISOCurrencyCodeType-V2008.xsd │ ├── pom.xml │ └── service │ │ ├── .gitignore │ │ ├── pom.xml │ │ └── src │ │ ├── main │ │ ├── jaxb │ │ │ └── catalog.cat │ │ └── resources │ │ │ └── META-INF │ │ │ └── project │ │ │ └── schemas │ │ │ └── Service.xsd │ │ └── test │ │ └── java │ │ └── org │ │ └── jvnet │ │ └── jaxb2 │ │ └── maven2 │ │ └── tests │ │ └── MAVEN_JAXB2_PLUGIN_77 │ │ └── RunMAVEN_JAXB2_PLUGIN_77Mojo.java ├── MAVEN_JAXB2_PLUGIN-79 │ ├── a │ │ ├── .gitignore │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ └── resources │ │ │ ├── a.xjb │ │ │ └── a.xsd │ ├── b │ │ ├── .gitignore │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ └── resources │ │ │ ├── b.xsd │ │ │ └── catalog.cat │ └── pom.xml ├── MAVEN_JAXB2_PLUGIN-82 │ ├── a │ │ ├── .gitignore │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ └── resources │ │ │ └── a.xsd │ ├── b │ │ ├── .gitignore │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ └── resources │ │ │ ├── b.xjb │ │ │ ├── b.xsd │ │ │ └── catalog.cat │ └── pom.xml ├── MAVEN_JAXB2_PLUGIN-86 │ ├── .gitignore │ ├── pom.xml │ └── src │ │ └── main │ │ └── resources │ │ ├── a │ │ └── a.xsd │ │ └── b │ │ └── b.xsd ├── MAVEN_JAXB2_PLUGIN-87 │ ├── .gitignore │ ├── pom.xml │ └── src │ │ └── main │ │ └── resources │ │ └── purchaseorder.xsd ├── catalog-xml │ ├── .gitignore │ ├── pom.xml │ └── src │ │ ├── main │ │ └── resources │ │ │ ├── catalog.xml │ │ │ ├── schema_a.xsd │ │ │ └── schema_b.xsd │ │ └── test │ │ └── java │ │ └── org │ │ └── jvnet │ │ └── jaxb2 │ │ └── maven2 │ │ └── tests │ │ └── catalog │ │ ├── RunCatalogMojo.java │ │ └── RunPlainCatalogMojo.java ├── catalog │ ├── .gitignore │ ├── pom.xml │ └── src │ │ ├── main │ │ └── resources │ │ │ ├── catalog.cat │ │ │ ├── schema_a.xsd │ │ │ └── schema_b.xsd │ │ └── test │ │ └── java │ │ └── org │ │ └── jvnet │ │ └── jaxb2 │ │ └── maven2 │ │ └── tests │ │ └── catalog │ │ ├── RunCatalogMojo.java │ │ └── RunPlainCatalogMojo.java ├── episodes │ ├── a │ │ ├── .gitignore │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ └── resources │ │ │ ├── a.xjb │ │ │ └── a.xsd │ ├── b │ │ ├── .gitignore │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ └── resources │ │ │ ├── b.xsd │ │ │ └── catalog.cat │ ├── c │ │ ├── .gitignore │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ └── resources │ │ │ └── c.xsd │ ├── d │ │ ├── .gitignore │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ └── resources │ │ │ ├── catalog.cat │ │ │ └── d.xsd │ ├── e │ │ ├── .gitignore │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ └── resources │ │ │ ├── catalog.cat │ │ │ └── d.xsd │ └── pom.xml ├── full-build-1.7.bat ├── full-build-1.8.bat ├── full-build-9.bat ├── gh-issue-16 │ ├── .gitignore │ ├── pom.xml │ └── src │ │ └── main │ │ └── resources │ │ └── ab │ │ ├── a.xjb │ │ ├── a.xsd │ │ ├── b.xsd │ │ └── catalog.cat ├── gh-issue-19 │ ├── a │ │ ├── .gitignore │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ └── resources │ │ │ └── a │ │ │ └── a.xsd │ ├── b │ │ ├── .gitignore │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ └── resources │ │ │ └── b │ │ │ ├── b.cat │ │ │ └── b.xsd │ └── pom.xml ├── gh-issue-22 │ ├── a │ │ ├── .gitignore │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ └── resources │ │ │ └── a.xsd │ ├── b │ │ ├── .gitignore │ │ └── pom.xml │ └── pom.xml ├── gh-issue-23 │ ├── one-non-strict │ │ ├── .gitignore │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ └── resources │ │ │ ├── META-INF │ │ │ └── one │ │ │ │ └── catalog.xml │ │ │ ├── one │ │ │ ├── a.xsd │ │ │ ├── b.xsd │ │ │ └── b1.xsd │ │ │ └── two │ │ │ └── p.xsd │ ├── pom.xml │ └── two-non-strict │ │ ├── .gitignore │ │ ├── pom.xml │ │ └── src │ │ └── main │ │ └── resources │ │ ├── META-INF │ │ └── two │ │ │ └── catalog.xml │ │ ├── one │ │ ├── a.xsd │ │ ├── b.xsd │ │ └── b1.xsd │ │ └── two │ │ └── p.xsd ├── gh-issue-58 │ ├── .gitignore │ ├── pom.xml │ └── src │ │ └── main │ │ └── resources │ │ └── purchaseorder.xsd ├── issues │ ├── .gitignore │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── jvnet │ │ │ │ └── jaxb2 │ │ │ │ └── maven2 │ │ │ │ └── tests │ │ │ │ └── issues │ │ │ │ └── common │ │ │ │ └── Generated.java │ │ └── resources │ │ │ ├── binding.xjb │ │ │ ├── depends.dep │ │ │ ├── depends.txt │ │ │ └── schema.xsd │ │ └── test │ │ └── resources │ │ └── log4j.properties ├── java-9 │ ├── .gitignore │ ├── install-10.bat │ ├── install-8.bat │ ├── install-9.bat │ ├── pom.xml │ └── src │ │ ├── main │ │ └── resources │ │ │ ├── SimpleClass.xsd │ │ │ ├── SimpleClassWithOtherName.xsd │ │ │ └── SimpleClassWithPackage.xsd │ │ └── test │ │ └── java │ │ └── org │ │ └── jvnet │ │ └── jaxb2 │ │ └── maven2 │ │ └── java9 │ │ └── Java9Test.java ├── p o │ ├── .gitignore │ ├── pom.xml │ └── src │ │ ├── main │ │ └── resources │ │ │ ├── binding.xjb │ │ │ └── purchaseorder.xsd │ │ └── test │ │ └── java │ │ └── org │ │ └── jvnet │ │ └── mjiip │ │ └── v_2 │ │ └── tests │ │ └── p_o │ │ ├── RunP_OPlugin.java │ │ └── RunXJC.java ├── po-2.2 │ ├── .gitignore │ ├── build-1.5.bat │ ├── build-1.6.bat │ ├── pom.xml │ └── src │ │ └── main │ │ └── resources │ │ └── purchaseorder.xsd ├── po-2.3 │ ├── .gitignore │ ├── pom.xml │ └── src │ │ └── main │ │ └── resources │ │ └── purchaseorder.xsd ├── po-3.0 │ ├── .gitignore │ ├── pom.xml │ └── src │ │ └── main │ │ └── resources │ │ └── purchaseorder.xsd ├── po-scd │ ├── .gitignore │ ├── build-1.5.bat │ ├── build-1.6.bat │ ├── pom.xml │ └── src │ │ └── main │ │ └── resources │ │ ├── bindings.xjb │ │ └── purchaseorder.xsd ├── pom.xml ├── res │ ├── .gitignore │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── resources │ │ │ ├── bindings.xjb │ │ │ └── catalog.cat │ │ ├── schema │ │ │ └── ogc │ │ │ │ └── wms │ │ │ │ └── 1.3.0 │ │ │ │ └── exceptions_1_3_0.xsd │ │ └── schemas │ │ │ ├── schema.xs │ │ │ └── schema.xsd │ │ └── test │ │ └── java │ │ └── org │ │ └── jvnet │ │ └── jaxb2 │ │ └── maven2 │ │ └── tests │ │ └── res │ │ └── RunResMojo.java ├── rnc │ ├── .gitignore │ ├── pom.xml │ └── src │ │ ├── main │ │ └── resources │ │ │ └── georss.rnc │ │ └── test │ │ └── java │ │ └── org │ │ └── jvnet │ │ └── jaxb2 │ │ └── maven2 │ │ └── tests │ │ └── rnc │ │ ├── DatatypeLibraryLoaderTest.java │ │ └── RunRNCMojo.java ├── tse │ ├── .gitignore │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── a │ │ │ ├── A2Enum.java │ │ │ └── ObjectFactory.java │ │ └── resources │ │ ├── a.xsd │ │ └── b.xsd ├── two │ ├── .gitignore │ ├── build-1.5.bat │ ├── build-1.6.bat │ ├── pom.xml │ └── src │ │ ├── main │ │ └── resources │ │ │ ├── schema.xs │ │ │ └── schema.xsd │ │ └── test │ │ ├── resources │ │ └── log4j.properties │ │ └── samples │ │ └── 1.xml ├── wsdl-file │ ├── .gitignore │ ├── build-1.5.bat │ ├── build-1.6.bat │ ├── pom.xml │ └── src │ │ ├── main │ │ └── resources │ │ │ └── pedidowebservice.wsdl │ │ └── test │ │ └── java │ │ └── net │ │ └── webservicex │ │ └── test │ │ └── JAXBContextTest.java ├── wsdl │ ├── .gitignore │ ├── build-1.5.bat │ ├── build-1.6.bat │ ├── pom.xml │ └── src │ │ └── test │ │ └── java │ │ └── net │ │ └── webservicex │ │ └── test │ │ └── JAXBContextTest.java └── xjc-simple │ ├── .gitignore │ ├── pom.xml │ └── src │ └── main │ └── resources │ ├── purchaseorder.xjb │ └── purchaseorder.xsd └── www ├── alm-process └── snippets │ └── page.xml ├── docs └── guide.html ├── index.html └── project_tools.html /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: maven 4 | directory: "/" 5 | schedule: 6 | interval: daily 7 | open-pull-requests-limit: 10 8 | ignore: 9 | - dependency-name: org.jvnet.staxex:stax-ex 10 | versions: 11 | - 2.0.0 12 | - dependency-name: com.sun.istack:istack-commons-tools 13 | versions: 14 | - 4.0.0 15 | - dependency-name: com.sun.istack:istack-commons-runtime 16 | versions: 17 | - 4.0.0 18 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | pull_request: 8 | 9 | jobs: 10 | build: 11 | name: Build and Test 12 | strategy: 13 | fail-fast: false 14 | matrix: 15 | os: [ubuntu-latest, macos-latest, windows-latest] 16 | java: [8, 11, 17] 17 | runs-on: ${{ matrix.os }} 18 | steps: 19 | - uses: actions/checkout@v3 20 | - name: Set up JDK 21 | uses: actions/setup-java@v3 22 | with: 23 | distribution: liberica 24 | java-version: ${{ matrix.java }} 25 | - name: Cache Maven packages 26 | uses: actions/cache@v2 27 | with: 28 | path: ~/.m2 29 | key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} 30 | restore-keys: ${{ runner.os }}-m2 31 | - name: Maven Build 32 | run: mvn -V -B -DskipTests=true "-Dmaven.javadoc.skip=true" install 33 | - name: Maven Test 34 | run: mvn -V -B verify -Ptests 35 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.idea 2 | *.iml 3 | /err 4 | /std 5 | **/.classpath 6 | **/.project 7 | **/.settings 8 | target -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2006-2014, Alexey Valikov. 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 18 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 20 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 21 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 22 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | 25 | -------------------------------------------------------------------------------- /dist/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /files/ 3 | -------------------------------------------------------------------------------- /plugin-2.2/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /plugin-2.2/src/main/java/org/jvnet/mjiip/v_2_2/LoggingCodeWriter.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package org.jvnet.mjiip.v_2_2; 5 | 6 | import java.io.File; 7 | import java.io.IOException; 8 | import java.io.OutputStream; 9 | import java.io.Writer; 10 | 11 | import org.apache.maven.plugin.logging.Log; 12 | 13 | import com.sun.codemodel.CodeWriter; 14 | import com.sun.codemodel.JPackage; 15 | import com.sun.codemodel.writer.FilterCodeWriter; 16 | 17 | public class LoggingCodeWriter extends FilterCodeWriter 18 | { 19 | 20 | private final boolean verbose; 21 | private final Log log; 22 | 23 | public LoggingCodeWriter (final CodeWriter output, final Log log, final boolean verbose) 24 | { 25 | super (output); 26 | this.log = log; 27 | this.verbose = verbose; 28 | } 29 | 30 | @Override 31 | public Writer openSource (final JPackage pkg, final String fileName) throws IOException 32 | { 33 | if (verbose) 34 | { 35 | if (pkg.isUnnamed ()) 36 | log.info ("XJC writing: " + fileName); 37 | else 38 | log.info ("XJC writing: " + pkg.name ().replace ('.', File.separatorChar) + File.separatorChar + fileName); 39 | } 40 | 41 | return core.openSource (pkg, fileName); 42 | } 43 | 44 | @Override 45 | public OutputStream openBinary (final JPackage pkg, final String fileName) throws IOException 46 | { 47 | if (verbose) 48 | { 49 | if (pkg.isUnnamed ()) 50 | log.info ("XJC writing: " + fileName); 51 | else 52 | log.info ("XJC writing: " + pkg.name ().replace ('.', File.separatorChar) + File.separatorChar + fileName); 53 | } 54 | 55 | return core.openBinary (pkg, fileName); 56 | } 57 | 58 | @Override 59 | public void close () throws IOException 60 | { 61 | core.close (); 62 | } 63 | 64 | } 65 | -------------------------------------------------------------------------------- /plugin-2.2/src/main/java/org/jvnet/mjiip/v_2_2/LoggingErrorReceiver.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package org.jvnet.mjiip.v_2_2; 5 | 6 | import org.apache.maven.plugin.logging.Log; 7 | import org.xml.sax.SAXParseException; 8 | 9 | import com.sun.tools.xjc.ErrorReceiver; 10 | 11 | public class LoggingErrorReceiver extends ErrorReceiver 12 | { 13 | 14 | private final Log log; 15 | private final boolean verbose; 16 | private final String messagePrefix; 17 | 18 | public LoggingErrorReceiver (final String messagePrefix, final Log log, final boolean verbose) 19 | { 20 | this.log = log; 21 | this.verbose = verbose; 22 | this.messagePrefix = messagePrefix; 23 | } 24 | 25 | @Override 26 | public void warning (final SAXParseException saxex) 27 | { 28 | log.warn (getMessage (saxex), saxex); 29 | } 30 | 31 | @Override 32 | public void error (final SAXParseException saxex) 33 | { 34 | log.error (getMessage (saxex), saxex); 35 | } 36 | 37 | @Override 38 | public void fatalError (final SAXParseException saxex) 39 | { 40 | log.error (getMessage (saxex), saxex); 41 | } 42 | 43 | @Override 44 | public void info (final SAXParseException saxex) 45 | { 46 | if (verbose) 47 | log.info (getMessage (saxex)); 48 | } 49 | 50 | private String getMessage (final SAXParseException ex) 51 | { 52 | final int row = ex.getLineNumber (); 53 | final int col = ex.getColumnNumber (); 54 | final String sys = ex.getSystemId (); 55 | final String pub = ex.getPublicId (); 56 | 57 | return messagePrefix + 58 | "Location [" + 59 | (sys != null ? " " + sys : "") + 60 | (pub != null ? " " + pub : "") + 61 | (row > 0 ? "{" + row + (col > 0 ? "," + col : "") + "}" : "") + 62 | "]."; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /plugin-2.2/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | generate 8 | 9 | 10 | 11 | 12 | true 13 | true 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /plugin-2.2/src/site/site.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ${reports} 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /plugin-2.3/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /plugin-2.3/src/main/java/org/jvnet/mjiip/v_2_3/LoggingCodeWriter.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package org.jvnet.mjiip.v_2_3; 5 | 6 | import java.io.File; 7 | import java.io.IOException; 8 | import java.io.OutputStream; 9 | import java.io.Writer; 10 | 11 | import org.apache.maven.plugin.logging.Log; 12 | 13 | import com.sun.codemodel.CodeWriter; 14 | import com.sun.codemodel.JPackage; 15 | import com.sun.codemodel.writer.FilterCodeWriter; 16 | 17 | public class LoggingCodeWriter extends FilterCodeWriter 18 | { 19 | 20 | private final boolean verbose; 21 | private final Log log; 22 | 23 | public LoggingCodeWriter (final CodeWriter output, final Log log, final boolean verbose) 24 | { 25 | super (output); 26 | this.log = log; 27 | this.verbose = verbose; 28 | } 29 | 30 | @Override 31 | public Writer openSource (final JPackage pkg, final String fileName) throws IOException 32 | { 33 | if (verbose) 34 | { 35 | if (pkg.isUnnamed ()) 36 | log.info ("XJC writing: " + fileName); 37 | else 38 | log.info ("XJC writing: " + pkg.name ().replace ('.', File.separatorChar) + File.separatorChar + fileName); 39 | } 40 | 41 | return core.openSource (pkg, fileName); 42 | } 43 | 44 | @Override 45 | public OutputStream openBinary (final JPackage pkg, final String fileName) throws IOException 46 | { 47 | if (verbose) 48 | { 49 | if (pkg.isUnnamed ()) 50 | log.info ("XJC writing: " + fileName); 51 | else 52 | log.info ("XJC writing: " + pkg.name ().replace ('.', File.separatorChar) + File.separatorChar + fileName); 53 | } 54 | 55 | return core.openBinary (pkg, fileName); 56 | } 57 | 58 | @Override 59 | public void close () throws IOException 60 | { 61 | core.close (); 62 | } 63 | 64 | } 65 | -------------------------------------------------------------------------------- /plugin-2.3/src/main/java/org/jvnet/mjiip/v_2_3/LoggingErrorReceiver.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package org.jvnet.mjiip.v_2_3; 5 | 6 | import org.apache.maven.plugin.logging.Log; 7 | import org.xml.sax.SAXParseException; 8 | 9 | import com.sun.tools.xjc.ErrorReceiver; 10 | 11 | public class LoggingErrorReceiver extends ErrorReceiver 12 | { 13 | 14 | private final Log log; 15 | private final boolean verbose; 16 | private final String messagePrefix; 17 | 18 | public LoggingErrorReceiver (final String messagePrefix, final Log log, final boolean verbose) 19 | { 20 | this.log = log; 21 | this.verbose = verbose; 22 | this.messagePrefix = messagePrefix; 23 | } 24 | 25 | @Override 26 | public void warning (final SAXParseException saxex) 27 | { 28 | log.warn (getMessage (saxex), saxex); 29 | } 30 | 31 | @Override 32 | public void error (final SAXParseException saxex) 33 | { 34 | log.error (getMessage (saxex), saxex); 35 | } 36 | 37 | @Override 38 | public void fatalError (final SAXParseException saxex) 39 | { 40 | log.error (getMessage (saxex), saxex); 41 | } 42 | 43 | @Override 44 | public void info (final SAXParseException saxex) 45 | { 46 | if (verbose) 47 | log.info (getMessage (saxex)); 48 | } 49 | 50 | private String getMessage (final SAXParseException ex) 51 | { 52 | final int row = ex.getLineNumber (); 53 | final int col = ex.getColumnNumber (); 54 | final String sys = ex.getSystemId (); 55 | final String pub = ex.getPublicId (); 56 | 57 | return messagePrefix + 58 | "Location [" + 59 | (sys != null ? " " + sys : "") + 60 | (pub != null ? " " + pub : "") + 61 | (row > 0 ? "{" + row + (col > 0 ? "," + col : "") + "}" : "") + 62 | "]."; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /plugin-2.3/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | generate 8 | 9 | 10 | 11 | 12 | true 13 | true 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /plugin-2.3/src/site/site.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ${reports} 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /plugin-3.0/.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | -------------------------------------------------------------------------------- /plugin-3.0/src/main/java/org/jvnet/mjiip/v_3_0/LoggingCodeWriter.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package org.jvnet.mjiip.v_3_0; 5 | 6 | import java.io.File; 7 | import java.io.IOException; 8 | import java.io.OutputStream; 9 | import java.io.Writer; 10 | 11 | import org.apache.maven.plugin.logging.Log; 12 | 13 | import com.sun.codemodel.CodeWriter; 14 | import com.sun.codemodel.JPackage; 15 | import com.sun.codemodel.writer.FilterCodeWriter; 16 | 17 | public class LoggingCodeWriter extends FilterCodeWriter 18 | { 19 | 20 | private final boolean verbose; 21 | private final Log log; 22 | 23 | public LoggingCodeWriter (final CodeWriter output, final Log log, final boolean verbose) 24 | { 25 | super (output); 26 | this.log = log; 27 | this.verbose = verbose; 28 | } 29 | 30 | @Override 31 | public Writer openSource (final JPackage pkg, final String fileName) throws IOException 32 | { 33 | if (verbose) 34 | { 35 | if (pkg.isUnnamed ()) 36 | log.info ("XJC writing: " + fileName); 37 | else 38 | log.info ("XJC writing: " + pkg.name ().replace ('.', File.separatorChar) + File.separatorChar + fileName); 39 | } 40 | 41 | return core.openSource (pkg, fileName); 42 | } 43 | 44 | @Override 45 | public OutputStream openBinary (final JPackage pkg, final String fileName) throws IOException 46 | { 47 | if (verbose) 48 | { 49 | if (pkg.isUnnamed ()) 50 | log.info ("XJC writing: " + fileName); 51 | else 52 | log.info ("XJC writing: " + pkg.name ().replace ('.', File.separatorChar) + File.separatorChar + fileName); 53 | } 54 | 55 | return core.openBinary (pkg, fileName); 56 | } 57 | 58 | @Override 59 | public void close () throws IOException 60 | { 61 | core.close (); 62 | } 63 | 64 | } 65 | -------------------------------------------------------------------------------- /plugin-3.0/src/main/java/org/jvnet/mjiip/v_3_0/LoggingErrorReceiver.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package org.jvnet.mjiip.v_3_0; 5 | 6 | import org.apache.maven.plugin.logging.Log; 7 | import org.xml.sax.SAXParseException; 8 | 9 | import com.sun.tools.xjc.ErrorReceiver; 10 | 11 | public class LoggingErrorReceiver extends ErrorReceiver 12 | { 13 | 14 | private final Log log; 15 | private final boolean verbose; 16 | private final String messagePrefix; 17 | 18 | public LoggingErrorReceiver (final String messagePrefix, final Log log, final boolean verbose) 19 | { 20 | this.log = log; 21 | this.verbose = verbose; 22 | this.messagePrefix = messagePrefix; 23 | } 24 | 25 | @Override 26 | public void warning (final SAXParseException saxex) 27 | { 28 | log.warn (getMessage (saxex), saxex); 29 | } 30 | 31 | @Override 32 | public void error (final SAXParseException saxex) 33 | { 34 | log.error (getMessage (saxex), saxex); 35 | } 36 | 37 | @Override 38 | public void fatalError (final SAXParseException saxex) 39 | { 40 | log.error (getMessage (saxex), saxex); 41 | } 42 | 43 | @Override 44 | public void info (final SAXParseException saxex) 45 | { 46 | if (verbose) 47 | log.info (getMessage (saxex)); 48 | } 49 | 50 | private String getMessage (final SAXParseException ex) 51 | { 52 | final int row = ex.getLineNumber (); 53 | final int col = ex.getColumnNumber (); 54 | final String sys = ex.getSystemId (); 55 | final String pub = ex.getPublicId (); 56 | 57 | return messagePrefix + 58 | "Location [" + 59 | (sys != null ? " " + sys : "") + 60 | (pub != null ? " " + pub : "") + 61 | (row > 0 ? "{" + row + (col > 0 ? "," + col : "") + "}" : "") + 62 | "]."; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /plugin-3.0/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | generate 8 | 9 | 10 | 11 | 12 | true 13 | true 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /plugin-3.0/src/site/site.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ${reports} 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /plugin-core/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /plugin-core/src/main/java/org/jvnet/jaxb2/maven2/IDependencyResourceResolver.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2.maven2; 2 | 3 | import java.net.URL; 4 | 5 | import org.apache.maven.plugin.MojoExecutionException; 6 | 7 | public interface IDependencyResourceResolver 8 | { 9 | URL resolveDependencyResource (DependencyResource dependencyResource) throws MojoExecutionException; 10 | } 11 | -------------------------------------------------------------------------------- /plugin-core/src/main/java/org/jvnet/jaxb2/maven2/IOptionsFactory.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2.maven2; 2 | 3 | import org.apache.maven.plugin.MojoExecutionException; 4 | 5 | public interface IOptionsFactory 6 | { 7 | O createOptions (OptionsConfiguration optionsConfiguration) throws MojoExecutionException; 8 | } 9 | -------------------------------------------------------------------------------- /plugin-core/src/main/java/org/jvnet/jaxb2/maven2/ResourceEntry.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2.maven2; 2 | 3 | import org.apache.maven.model.FileSet; 4 | 5 | public class ResourceEntry 6 | { 7 | private FileSet fileset; 8 | 9 | public FileSet getFileset () 10 | { 11 | return fileset; 12 | } 13 | 14 | public void setFileset (final FileSet fileset) 15 | { 16 | this.fileset = fileset; 17 | } 18 | 19 | private String url; 20 | 21 | public String getUrl () 22 | { 23 | return url; 24 | } 25 | 26 | public void setUrl (final String url) 27 | { 28 | this.url = url; 29 | } 30 | 31 | private DependencyResource dependencyResource; 32 | 33 | public DependencyResource getDependencyResource () 34 | { 35 | return dependencyResource; 36 | } 37 | 38 | public void setDependencyResource (final DependencyResource dependencyResource) 39 | { 40 | this.dependencyResource = dependencyResource; 41 | } 42 | 43 | @Override 44 | public String toString () 45 | { 46 | if (getFileset () != null) 47 | return getFileset ().toString (); 48 | if (getUrl () != null) 49 | return "URL {" + getUrl ().toString () + "}"; 50 | if (getDependencyResource () != null) 51 | return getDependencyResource ().toString (); 52 | return "Empty resource entry {}"; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /plugin-core/src/main/java/org/jvnet/jaxb2/maven2/net/AbstractSchemeAwareURILastModifiedResolver.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2.maven2.net; 2 | 3 | import java.net.URI; 4 | import java.text.MessageFormat; 5 | 6 | import org.apache.commons.lang3.Validate; 7 | import org.apache.maven.plugin.logging.Log; 8 | 9 | public abstract class AbstractSchemeAwareURILastModifiedResolver implements 10 | SchemeAwareURILastModifiedResolver { 11 | 12 | private final Log logger; 13 | private final String scheme; 14 | 15 | public AbstractSchemeAwareURILastModifiedResolver(String scheme, Log logger) { 16 | this.scheme = Validate.notNull(scheme); 17 | this.logger = Validate.notNull(logger); 18 | } 19 | 20 | @Override 21 | public String getScheme() { 22 | return scheme; 23 | } 24 | 25 | protected Log getLogger() { 26 | return logger; 27 | } 28 | 29 | @Override 30 | public Long getLastModified(URI uri) { 31 | final String scheme = getScheme(); 32 | Validate.isTrue(scheme.equalsIgnoreCase(uri.getScheme()), MessageFormat 33 | .format("Invalid scheme [{0}] expected [{1}].", 34 | uri.getScheme(), scheme)); 35 | return getLastModifiedForScheme(uri); 36 | } 37 | 38 | protected abstract Long getLastModifiedForScheme(URI uri); 39 | 40 | } 41 | -------------------------------------------------------------------------------- /plugin-core/src/main/java/org/jvnet/jaxb2/maven2/net/FileURILastModifiedResolver.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2.maven2.net; 2 | 3 | import java.io.File; 4 | import java.net.URI; 5 | import java.text.MessageFormat; 6 | 7 | import org.apache.maven.plugin.logging.Log; 8 | 9 | public class FileURILastModifiedResolver extends AbstractSchemeAwareURILastModifiedResolver 10 | { 11 | 12 | public static final String SCHEME = "file"; 13 | 14 | public FileURILastModifiedResolver (final Log logger) 15 | { 16 | super (SCHEME, logger); 17 | } 18 | 19 | @Override 20 | protected Long getLastModifiedForScheme (final URI uri) 21 | { 22 | try 23 | { 24 | final File file = new File (uri); 25 | if (file.exists ()) 26 | { 27 | final long lastModified = file.lastModified (); 28 | if (lastModified != 0) 29 | { 30 | getLogger ().debug (MessageFormat.format ("Last modification timestamp of the file URI [{0}] is [{1,date,yyyy-MM-dd HH:mm:ss.SSS}].", 31 | uri, 32 | lastModified)); 33 | return lastModified; 34 | } 35 | getLogger ().error (MessageFormat.format ("Could not retrieve the last modification of the file [{0}] .", 36 | file.getAbsolutePath ())); 37 | } 38 | else 39 | { 40 | getLogger ().error (MessageFormat.format ("File [{0}] does not exist.", file.getAbsolutePath ())); 41 | } 42 | } 43 | catch (final Exception ex) 44 | { 45 | getLogger ().error (MessageFormat.format ("Could not retrieve the last modification of the URI [{0}] .", uri), 46 | ex); 47 | } 48 | getLogger ().warn (MessageFormat.format ("Last modification of the URI [{0}] is not known.", uri)); 49 | return null; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /plugin-core/src/main/java/org/jvnet/jaxb2/maven2/net/HttpURILastModifiedResolver.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2.maven2.net; 2 | 3 | import org.apache.maven.plugin.logging.Log; 4 | 5 | public class HttpURILastModifiedResolver extends AbstractHTTPURILastModifiedResolver{ 6 | 7 | public static final String SCHEME = "http"; 8 | 9 | public HttpURILastModifiedResolver(Log logger) { 10 | super(SCHEME, logger); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /plugin-core/src/main/java/org/jvnet/jaxb2/maven2/net/HttpsURILastModifiedResolver.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2.maven2.net; 2 | 3 | import org.apache.maven.plugin.logging.Log; 4 | 5 | public class HttpsURILastModifiedResolver extends AbstractHTTPURILastModifiedResolver{ 6 | 7 | public static final String SCHEME = "https"; 8 | 9 | public HttpsURILastModifiedResolver(Log logger) { 10 | super(SCHEME, logger); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /plugin-core/src/main/java/org/jvnet/jaxb2/maven2/net/SchemeAwareURILastModifiedResolver.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2.maven2.net; 2 | 3 | public interface SchemeAwareURILastModifiedResolver extends 4 | URILastModifiedResolver { 5 | 6 | public String getScheme(); 7 | 8 | } 9 | -------------------------------------------------------------------------------- /plugin-core/src/main/java/org/jvnet/jaxb2/maven2/net/URILastModifiedResolver.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2.maven2.net; 2 | 3 | import java.net.URI; 4 | 5 | public interface URILastModifiedResolver { 6 | 7 | /** 8 | * Finds out the last modification date for an URI. 9 | * 10 | * @param uri 11 | * URI to find out the last modification date for. 12 | * @return Last modification date or null if unknown. 13 | */ 14 | public Long getLastModified(URI uri); 15 | } 16 | -------------------------------------------------------------------------------- /plugin-core/src/main/java/org/jvnet/jaxb2/maven2/plugin/logging/NullLog.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2.maven2.plugin.logging; 2 | 3 | import org.apache.maven.plugin.logging.Log; 4 | 5 | public class NullLog implements Log { 6 | 7 | @Override 8 | public boolean isDebugEnabled() { 9 | return false; 10 | } 11 | 12 | @Override 13 | public void debug(CharSequence content) { 14 | } 15 | 16 | @Override 17 | public void debug(CharSequence content, Throwable error) { 18 | } 19 | 20 | @Override 21 | public void debug(Throwable error) { 22 | } 23 | 24 | @Override 25 | public boolean isInfoEnabled() { 26 | return false; 27 | } 28 | 29 | @Override 30 | public void info(CharSequence content) { 31 | } 32 | 33 | @Override 34 | public void info(CharSequence content, Throwable error) { 35 | } 36 | 37 | @Override 38 | public void info(Throwable error) { 39 | } 40 | 41 | @Override 42 | public boolean isWarnEnabled() { 43 | return false; 44 | } 45 | 46 | @Override 47 | public void warn(CharSequence content) { 48 | } 49 | 50 | @Override 51 | public void warn(CharSequence content, Throwable error) { 52 | } 53 | 54 | @Override 55 | public void warn(Throwable error) { 56 | } 57 | 58 | @Override 59 | public boolean isErrorEnabled() { 60 | return false; 61 | } 62 | 63 | @Override 64 | public void error(CharSequence content) { 65 | } 66 | 67 | @Override 68 | public void error(CharSequence content, Throwable error) { 69 | } 70 | 71 | @Override 72 | public void error(Throwable error) { 73 | } 74 | 75 | public static Log INSTANCE = new NullLog(); 76 | 77 | } 78 | -------------------------------------------------------------------------------- /plugin-core/src/main/java/org/jvnet/jaxb2/maven2/resolver/tools/ClasspathCatalogResolver.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2.maven2.resolver.tools; 2 | 3 | import java.net.URI; 4 | import java.net.URISyntaxException; 5 | import java.net.URL; 6 | 7 | public class ClasspathCatalogResolver extends com.sun.org.apache.xml.internal.resolver.tools.CatalogResolver 8 | { 9 | 10 | public static final String URI_SCHEME_CLASSPATH = "classpath"; 11 | 12 | @Override 13 | public String getResolvedEntity (final String publicId, final String systemId) 14 | { 15 | // System.out.println("Resolving [" + publicId + "], [" + systemId + "]."); 16 | final String result = super.getResolvedEntity (publicId, systemId); 17 | // System.out.println("Resolved to [" + result+ "]."); 18 | 19 | if (result == null) 20 | { 21 | // System.err.println(MessageFormat.format( 22 | // "Could not resolve publicId [{0}], systemId [{1}]", 23 | // publicId, systemId)); 24 | return null; 25 | } 26 | 27 | try 28 | { 29 | final URI uri = new URI (result); 30 | if (URI_SCHEME_CLASSPATH.equals (uri.getScheme ())) 31 | { 32 | final String schemeSpecificPart = uri.getSchemeSpecificPart (); 33 | // System.out.println("Resolve [" + schemeSpecificPart + "]."); 34 | 35 | final URL resource = Thread.currentThread ().getContextClassLoader ().getResource (schemeSpecificPart); 36 | if (resource == null) 37 | { 38 | // System.out.println("Returning [" + null + "]."); 39 | return null; 40 | } 41 | // System.out.println("Returning to [" + resource.toString()+ "]."); 42 | return resource.toString (); 43 | } 44 | // System.out.println("Returning to [" + result+ "]."); 45 | return result; 46 | } 47 | catch (final URISyntaxException urisex) 48 | { 49 | // System.out.println("Returning to [" + result+ "]."); 50 | return result; 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /plugin-core/src/main/java/org/jvnet/jaxb2/maven2/resolver/tools/ReResolvingEntityResolverWrapper.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2.maven2.resolver.tools; 2 | 3 | import java.io.IOException; 4 | 5 | import org.xml.sax.EntityResolver; 6 | import org.xml.sax.InputSource; 7 | import org.xml.sax.SAXException; 8 | 9 | import com.helger.commons.string.ToStringGenerator; 10 | 11 | public class ReResolvingEntityResolverWrapper implements EntityResolver 12 | { 13 | 14 | private final EntityResolver entityResolver; 15 | 16 | public ReResolvingEntityResolverWrapper (final EntityResolver entityResolver) 17 | { 18 | if (entityResolver == null) 19 | { 20 | throw new IllegalArgumentException ("Provided entity resolver must not be null."); 21 | } 22 | this.entityResolver = entityResolver; 23 | } 24 | 25 | @Override 26 | public InputSource resolveEntity (final String publicId, final String systemId) throws SAXException, IOException 27 | { 28 | // System.out.println(MessageFormat.format("Resolving publicId [{0}], 29 | // systemId [{1}].", 30 | // publicId, systemId)); 31 | final InputSource resolvedInputSource = this.entityResolver.resolveEntity (publicId, systemId); 32 | if (resolvedInputSource == null) 33 | { 34 | // System.out.println("Resolution result is null."); 35 | return null; 36 | } 37 | // System.out.println(MessageFormat.format( 38 | // "Resolved to publicId [{0}], systemId [{1}].", 39 | // resolvedInputSource.getPublicId(), 40 | // resolvedInputSource.getSystemId())); 41 | final String pId = publicId != null ? publicId : resolvedInputSource.getPublicId (); 42 | final String sId = systemId != null ? systemId : resolvedInputSource.getSystemId (); 43 | return new ReResolvingInputSourceWrapper (this.entityResolver, resolvedInputSource, pId, sId); 44 | } 45 | 46 | @Override 47 | public String toString () 48 | { 49 | return new ToStringGenerator (this).append ("entityResolver", entityResolver).getToString (); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /plugin-core/src/main/java/org/jvnet/jaxb2/maven2/util/LocaleUtils.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2.maven2.util; 2 | 3 | import java.util.Locale; 4 | 5 | public class LocaleUtils 6 | { 7 | public static Locale valueOf (final String lang) 8 | { 9 | if ((lang == null) || lang.equals ("")) 10 | return Locale.getDefault (); 11 | 12 | String language = ""; 13 | String country = ""; 14 | String variant = ""; 15 | 16 | int i1 = lang.indexOf ('-'); 17 | if (i1 < 0) 18 | { 19 | language = lang; 20 | } 21 | else 22 | { 23 | language = lang.substring (0, i1); 24 | ++i1; 25 | final int i2 = lang.indexOf ('-', i1); 26 | if (i2 < 0) 27 | { 28 | country = lang.substring (i1); 29 | } 30 | else 31 | { 32 | country = lang.substring (i1, i2); 33 | variant = lang.substring (i2 + 1); 34 | } 35 | } 36 | 37 | if (language.length () == 2) 38 | { 39 | language = language.toLowerCase (); 40 | } 41 | else 42 | { 43 | language = ""; 44 | } 45 | 46 | if (country.length () == 2) 47 | { 48 | country = country.toUpperCase (); 49 | } 50 | else 51 | { 52 | country = ""; 53 | } 54 | 55 | if ((variant.length () > 0) && ((language.length () == 2) || (country.length () == 2))) 56 | { 57 | variant = variant.toUpperCase (); 58 | } 59 | else 60 | { 61 | variant = ""; 62 | } 63 | 64 | return new Locale (language, country, variant); 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /plugin-core/src/main/java/org/jvnet/jaxb2/maven2/util/StringUtils.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2.maven2.util; 2 | 3 | import javax.annotation.Nonnull; 4 | 5 | public final class StringUtils 6 | { 7 | /** 8 | * Checks if a (trimmed) String is null or empty. 9 | * 10 | * @param string 11 | * the String to check 12 | * @return true if the string is null, or length 13 | * zero once trimmed. 14 | */ 15 | public static boolean isEmptyTrimmed (final String string) 16 | { 17 | return string == null || string.trim ().length () == 0; 18 | } 19 | 20 | @Nonnull 21 | public static String escapeSpace (@Nonnull final String url) 22 | { 23 | // URLEncoder doesn't work. 24 | final StringBuilder buf = new StringBuilder (url.length () * 3); 25 | for (final char c : url.toCharArray ()) 26 | { 27 | // TODO: not sure if this is the only character that needs to be 28 | // escaped. 29 | if (c == ' ') 30 | buf.append ("%20"); 31 | else 32 | buf.append (c); 33 | } 34 | return buf.toString (); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /plugin-core/src/main/resources/org/jvnet/jaxb2/maven2/addIfExistsToEpisodeSchemaBindings.xslt: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | true 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /plugin-core/src/test/java/org/jvnet/jaxb2/maven2/net/tests/URILastModifiedResolverTest.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2.maven2.net.tests; 2 | 3 | import java.net.URI; 4 | import java.net.URISyntaxException; 5 | 6 | import org.apache.maven.plugin.logging.SystemStreamLog; 7 | import org.junit.Assert; 8 | import org.junit.Test; 9 | import org.jvnet.jaxb2.maven2.net.CompositeURILastModifiedResolver; 10 | import org.jvnet.jaxb2.maven2.net.JarURILastModifiedResolver; 11 | import org.jvnet.jaxb2.maven2.net.URILastModifiedResolver; 12 | 13 | public class URILastModifiedResolverTest 14 | { 15 | 16 | @Test 17 | public void getsFileURIFromJarFileURICorrectly () throws URISyntaxException 18 | { 19 | final URI jarURI = Test.class.getResource ("Test.class").toURI (); 20 | final String jarURIString = jarURI.toString (); 21 | System.out.println (jarURIString); 22 | final String partJarURIString = jarURIString.substring (0, 23 | jarURIString.indexOf (JarURILastModifiedResolver.SEPARATOR)); 24 | final URI partJarURI = new URI (partJarURIString); 25 | final URILastModifiedResolver resolver = new CompositeURILastModifiedResolver (new SystemStreamLog ()); 26 | final URI fileURI = getClass ().getResource (getClass ().getSimpleName () + ".class").toURI (); 27 | 28 | Assert.assertNotNull (resolver.getLastModified (jarURI)); 29 | Assert.assertNotNull (resolver.getLastModified (partJarURI)); 30 | Assert.assertNotNull (resolver.getLastModified (fileURI)); 31 | 32 | // Switch to true to tests HTTP/HTTPs 33 | final boolean online = false; 34 | if (online) 35 | { 36 | final URI httpsURI = new URI ("https://ya.ru/"); 37 | final URI httpURI = new URI ("http://schemas.opengis.net/ogc_schema_updates.rss"); 38 | Assert.assertNotNull (resolver.getLastModified (httpsURI)); 39 | Assert.assertNotNull (resolver.getLastModified (httpURI)); 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /plugin-core/src/test/java/org/jvnet/jaxb2/maven2/resolver/tools/tests/MavenCatalogResolverTest.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2.maven2.resolver.tools.tests; 2 | 3 | import java.io.IOException; 4 | import java.net.URL; 5 | 6 | import org.junit.Assert; 7 | import org.junit.Test; 8 | import org.xml.sax.InputSource; 9 | 10 | import com.sun.org.apache.xml.internal.resolver.CatalogManager; 11 | import com.sun.org.apache.xml.internal.resolver.tools.CatalogResolver; 12 | 13 | public class MavenCatalogResolverTest { 14 | 15 | @Test 16 | public void checkReenterability() throws IOException { 17 | CatalogManager cma = new CatalogManager(); 18 | cma.setIgnoreMissingProperties(true); 19 | cma.setUseStaticCatalog(false); 20 | final CatalogResolver cra = new CatalogResolver(cma); 21 | URL a = getClass().getResource("a/catalog.cat"); 22 | cra.getCatalog().parseCatalog(a); 23 | InputSource ea = cra.resolveEntity(null, 24 | "http://www.w3.org/1999/xlink.xsd"); 25 | Assert.assertNotNull(ea); 26 | 27 | CatalogManager cmb = new CatalogManager(); 28 | cmb.setIgnoreMissingProperties(true); 29 | cmb.setUseStaticCatalog(false); 30 | final CatalogResolver crb = new CatalogResolver(cmb); 31 | URL b = getClass().getResource("b/catalog.cat"); 32 | crb.getCatalog().parseCatalog(b); 33 | InputSource eb = crb.resolveEntity(null, 34 | "http://www.w3.org/2005/atom-author-link.xsd"); 35 | Assert.assertNotNull(eb); 36 | 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /plugin-core/src/test/java/org/jvnet/jaxb2/maven2/tests/AddIfExistsToEpisodeSchemaBindingsTest.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2.maven2.tests; 2 | 3 | import java.io.InputStream; 4 | 5 | import org.codehaus.plexus.util.IOUtil; 6 | import org.junit.Assert; 7 | import org.junit.Test; 8 | import org.jvnet.jaxb2.maven2.RawXJC2Mojo; 9 | 10 | public class AddIfExistsToEpisodeSchemaBindingsTest { 11 | 12 | @Test 13 | public void transformationResourceIsAccessible() { 14 | InputStream is = RawXJC2Mojo.class 15 | .getResourceAsStream(RawXJC2Mojo.ADD_IF_EXISTS_TO_EPISODE_SCHEMA_BINDINGS_TRANSFORMATION_RESOURCE_NAME); 16 | Assert.assertNotNull(is); 17 | IOUtil.close(is); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /plugin-core/src/test/java/org/jvnet/jaxb2/maven2/util/tests/CollectionsUtilsTests.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2.maven2.util.tests; 2 | 3 | import static org.junit.Assert.assertEquals; 4 | 5 | import java.util.Arrays; 6 | import java.util.Comparator; 7 | import java.util.function.Function; 8 | 9 | import org.junit.Test; 10 | import org.jvnet.jaxb2.maven2.util.CollectionUtils; 11 | 12 | public class CollectionsUtilsTests 13 | { 14 | @Test 15 | public void correctlyCompares () 16 | { 17 | final Function identity = Function.identity (); 18 | final Comparator gt = CollectionUtils. gtWithNullAsGreatest (); 19 | final Comparator lt = CollectionUtils. ltWithNullAsSmallest (); 20 | assertEquals ("b", CollectionUtils.bestValue (Arrays. asList ("a", "b"), identity, gt)); 21 | assertEquals ("a", CollectionUtils.bestValue (Arrays. asList ("a", "b"), identity, lt)); 22 | assertEquals (null, CollectionUtils.bestValue (Arrays. asList ("a", null, "b"), identity, gt)); 23 | assertEquals (null, CollectionUtils.bestValue (Arrays. asList ("a", null, "b"), identity, lt)); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /plugin-core/src/test/resources/org/jvnet/jaxb2/maven2/resolver/tools/tests/a/catalog.cat: -------------------------------------------------------------------------------- 1 | -- 2 | If the parameter isn't working, this link to schema A is 3 | not recognized and the test will fail because of a missing schema. 4 | -- 5 | REWRITE_SYSTEM "http://www.w3.org" "w3c" 6 | -------------------------------------------------------------------------------- /plugin-core/src/test/resources/org/jvnet/jaxb2/maven2/resolver/tools/tests/b/catalog.cat: -------------------------------------------------------------------------------- 1 | -- 2 | If the parameter isn't working, this link to schema A is 3 | not recognized and the test will fail because of a missing schema. 4 | -- 5 | REWRITE_SYSTEM "http://www.w3.org" "w3c" 6 | -------------------------------------------------------------------------------- /plugin/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /plugin/src/main/java/org/jvnet/mjiip/v_2/XJC2Mojo.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.mjiip.v_2; 2 | 3 | import org.apache.maven.plugins.annotations.LifecyclePhase; 4 | import org.apache.maven.plugins.annotations.Mojo; 5 | import org.apache.maven.plugins.annotations.ResolutionScope; 6 | import org.jvnet.mjiip.v_2_3.XJC23Mojo; 7 | 8 | import com.sun.tools.xjc.Options; 9 | 10 | /** 11 | * JAXB 2.x Mojo. 12 | * 13 | * @author Aleksei Valikov (valikov@gmx.net) 14 | */ 15 | @Mojo(name = "generate", defaultPhase = LifecyclePhase.GENERATE_SOURCES, requiresDependencyResolution = ResolutionScope.COMPILE, requiresDependencyCollection = ResolutionScope.COMPILE, threadSafe = true) 16 | public class XJC2Mojo extends XJC23Mojo { 17 | 18 | private final org.jvnet.jaxb2.maven2.IOptionsFactory optionsFactory = new OptionsFactory(); 19 | 20 | @Override 21 | protected org.jvnet.jaxb2.maven2.IOptionsFactory getOptionsFactory() { 22 | return optionsFactory; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | generate 8 | 9 | 10 | 11 | 12 | true 13 | true 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /plugin/src/site/site.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ${reports} 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /qrelease.bat: -------------------------------------------------------------------------------- 1 | setlocal 2 | echo Setting JAVA_HOME to %JAVA9_HOME%. 3 | set JAVA_HOME=%JAVA9_HOME% 4 | 5 | echo Performing a full clean build. 6 | rem pause 7 | call mvn clean install -Pall,sonatype-oss-release -DperformRelease 8 | echo Full clean build completed. 9 | rem pause 10 | 11 | echo Setting new version to %1. 12 | rem pause 13 | call mvn versions:set -Pall -DnewVersion=%1 14 | echo Version was set to %1. 15 | rem pause 16 | call mvn versions:commit -Pall 17 | echo Version %1 committed. 18 | rem pause 19 | 20 | echo Performing a full clean build. 21 | rem pause 22 | call mvn clean install -Pall,sonatype-oss-release -DperformRelease 23 | echo Full clean build completed. 24 | rem pause 25 | 26 | echo Checking in version %1. 27 | rem pause 28 | git commit -a -m "Version %1" 29 | echo Version %1 was checked in. 30 | rem pause 31 | 32 | echo Tagging version %1. 33 | rem pause 34 | git tag -a %1 -m "Version %1" 35 | echo Version %1 was tagged. 36 | rem pause 37 | 38 | echo Pushing version %1. 39 | rem pause 40 | git push origin main 41 | git push --tags origin main 42 | echo Version %1 was pushed. 43 | rem pause 44 | 45 | echo Performing full clean deploy. 46 | rem pause 47 | call mvn -DperformRelease -Pall,sonatype-oss-release clean deploy 48 | echo Full clean deploy done. 49 | rem pause 50 | 51 | echo Setting new version to %2. 52 | rem pause 53 | call mvn versions:set -Pall -DnewVersion=%2 54 | echo Version was set to %2. 55 | rem pause 56 | call mvn versions:commit -Pall 57 | echo Version %2 was committed. 58 | rem pause 59 | 60 | echo Performing a full clean build. 61 | rem pause 62 | call mvn clean install -DperformRelease -Pall,sonatype-oss-release 63 | echo Full clean build completed. 64 | rem pause 65 | 66 | echo Checking in version %2. 67 | rem pause 68 | git commit -a -m "Version %2" 69 | echo Version %2 was checked in. 70 | rem pause 71 | 72 | echo Pushing version %2. 73 | rem pause 74 | git push origin main 75 | git push --tags origin main 76 | echo Version %2 was pushed. 77 | rem pause 78 | 79 | endlocal -------------------------------------------------------------------------------- /qrelease.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | echo "Performing a full clean build." 4 | mvn clean install -Pall,sonatype-oss-release -DperformRelease 5 | echo "Full clean build completed." 6 | 7 | echo "Setting new version to: $1." 8 | mvn versions:set -Pall -DnewVersion=$1 9 | echo "Version was set to $1." 10 | mvn versions:commit -Pall 11 | echo "Version $1 committed." 12 | 13 | echo "Performing a full clean build." 14 | mvn clean install -Pall,sonatype-oss-release -DperformRelease 15 | echo "Full clean build completed." 16 | 17 | echo "Checking in version $1." 18 | git commit -a -m "Version $1" 19 | echo "Version $1 was checked in." 20 | 21 | echo "Tagging version $1." 22 | git tag -a $1 -m "Version $1" 23 | echo "Version $1 was tagged." 24 | 25 | echo "Pushing version $1." 26 | git push origin main 27 | git push --tags origin main 28 | echo "Version $1 was pushed." 29 | 30 | echo "Performing full clean deploy." 31 | mvn -DperformRelease -Pall,sonatype-oss-release clean deploy 32 | echo "Full clean deploy done." 33 | 34 | echo "Setting new version to $2." 35 | mvn versions:set -Pall -DnewVersion=$2 36 | echo "Version was set to $2." 37 | mvn versions:commit -Pall 38 | echo "Version $2 was committed." 39 | 40 | echo "Performing a full clean build." 41 | mvn clean install -DperformRelease -Pall,sonatype-oss-release 42 | echo "Full clean build completed." 43 | 44 | echo "Checking in version $2." 45 | git commit -a -m "Version $2" 46 | echo "Version $2 was checked in." 47 | 48 | echo "Pushing version $2." 49 | git push origin main 50 | git push --tags origin main 51 | echo "Version $2 was pushed." 52 | -------------------------------------------------------------------------------- /samples/catalog/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /samples/catalog/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | 5 | com.evolvedbinary.maven.jvnet 6 | jaxb-maven-plugin-samples 7 | 0.16.0-SNAPSHOT 8 | 9 | 10 | jaxb-maven-plugin-sample-catalog 11 | pom 12 | Maven JAXB 2.x Plugin Sample [catalog] 13 | 14 | 15 | install 16 | 17 | 18 | org.apache.maven.plugins 19 | maven-assembly-plugin 20 | 21 | 22 | maven-assembly 23 | package 24 | 25 | 26 | 27 | 28 | org.apache.maven.plugins 29 | maven-antrun-plugin 30 | 31 | 32 | maven-unpack 33 | pre-integration-test 34 | 35 | 36 | 37 | 38 | maven-invoker-plugin 39 | 40 | 41 | maven-integration-test 42 | integration-test 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /samples/catalog/project-pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | com.evolvedbinary.maven.jvnet 6 | jaxb-maven-plugin-sample-catalog-maven 7 | ${project.version} 8 | jar 9 | Maven JAXB 2.x Plugin Sample [catalog|maven] 10 | 11 | 12 | org.glassfish.jaxb 13 | jaxb-runtime 14 | ${jaxb.version} 15 | 16 | 17 | 18 | install 19 | 20 | 21 | ${project.groupId} 22 | jaxb2-maven-plugin 23 | ${project.version} 24 | 25 | 26 | 27 | generate 28 | 29 | 30 | src/main/resources/catalog.cat 31 | 32 | schema_b.xsd 33 | 34 | 35 | 36 | 37 | 38 | 39 | org.apache.maven.plugins 40 | maven-compiler-plugin 41 | 42 | 1.8 43 | 1.8 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /samples/catalog/src/main/assembly/maven-src.xml: -------------------------------------------------------------------------------- 1 | 2 | maven-src 3 | 4 | zip 5 | 6 | 7 | 8 | 9 | README* 10 | LICENSE* 11 | NOTICE* 12 | 13 | 14 | 15 | src 16 | 17 | 18 | 19 | 20 | ${basedir}/project-pom.xml 21 | pom.xml 22 | true 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /samples/catalog/src/main/resources/catalog.cat: -------------------------------------------------------------------------------- 1 | -- 2 | If the parameter isn't working, this link to schema A is 3 | not recognized and the test will fail because of a missing schema. 4 | -- 5 | REWRITE_SYSTEM "http://example.org/schemas" "." 6 | 7 | -------------------------------------------------------------------------------- /samples/catalog/src/main/resources/schema_a.xsd: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /samples/catalog/src/main/resources/schema_b.xsd: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /samples/dtd/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /samples/dtd/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | 5 | com.evolvedbinary.maven.jvnet 6 | jaxb-maven-plugin-samples 7 | 0.16.0-SNAPSHOT 8 | 9 | 10 | jaxb-maven-plugin-sample-dtd 11 | pom 12 | Maven JAXB 2.x Plugin Sample [dtd] 13 | 14 | 15 | install 16 | 17 | 18 | maven-assembly-plugin 19 | 20 | 21 | maven-assembly 22 | package 23 | 24 | 25 | 26 | 27 | maven-antrun-plugin 28 | 29 | 30 | maven-unpack 31 | pre-integration-test 32 | 33 | 34 | 35 | 36 | maven-invoker-plugin 37 | 38 | 39 | maven-integration-test 40 | integration-test 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /samples/dtd/project-pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | com.evolvedbinary.maven.jvnet 6 | jaxb-maven-plugin-sample-dtd-maven 7 | ${project.version} 8 | jar 9 | Maven JAXB 2.x Plugin Sample [dtd|maven] 10 | 11 | 12 | org.glassfish.jaxb 13 | jaxb-runtime 14 | ${jaxb.version} 15 | 16 | 17 | 18 | install 19 | 20 | 21 | ${project.groupId} 22 | jaxb2-maven-plugin 23 | ${project.version} 24 | 25 | 26 | 27 | generate 28 | 29 | 30 | dtd 31 | 32 | *.dtd 33 | 34 | 35 | 36 | 37 | 38 | 39 | org.apache.maven.plugins 40 | maven-compiler-plugin 41 | 42 | 1.7 43 | 1.7 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /samples/dtd/src/main/assembly/maven-src.xml: -------------------------------------------------------------------------------- 1 | 2 | maven-src 3 | 4 | zip 5 | 6 | 7 | 8 | 9 | README* 10 | LICENSE* 11 | NOTICE* 12 | 13 | 14 | 15 | src 16 | 17 | 18 | 19 | 20 | ${basedir}/project-pom.xml 21 | pom.xml 22 | true 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /samples/episode/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /samples/episode/a/project-pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | 6 | com.evolvedbinary.maven.jvnet 7 | jaxb-maven-plugin-sample-episode-maven 8 | ${project.version} 9 | 10 | jaxb-maven-plugin-sample-episode-a-maven 11 | jar 12 | Maven JAXB 2.x Plugin Sample [episode-a|maven] 13 | 14 | 15 | org.glassfish.jaxb 16 | jaxb-runtime 17 | 18 | 19 | 20 | test 21 | 22 | 23 | ${project.groupId} 24 | jaxb2-maven-plugin 25 | 26 | 27 | 28 | generate 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /samples/episode/a/src/main/resources/a.xsd: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /samples/episode/b/project-pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | 6 | 7 | com.evolvedbinary.maven.jvnet 8 | jaxb-maven-plugin-sample-episode-maven 9 | ${project.version} 10 | 11 | 12 | jaxb-maven-plugin-sample-episode-b-maven 13 | Maven JAXB 2.x Plugin Sample [episode-b|maven] 14 | jar 15 | 16 | 17 | 18 | org.glassfish.jaxb 19 | jaxb-runtime 20 | 21 | 22 | ${project.groupId} 23 | jaxb-maven-plugin-sample-episode-a-maven 24 | ${project.version} 25 | provided 26 | 27 | 28 | 29 | test 30 | 31 | 32 | ${project.groupId} 33 | jaxb2-maven-plugin 34 | 35 | true 36 | 37 | 38 | ${project.groupId} 39 | jaxb-maven-plugin-sample-episode-a-maven 40 | 41 | 42 | src/main/resources/catalog.cat 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /samples/episode/b/src/main/resources/b.xsd: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /samples/episode/b/src/main/resources/catalog.cat: -------------------------------------------------------------------------------- 1 | -- 2 | If the parameter isn't working, this link to schema A is 3 | not recognized and the test will fail because of a missing schema. 4 | -- 5 | REWRITE_SYSTEM "https://maven-jaxb2-plugin.dev.java.net/svn/maven-jaxb2-plugin/trunk/samples/episode/a/src/main/resources/a.xsd" "maven:com.evolvedbinary.maven.jvnet:jaxb-maven-plugin-sample-episode-a-maven!/a.xsd" -------------------------------------------------------------------------------- /samples/episode/c/project-pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | 6 | 7 | com.evolvedbinary.maven.jvnet 8 | jaxb-maven-plugin-sample-episode-maven 9 | ${project.version} 10 | 11 | 12 | jaxb-maven-plugin-sample-episode-c-maven 13 | Maven JAXB 2.x Plugin Sample [episode-c|maven] 14 | jar 15 | 16 | 17 | org.glassfish.jaxb 18 | jaxb-runtime 19 | 20 | 21 | ${project.groupId} 22 | jaxb-maven-plugin-sample-episode-a-maven 23 | ${project.version} 24 | provided 25 | 26 | 27 | 28 | test 29 | 30 | 31 | ${project.groupId} 32 | jaxb2-maven-plugin 33 | 34 | true 35 | 36 | 37 | 38 | ${project.groupId} 39 | jaxb-maven-plugin-sample-episode-b-maven 40 | ${project.version} 41 | catalog.cat 42 | 43 | 44 | 45 | true 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /samples/episode/c/src/main/resources/c.xsd: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /samples/episode/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | 5 | com.evolvedbinary.maven.jvnet 6 | jaxb-maven-plugin-samples 7 | 0.16.0-SNAPSHOT 8 | 9 | 10 | jaxb-maven-plugin-sample-episode 11 | pom 12 | Maven JAXB 2.x Plugin Sample [episode] 13 | 14 | 15 | install 16 | 17 | 18 | maven-assembly-plugin 19 | 20 | 21 | maven-assembly 22 | package 23 | 24 | 25 | 26 | 27 | maven-antrun-plugin 28 | 29 | 30 | maven-unpack 31 | pre-integration-test 32 | 33 | 34 | 35 | 36 | maven-invoker-plugin 37 | 38 | 39 | maven-integration-test 40 | integration-test 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /samples/episode/project-pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | com.evolvedbinary.maven.jvnet 6 | jaxb-maven-plugin-sample-episode-maven 7 | ${project.version} 8 | pom 9 | Maven JAXB 2.x Plugin Sample [episode|maven] 10 | 11 | 12 | 13 | org.glassfish.jaxb 14 | jaxb-runtime 15 | ${jaxb.version} 16 | 17 | 18 | 19 | 20 | a 21 | b 22 | c 23 | 24 | 25 | install 26 | 27 | 28 | 29 | ${project.groupId} 30 | jaxb2-maven-plugin 31 | ${project.version} 32 | 33 | 34 | 35 | generate 36 | 37 | 38 | 39 | 40 | 41 | maven-compiler-plugin 42 | 43 | 1.7 44 | 1.7 45 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /samples/episode/src/main/assembly/maven-src.xml: -------------------------------------------------------------------------------- 1 | 2 | maven-src 3 | 4 | zip 5 | 6 | 7 | 8 | 9 | README* 10 | LICENSE* 11 | NOTICE* 12 | 13 | 14 | 15 | src 16 | 17 | 18 | a/src 19 | 20 | 21 | b/src 22 | 23 | 24 | c/src 25 | 26 | 27 | 28 | 29 | ${basedir}/project-pom.xml 30 | pom.xml 31 | true 32 | 33 | 34 | ${basedir}/a/project-pom.xml 35 | a/pom.xml 36 | true 37 | 38 | 39 | ${basedir}/b/project-pom.xml 40 | b/pom.xml 41 | true 42 | 43 | 44 | ${basedir}/c/project-pom.xml 45 | c/pom.xml 46 | true 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /samples/jaxbplugins/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /samples/jaxbplugins/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | 5 | com.evolvedbinary.maven.jvnet 6 | jaxb-maven-plugin-samples 7 | 0.16.0-SNAPSHOT 8 | 9 | 10 | jaxb-maven-plugin-sample-jaxbplugins 11 | pom 12 | Maven JAXB 2.x Plugin Sample [jaxbplugins] 13 | 14 | 15 | install 16 | 17 | 18 | maven-assembly-plugin 19 | 20 | 21 | maven-assembly 22 | package 23 | 24 | 25 | 26 | 27 | maven-antrun-plugin 28 | 29 | 30 | maven-unpack 31 | pre-integration-test 32 | 33 | 34 | 35 | 36 | maven-invoker-plugin 37 | 38 | 39 | maven-integration-test 40 | integration-test 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /samples/jaxbplugins/project-pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | com.evolvedbinary.maven.jvnet 6 | jaxb-maven-plugin-sample-jaxbplugins-maven 7 | ${project.version} 8 | jar 9 | Maven JAXB 2.x Plugin Sample [jaxbplugins|maven] 10 | 11 | 12 | org.glassfish.jaxb 13 | jaxb-runtime 14 | ${jaxb.version} 15 | 16 | 17 | org.jvnet.jaxb2_commons 18 | jaxb2-basics-runtime 19 | ${jaxb2-basics.version} 20 | 21 | 22 | 23 | install 24 | 25 | 26 | ${project.groupId} 27 | jaxb2-maven-plugin 28 | ${project.version} 29 | 30 | 31 | 32 | generate 33 | 34 | 35 | 36 | -XtoString 37 | -Xequals 38 | -XhashCode 39 | -Xcopyable 40 | 41 | 42 | 43 | org.jvnet.jaxb2_commons 44 | jaxb2-basics 45 | ${jaxb2-basics.version} 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | org.apache.maven.plugins 54 | maven-compiler-plugin 55 | 56 | 1.7 57 | 1.7 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /samples/jaxbplugins/src/main/assembly/maven-src.xml: -------------------------------------------------------------------------------- 1 | 2 | maven-src 3 | 4 | zip 5 | 6 | 7 | 8 | 9 | README* 10 | LICENSE* 11 | NOTICE* 12 | 13 | 14 | 15 | src 16 | 17 | 18 | 19 | 20 | ${basedir}/project-pom.xml 21 | pom.xml 22 | true 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /samples/po/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /samples/po/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | 5 | com.evolvedbinary.maven.jvnet 6 | jaxb-maven-plugin-samples 7 | 0.16.0-SNAPSHOT 8 | 9 | 10 | jaxb-maven-plugin-sample-po 11 | pom 12 | Maven JAXB 2.x Plugin Sample [po] 13 | 14 | 15 | install 16 | 17 | 18 | maven-assembly-plugin 19 | 20 | 21 | maven-assembly 22 | package 23 | 24 | 25 | 26 | 27 | maven-antrun-plugin 28 | 29 | 30 | maven-unpack 31 | pre-integration-test 32 | 33 | 34 | 35 | 36 | maven-invoker-plugin 37 | 38 | 39 | maven-integration-test 40 | integration-test 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /samples/po/project-pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | com.evolvedbinary.maven.jvnet 6 | jaxb-maven-plugin-sample-po-maven 7 | ${project.version} 8 | jar 9 | Maven JAXB 2.x Plugin Sample [po|maven] 10 | 11 | 12 | org.glassfish.jaxb 13 | jaxb-runtime 14 | ${jaxb.version} 15 | 16 | 17 | 18 | install 19 | 20 | 21 | ${project.groupId} 22 | jaxb2-maven-plugin 23 | ${project.version} 24 | 25 | 26 | 27 | generate 28 | 29 | 30 | 31 | 32 | 33 | org.apache.maven.plugins 34 | maven-compiler-plugin 35 | 36 | 1.7 37 | 1.7 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /samples/po/src/main/assembly/maven-src.xml: -------------------------------------------------------------------------------- 1 | 2 | maven-src 3 | 4 | zip 5 | 6 | 7 | 8 | 9 | README* 10 | LICENSE* 11 | NOTICE* 12 | 13 | 14 | 15 | src 16 | 17 | 18 | 19 | 20 | ${basedir}/project-pom.xml 21 | pom.xml 22 | true 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/site/site.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /testing/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /testing/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | 5 | com.evolvedbinary.maven.jvnet 6 | jaxb-maven-plugin-project 7 | 0.16.0-SNAPSHOT 8 | 9 | 10 | jaxb-maven-plugin-testing 11 | jar 12 | Maven JAXB Plugin Testing 13 | 14 | 15 | 16 | ${project.groupId} 17 | jaxb-maven-plugin-core 18 | ${project.version} 19 | 20 | 21 | javax.xml.bind 22 | jaxb-api 23 | 24 | 25 | 26 | 27 | ${project.groupId} 28 | jaxb2-maven-plugin 29 | ${project.version} 30 | 31 | 32 | 33 | org.glassfish.jaxb 34 | jaxb-xjc 35 | ${jaxb23.version} 36 | 37 | 38 | junit 39 | junit 40 | compile 41 | 42 | 43 | org.slf4j 44 | slf4j-api 45 | 46 | 47 | 48 | 49 | org.apache.maven 50 | maven-plugin-api 51 | 52 | 53 | org.apache.maven 54 | maven-project 55 | 56 | 57 | 58 | 59 | install 60 | 61 | -------------------------------------------------------------------------------- /testing/src/main/resources/META-INF/services/com.sun.tools.xjc.Plugin: -------------------------------------------------------------------------------- 1 | org.jvnet.jaxb2.maven2.test.plugin.foo.FooPlugin 2 | -------------------------------------------------------------------------------- /testing/src/site/site.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ${reports} 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /testing/src/test/java/org/jvnet/jaxb2/maven2/test/plugin/foo/tests/RunFooPlugin.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2.maven2.test.plugin.foo.tests; 2 | 3 | import java.io.File; 4 | import java.util.Collections; 5 | import java.util.List; 6 | 7 | import org.jvnet.jaxb2.maven2.test.RunXJC2Mojo; 8 | 9 | public class RunFooPlugin extends RunXJC2Mojo { 10 | 11 | @Override 12 | public File getSchemaDirectory() { 13 | return new File(getBaseDir(), "src/test/resources"); 14 | } 15 | 16 | @Override 17 | public List getArgs() { 18 | return Collections.singletonList("-Xfoo"); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /testing/src/test/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | log4j.rootCategory=DEBUG, stdout 2 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 3 | log4j.appender.stdout.target=system.out 4 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 5 | log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - <%m>%n -------------------------------------------------------------------------------- /tests/JAXB-1044/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /tests/JAXB-1044/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | jaxb-maven-plugin-tests-JAXB-1044 6 | 7 | com.evolvedbinary.maven.jvnet 8 | jaxb-maven-plugin-tests 9 | 0.16.0-SNAPSHOT 10 | 11 | jar 12 | Maven JAXB 2.x Plugin Tests [MAVEN_JAXB2_PLUGIN-JAXB-1044] 13 | 14 | 15 | javax.xml.bind 16 | jaxb-api 17 | ${jaxb2-api.version} 18 | 19 | 20 | ${project.groupId} 21 | jaxb-maven-plugin-core 22 | test 23 | 24 | 25 | ${project.groupId} 26 | jaxb-maven-plugin-testing 27 | test 28 | 29 | 30 | 31 | 32 | 33 | ${project.groupId} 34 | jaxb2-maven-plugin 35 | 36 | 37 | generate 38 | 39 | generate 40 | 41 | 42 | src/main/resources/catalog.cat 43 | 44 | 45 | 46 | http://www.ab.org/a.xsd 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /tests/JAXB-1044/src/main/resources/a.xjb: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /tests/JAXB-1044/src/main/resources/a.xsd: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /tests/JAXB-1044/src/main/resources/b.xsd: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /tests/JAXB-1044/src/main/resources/catalog.cat: -------------------------------------------------------------------------------- 1 | REWRITE_SYSTEM "http://www.ab.org" "." 2 | 3 | -------------------------------------------------------------------------------- /tests/JAXB-1044/src/test/java/org/jvnet/jaxb2/maven2/tests/JAXB_1044/RunJAXB_1044Mojo.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2.maven2.tests.JAXB_1044; 2 | 3 | import java.io.File; 4 | 5 | import org.jvnet.jaxb2.maven2.AbstractXJCMojo; 6 | import org.jvnet.jaxb2.maven2.ResourceEntry; 7 | import org.jvnet.jaxb2.maven2.test.RunXJC2Mojo; 8 | 9 | public class RunJAXB_1044Mojo extends RunXJC2Mojo { 10 | 11 | @Override 12 | protected void configureMojo(AbstractXJCMojo mojo) { 13 | super.configureMojo(mojo); 14 | 15 | final ResourceEntry a_xsd = new ResourceEntry(); 16 | a_xsd.setUrl("http://www.ab.org/a.xsd"); 17 | mojo.setStrict(false); 18 | mojo.setSchemaIncludes(new String[] {}); 19 | mojo.setSchemas(new ResourceEntry[] { a_xsd }); 20 | mojo.setCatalog(new File(getBaseDir(), "src/main/resources/catalog.cat")); 21 | mojo.setForceRegenerate(true); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /tests/MAVEN_JAXB2_PLUGIN-49/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /tests/MAVEN_JAXB2_PLUGIN-49/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | jaxb-maven-plugin-tests-MAVEN_JAXB2_PLUGIN-49 6 | 7 | com.evolvedbinary.maven.jvnet 8 | jaxb-maven-plugin-tests 9 | 0.16.0-SNAPSHOT 10 | 11 | jar 12 | Maven JAXB 2.x Plugin Tests [MAVEN_JAXB2_PLUGIN-49] 13 | 14 | 15 | javax.xml.bind 16 | jaxb-api 17 | ${jaxb2-api.version} 18 | 19 | 20 | 21 | 22 | 23 | ${project.groupId} 24 | jaxb2-maven-plugin 25 | 26 | 27 | generate 28 | 29 | generate 30 | 31 | 32 | true 33 | src/main/resources/catalog.cat 34 | 35 | 36 | http://schemas.opengis.net/wms/1.3.0/exceptions_1_3_0.xsd 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /tests/MAVEN_JAXB2_PLUGIN-49/src/main/resources/catalog.cat: -------------------------------------------------------------------------------- 1 | REWRITE_SYSTEM "http://schemas.opengis.net" "../schema/ogc" -------------------------------------------------------------------------------- /tests/MAVEN_JAXB2_PLUGIN-49/src/main/schema/ogc/wms/1.3.0/exceptions_1_3_0.xsd: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 14 | 15 | 16 | 17 | 18 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /tests/MAVEN_JAXB2_PLUGIN-53/a/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /tests/MAVEN_JAXB2_PLUGIN-53/a/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | 6 | com.evolvedbinary.maven.jvnet 7 | jaxb-maven-plugin-tests-MAVEN_JAXB2_PLUGIN-53 8 | 0.16.0-SNAPSHOT 9 | 10 | jaxb-maven-plugin-tests-MAVEN_JAXB2_PLUGIN-53-a 11 | jar 12 | Maven JAXB 2.x Plugin Tests [MAVEN_JAXB2_PLUGIN-53:a] 13 | 14 | 15 | javax.xml.bind 16 | jaxb-api 17 | ${jaxb2-api.version} 18 | 19 | 20 | 21 | test 22 | 23 | 24 | ${project.groupId} 25 | jaxb22-maven-plugin 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /tests/MAVEN_JAXB2_PLUGIN-53/a/src/main/resources/a.xsd: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /tests/MAVEN_JAXB2_PLUGIN-53/b/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /tests/MAVEN_JAXB2_PLUGIN-53/b/src/main/resources/b.xsd: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /tests/MAVEN_JAXB2_PLUGIN-53/b/src/main/resources/catalog.cat: -------------------------------------------------------------------------------- 1 | -- 2 | If the parameter isn't working, this link to schema A is 3 | not recognized and the test will fail because of a missing schema. 4 | PUBLIC "http://maven-jaxb2-plugin/samples/episode/a" "a/a.xsd" 5 | -- 6 | PUBLIC "http://maven-jaxb2-plugin/samples/episode/a" "maven:com.evolvedbinary.maven.jvnet:jaxb-maven-plugin-tests-MAVEN_JAXB2_PLUGIN-53-a:jar::!/a.xsd" 7 | -------------------------------------------------------------------------------- /tests/MAVEN_JAXB2_PLUGIN-53/b/src/test/java/org/jvnet/jaxb2/maven2/tests/MAVEN_JAXB2_PLUGIN_53/b/RunMAVEN_JAXB2_PLUGIN_53Mojo.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2.maven2.tests.MAVEN_JAXB2_PLUGIN_53.b; 2 | 3 | import java.io.File; 4 | 5 | import org.jvnet.jaxb2.maven2.AbstractXJCMojo; 6 | import org.jvnet.jaxb2.maven2.test.RunXJC2Mojo; 7 | 8 | public class RunMAVEN_JAXB2_PLUGIN_53Mojo extends RunXJC2Mojo { 9 | 10 | @Override 11 | protected void configureMojo(AbstractXJCMojo mojo) { 12 | super.configureMojo(mojo); 13 | mojo.setCatalog(new File(getBaseDir(), "src/main/resources/catalog.cat")); 14 | mojo.setUseDependenciesAsEpisodes(true); 15 | 16 | mojo.setForceRegenerate(true); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /tests/MAVEN_JAXB2_PLUGIN-53/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | 6 | com.evolvedbinary.maven.jvnet 7 | jaxb-maven-plugin-tests 8 | 0.16.0-SNAPSHOT 9 | 10 | jaxb-maven-plugin-tests-MAVEN_JAXB2_PLUGIN-53 11 | pom 12 | Maven JAXB 2.x Plugin Tests [MAVEN_JAXB2_PLUGIN-53] 13 | 14 | a 15 | b 16 | 17 | 18 | test 19 | 20 | -------------------------------------------------------------------------------- /tests/MAVEN_JAXB2_PLUGIN-69/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /tests/MAVEN_JAXB2_PLUGIN-69/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | jaxb-maven-plugin-tests-MAVEN_JAXB2_PLUGIN-69 6 | 7 | com.evolvedbinary.maven.jvnet 8 | jaxb-maven-plugin-tests 9 | 0.16.0-SNAPSHOT 10 | 11 | jar 12 | Maven JAXB 2.x Plugin Tests [MAVEN_JAXB2_PLUGIN-69] 13 | 14 | 15 | javax.xml.bind 16 | jaxb-api 17 | ${jaxb2-api.version} 18 | 19 | 20 | 21 | 22 | 23 | ${project.groupId} 24 | jaxb2-maven-plugin 25 | 26 | 27 | generate 28 | 29 | generate 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /tests/MAVEN_JAXB2_PLUGIN-69/src/main/resources/simple.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /tests/MAVEN_JAXB2_PLUGIN-70/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /tests/MAVEN_JAXB2_PLUGIN-70/src/main/resources/bindings.xjb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /tests/MAVEN_JAXB2_PLUGIN-77/common-types/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /tests/MAVEN_JAXB2_PLUGIN-77/common-types/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | 5 | com.evolvedbinary.maven.jvnet 6 | jaxb-maven-plugin-tests-MAVEN_JAXB2_PLUGIN-77 7 | 0.16.0-SNAPSHOT 8 | 9 | jaxb-maven-plugin-tests-MAVEN_JAXB2_PLUGIN-77-common-types 10 | Maven JAXB 2.x Plugin Tests [MAVEN_JAXB2_PLUGIN-77:common-types] 11 | 12 | 13 | javax.xml.bind 14 | jaxb-api 15 | ${jaxb2-api.version} 16 | 17 | 18 | 19 | 20 | 21 | ${project.groupId} 22 | jaxb2-maven-plugin 23 | 24 | src/main/resources/META-INF/project/schemas 25 | com.company.project.common.types 26 | 27 | 28 | 29 | 30 | generate 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /tests/MAVEN_JAXB2_PLUGIN-77/common-types/src/main/resources/META-INF/project/schemas/CommonTypes.xsd: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /tests/MAVEN_JAXB2_PLUGIN-77/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | 6 | com.evolvedbinary.maven.jvnet 7 | jaxb-maven-plugin-tests 8 | 0.16.0-SNAPSHOT 9 | 10 | jaxb-maven-plugin-tests-MAVEN_JAXB2_PLUGIN-77 11 | pom 12 | Maven JAXB 2.x Plugin Tests [MAVEN_JAXB2_PLUGIN-77] 13 | 14 | common-types 15 | 16 | 17 | 18 | test 19 | 20 | -------------------------------------------------------------------------------- /tests/MAVEN_JAXB2_PLUGIN-77/service/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /tests/MAVEN_JAXB2_PLUGIN-77/service/src/main/jaxb/catalog.cat: -------------------------------------------------------------------------------- 1 | PUBLIC "http://company.com/project/schemas/common-types" "classpath:META-INF/project/schemas/CommonTypes.xsd" 2 | PUBLIC "http://company.com/project/schemas/iso/currency" "classpath:META-INF/project/schemas/ISOCurrencyCodeType-V2008.xsd" 3 | -------------------------------------------------------------------------------- /tests/MAVEN_JAXB2_PLUGIN-77/service/src/main/resources/META-INF/project/schemas/Service.xsd: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /tests/MAVEN_JAXB2_PLUGIN-77/service/src/test/java/org/jvnet/jaxb2/maven2/tests/MAVEN_JAXB2_PLUGIN_77/RunMAVEN_JAXB2_PLUGIN_77Mojo.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2.maven2.tests.MAVEN_JAXB2_PLUGIN_77; 2 | 3 | import java.io.File; 4 | 5 | import org.jvnet.jaxb2.maven2.AbstractXJCMojo; 6 | import org.jvnet.jaxb2.maven2.test.RunXJC2Mojo; 7 | 8 | public class RunMAVEN_JAXB2_PLUGIN_77Mojo extends RunXJC2Mojo { 9 | 10 | @Override 11 | protected void configureMojo(AbstractXJCMojo mojo) { 12 | super.configureMojo(mojo); 13 | 14 | mojo.setSchemaDirectory(new File(getBaseDir(), "src/main/resources/META-INF/project/schemas")); 15 | mojo.setGeneratePackage("com.company.project.service.types"); 16 | mojo.setCatalog(new File(getBaseDir(),"src/main/jaxb/catalog.cat")); 17 | mojo.setCatalogResolver("org.jvnet.jaxb2.maven2.resolver.tools.ClasspathCatalogResolver"); 18 | mojo.setExtension(true); 19 | // mojo. 20 | // 21 | // final ResourceEntry a_xsd = new ResourceEntry(); 22 | // a_xsd.setUrl("http://www.ab.org/a.xsd"); 23 | // mojo.setStrict(false); 24 | // mojo.setSchemaIncludes(new String[] {}); 25 | // mojo.setSchemas(new ResourceEntry[] { a_xsd }); 26 | // mojo.setCatalog(new File(getBaseDir(), "src/main/resources/catalog.cat")); 27 | mojo.setForceRegenerate(true); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /tests/MAVEN_JAXB2_PLUGIN-79/a/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /tests/MAVEN_JAXB2_PLUGIN-79/a/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | 6 | com.evolvedbinary.maven.jvnet 7 | jaxb-maven-plugin-tests-MAVEN_JAXB2_PLUGIN-79 8 | 0.16.0-SNAPSHOT 9 | 10 | jaxb-maven-plugin-tests-MAVEN_JAXB2_PLUGIN-79-a 11 | jar 12 | Maven JAXB 2.x Plugin Tests [MAVEN_JAXB2_PLUGIN-79:a] 13 | 14 | 15 | javax.xml.bind 16 | jaxb-api 17 | ${jaxb2-api.version} 18 | 19 | 20 | 21 | test 22 | 23 | 24 | ${project.groupId} 25 | jaxb2-maven-plugin 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /tests/MAVEN_JAXB2_PLUGIN-79/a/src/main/resources/a.xjb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /tests/MAVEN_JAXB2_PLUGIN-79/a/src/main/resources/a.xsd: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /tests/MAVEN_JAXB2_PLUGIN-79/b/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /tests/MAVEN_JAXB2_PLUGIN-79/b/src/main/resources/b.xsd: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /tests/MAVEN_JAXB2_PLUGIN-79/b/src/main/resources/catalog.cat: -------------------------------------------------------------------------------- 1 | -- 2 | If the parameter isn't working, this link to schema A is 3 | not recognized and the test will fail because of a missing schema. 4 | -- 5 | REWRITE_SYSTEM "https://raw.githubusercontent.com/evolvedbinary/jvnet-jaxb-maven-plugin/main/tests/MAVEN_JAXB2_PLUGIN-79/a/src/main/resources/a.xsd" "maven:com.evolvedbinary.maven.jvnet:jaxb-maven-plugin-tests-MAVEN_JAXB2_PLUGIN-79-a:jar::!/a.xsd" 6 | 7 | -------------------------------------------------------------------------------- /tests/MAVEN_JAXB2_PLUGIN-79/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | 6 | com.evolvedbinary.maven.jvnet 7 | jaxb-maven-plugin-tests 8 | 0.16.0-SNAPSHOT 9 | 10 | jaxb-maven-plugin-tests-MAVEN_JAXB2_PLUGIN-79 11 | pom 12 | Maven JAXB 2.x Plugin Tests [MAVEN_JAXB2_PLUGIN-79] 13 | 14 | a 15 | b 16 | 17 | 18 | test 19 | 20 | -------------------------------------------------------------------------------- /tests/MAVEN_JAXB2_PLUGIN-82/a/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /tests/MAVEN_JAXB2_PLUGIN-82/a/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | 6 | com.evolvedbinary.maven.jvnet 7 | jaxb-maven-plugin-tests-MAVEN_JAXB2_PLUGIN-82 8 | 0.16.0-SNAPSHOT 9 | 10 | jaxb-maven-plugin-tests-MAVEN_JAXB2_PLUGIN-82-a 11 | jar 12 | Maven JAXB 2.x Plugin Tests [MAVEN_JAXB2_PLUGIN-82:a] 13 | 14 | 15 | 16 | ${project.groupId} 17 | jaxb2-maven-plugin 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /tests/MAVEN_JAXB2_PLUGIN-82/a/src/main/resources/a.xsd: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /tests/MAVEN_JAXB2_PLUGIN-82/b/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /tests/MAVEN_JAXB2_PLUGIN-82/b/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | 6 | com.evolvedbinary.maven.jvnet 7 | jaxb-maven-plugin-tests-MAVEN_JAXB2_PLUGIN-82 8 | 0.16.0-SNAPSHOT 9 | 10 | jaxb-maven-plugin-tests-MAVEN_JAXB2_PLUGIN-82-b 11 | jar 12 | Maven JAXB 2.x Plugin Tests [MAVEN_JAXB2_PLUGIN-82:b] 13 | 14 | 15 | ${project.groupId} 16 | jaxb-maven-plugin-tests-MAVEN_JAXB2_PLUGIN-82-a 17 | ${project.version} 18 | runtime 19 | 20 | 21 | 22 | 23 | 24 | org.apache.maven.plugins 25 | maven-dependency-plugin 26 | 27 | 28 | analyze 29 | 30 | analyze-only 31 | 32 | 33 | 34 | ${project.groupId}:jaxb-maven-plugin-tests-MAVEN_JAXB2_PLUGIN-82-a:jar:${project.version} 35 | 36 | 37 | 38 | 39 | 40 | 41 | ${project.groupId} 42 | jaxb2-maven-plugin 43 | 44 | src/main/resources/catalog.cat 45 | 46 | 47 | ${project.groupId} 48 | jaxb-maven-plugin-tests-MAVEN_JAXB2_PLUGIN-82-a 49 | ${project.version} 50 | 51 | 52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /tests/MAVEN_JAXB2_PLUGIN-82/b/src/main/resources/b.xjb: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /tests/MAVEN_JAXB2_PLUGIN-82/b/src/main/resources/b.xsd: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /tests/MAVEN_JAXB2_PLUGIN-82/b/src/main/resources/catalog.cat: -------------------------------------------------------------------------------- 1 | -- 2 | If the parameter isn't working, this link to schema A is 3 | not recognized and the test will fail because of a missing schema. 4 | -- 5 | REWRITE_SYSTEM "http://www.ab.org" "maven:com.evolvedbinary.maven.jvnet:jaxb-maven-plugin-tests-MAVEN_JAXB2_PLUGIN-82-a:jar::!" 6 | 7 | -------------------------------------------------------------------------------- /tests/MAVEN_JAXB2_PLUGIN-82/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | 6 | com.evolvedbinary.maven.jvnet 7 | jaxb-maven-plugin-tests 8 | 0.16.0-SNAPSHOT 9 | 10 | jaxb-maven-plugin-tests-MAVEN_JAXB2_PLUGIN-82 11 | pom 12 | Maven JAXB 2.x Plugin Tests [MAVEN_JAXB2_PLUGIN-82] 13 | 14 | a 15 | b 16 | 17 | 18 | test 19 | 20 | -------------------------------------------------------------------------------- /tests/MAVEN_JAXB2_PLUGIN-86/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /tests/MAVEN_JAXB2_PLUGIN-86/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | jaxb-maven-plugin-tests-MAVEN_JAXB2_PLUGIN-86 6 | 7 | com.evolvedbinary.maven.jvnet 8 | jaxb-maven-plugin-tests 9 | 0.16.0-SNAPSHOT 10 | 11 | jar 12 | Maven JAXB 2.x Plugin Tests [MAVEN_JAXB2_PLUGIN-86] 13 | 14 | 15 | javax.xml.bind 16 | jaxb-api 17 | ${jaxb2-api.version} 18 | 19 | 20 | 21 | 22 | 23 | ${project.groupId} 24 | jaxb2-maven-plugin 25 | 26 | 27 | a 28 | generate-sources 29 | 30 | generate 31 | 32 | 33 | src/main/resources/a 34 | a 35 | 36 | ${project.build.directory}/generated-sources/xjc-a 37 | 38 | 39 | 40 | b 41 | generate-sources 42 | 43 | generate 44 | 45 | 46 | src/main/resources/b 47 | b 48 | 49 | ${project.build.directory}/generated-sources/xjc-b 50 | 51 | 52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /tests/MAVEN_JAXB2_PLUGIN-86/src/main/resources/a/a.xsd: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /tests/MAVEN_JAXB2_PLUGIN-86/src/main/resources/b/b.xsd: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /tests/MAVEN_JAXB2_PLUGIN-87/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /tests/MAVEN_JAXB2_PLUGIN-87/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | jaxb-maven-plugin-tests-MAVEN_JAXB2_PLUGIN-87 6 | 7 | com.evolvedbinary.maven.jvnet 8 | jaxb-maven-plugin-tests 9 | 0.16.0-SNAPSHOT 10 | 11 | jar 12 | Maven JAXB 2.x Plugin Tests [MAVEN_JAXB2_PLUGIN-87] 13 | 14 | 15 | javax.xml.bind 16 | jaxb-api 17 | ${jaxb2-api.version} 18 | 19 | 20 | 21 | 22 | 23 | ${project.groupId} 24 | jaxb2-maven-plugin 25 | 26 | es 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /tests/catalog-xml/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /tests/catalog-xml/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | 6 | com.evolvedbinary.maven.jvnet 7 | jaxb-maven-plugin-tests 8 | 0.16.0-SNAPSHOT 9 | 10 | jaxb-maven-plugin-tests-catalog-xml 11 | jar 12 | Maven JAXB 2.x Plugin Tests [catalog-xml] 13 | 14 | 15 | ${project.groupId} 16 | jaxb-maven-plugin-testing 17 | test 18 | 19 | 20 | ${project.groupId} 21 | jaxb-maven-plugin-core 22 | ${project.version} 23 | test 24 | 25 | 26 | javax.xml.bind 27 | jaxb-api 28 | 29 | 30 | 31 | 32 | javax.xml.bind 33 | jaxb-api 34 | ${jaxb2-api.version} 35 | 36 | 37 | 38 | test 39 | 40 | 41 | ${project.groupId} 42 | jaxb2-maven-plugin 43 | 44 | 45 | generate 46 | 47 | generate 48 | 49 | 50 | 51 | schema_b.xsd 52 | 53 | src/main/resources/catalog.xml 54 | 55 | 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /tests/catalog-xml/src/main/resources/catalog.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /tests/catalog-xml/src/main/resources/schema_a.xsd: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/catalog-xml/src/main/resources/schema_b.xsd: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /tests/catalog-xml/src/test/java/org/jvnet/jaxb2/maven2/tests/catalog/RunCatalogMojo.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2.maven2.tests.catalog; 2 | 3 | import java.io.File; 4 | 5 | import org.jvnet.jaxb2.maven2.resolver.tools.ClasspathCatalogResolver; 6 | import org.jvnet.jaxb2.maven2.test.RunXJC2Mojo; 7 | import org.jvnet.jaxb2.maven2.AbstractXJCMojo; 8 | 9 | public class RunCatalogMojo extends RunXJC2Mojo { 10 | 11 | @Override 12 | protected void configureMojo(AbstractXJCMojo mojo) { 13 | super.configureMojo(mojo); 14 | 15 | mojo 16 | .setCatalog(new File(getBaseDir(), 17 | "src/main/resources/catalog.cat")); 18 | mojo.setCatalogResolver(ClasspathCatalogResolver.class.getName()); 19 | 20 | mojo.setForceRegenerate(true); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /tests/catalog-xml/src/test/java/org/jvnet/jaxb2/maven2/tests/catalog/RunPlainCatalogMojo.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2.maven2.tests.catalog; 2 | 3 | import java.io.File; 4 | 5 | import org.jvnet.jaxb2.maven2.AbstractXJCMojo; 6 | import org.jvnet.jaxb2.maven2.test.RunXJC2Mojo; 7 | 8 | public class RunPlainCatalogMojo extends RunXJC2Mojo { 9 | 10 | @Override 11 | protected void configureMojo(AbstractXJCMojo mojo) { 12 | super.configureMojo(mojo); 13 | 14 | mojo 15 | .setCatalog(new File(getBaseDir(), 16 | "src/main/resources/catalog.cat")); 17 | 18 | mojo.setForceRegenerate(true); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /tests/catalog/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /tests/catalog/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | 6 | com.evolvedbinary.maven.jvnet 7 | jaxb-maven-plugin-tests 8 | 0.16.0-SNAPSHOT 9 | 10 | jaxb-maven-plugin-tests-catalog 11 | jar 12 | Maven JAXB 2.x Plugin Tests [catalog] 13 | 14 | 15 | ${project.groupId} 16 | jaxb-maven-plugin-testing 17 | ${project.version} 18 | test 19 | 20 | 21 | ${project.groupId} 22 | jaxb-maven-plugin-core 23 | ${project.version} 24 | test 25 | 26 | 27 | javax.xml.bind 28 | jaxb-api 29 | 30 | 31 | 32 | 33 | javax.xml.bind 34 | jaxb-api 35 | ${jaxb2-api.version} 36 | 37 | 38 | 39 | test 40 | 41 | 42 | ${project.groupId} 43 | jaxb2-maven-plugin 44 | ${project.version} 45 | 46 | 47 | generate 48 | 49 | generate 50 | 51 | 52 | 53 | schema_b.xsd 54 | 55 | src/main/resources/catalog.cat 56 | 57 | 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /tests/catalog/src/main/resources/catalog.cat: -------------------------------------------------------------------------------- 1 | -- 2 | If the parameter isn't working, this link to schema A is 3 | not recognized and the test will fail because of a missing schema. 4 | -- 5 | REWRITE_SYSTEM "http://example.org/schemas" "." 6 | 7 | -------------------------------------------------------------------------------- /tests/catalog/src/main/resources/schema_a.xsd: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/catalog/src/main/resources/schema_b.xsd: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /tests/catalog/src/test/java/org/jvnet/jaxb2/maven2/tests/catalog/RunCatalogMojo.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2.maven2.tests.catalog; 2 | 3 | import java.io.File; 4 | 5 | import org.jvnet.jaxb2.maven2.resolver.tools.ClasspathCatalogResolver; 6 | import org.jvnet.jaxb2.maven2.test.RunXJC2Mojo; 7 | import org.jvnet.jaxb2.maven2.AbstractXJCMojo; 8 | 9 | public class RunCatalogMojo extends RunXJC2Mojo { 10 | 11 | @Override 12 | protected void configureMojo(AbstractXJCMojo mojo) { 13 | super.configureMojo(mojo); 14 | 15 | mojo 16 | .setCatalog(new File(getBaseDir(), 17 | "src/main/resources/catalog.cat")); 18 | mojo.setCatalogResolver(ClasspathCatalogResolver.class.getName()); 19 | 20 | mojo.setForceRegenerate(true); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /tests/catalog/src/test/java/org/jvnet/jaxb2/maven2/tests/catalog/RunPlainCatalogMojo.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2.maven2.tests.catalog; 2 | 3 | import java.io.File; 4 | 5 | import org.jvnet.jaxb2.maven2.AbstractXJCMojo; 6 | import org.jvnet.jaxb2.maven2.test.RunXJC2Mojo; 7 | 8 | public class RunPlainCatalogMojo extends RunXJC2Mojo { 9 | 10 | @Override 11 | protected void configureMojo(AbstractXJCMojo mojo) { 12 | super.configureMojo(mojo); 13 | 14 | mojo 15 | .setCatalog(new File(getBaseDir(), 16 | "src/main/resources/catalog.cat")); 17 | 18 | mojo.setForceRegenerate(true); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /tests/episodes/a/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /tests/episodes/a/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | 6 | com.evolvedbinary.maven.jvnet 7 | jaxb-maven-plugin-tests-episodes 8 | 0.16.0-SNAPSHOT 9 | 10 | jaxb-maven-plugin-tests-episodes-a 11 | jar 12 | Maven JAXB 2.x Plugin Tests [episodes:a] 13 | 14 | 15 | javax.xml.bind 16 | jaxb-api 17 | ${jaxb2-api.version} 18 | 19 | 20 | 21 | test 22 | 23 | 24 | ${project.groupId} 25 | jaxb22-maven-plugin 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /tests/episodes/a/src/main/resources/a.xjb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/episodes/a/src/main/resources/a.xsd: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /tests/episodes/b/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /tests/episodes/b/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | 6 | com.evolvedbinary.maven.jvnet 7 | jaxb-maven-plugin-tests-episodes 8 | 0.16.0-SNAPSHOT 9 | 10 | jaxb-maven-plugin-tests-episodes-b 11 | jar 12 | Maven JAXB 2.x Plugin Tests [episodes:b] 13 | 14 | 15 | ${project.groupId} 16 | jaxb-maven-plugin-tests-episodes-a 17 | ${project.version} 18 | 19 | 20 | javax.xml.bind 21 | jaxb-api 22 | ${jaxb2-api.version} 23 | 24 | 25 | 26 | test 27 | 28 | 29 | ${project.groupId} 30 | jaxb22-maven-plugin 31 | 32 | true 33 | false 34 | 35 | 36 | ${project.groupId} 37 | jaxb-maven-plugin-tests-episodes-a 38 | ${project.version} 39 | 40 | 41 | src/main/resources/catalog.cat 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /tests/episodes/b/src/main/resources/b.xsd: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /tests/episodes/b/src/main/resources/catalog.cat: -------------------------------------------------------------------------------- 1 | -- 2 | If the parameter isn't working, this link to schema A is 3 | not recognized and the test will fail because of a missing schema. 4 | -- 5 | REWRITE_SYSTEM "https://raw.githubusercontent.com/evolvedbinary/jvnet-jaxb-maven-plugin/main/tests/episodes/a/src/main/resources/a.xsd" "maven:com.evolvedbinary.maven.jvnet:jaxb-maven-plugin-tests-episodes-a:jar::!/a.xsd" 6 | 7 | -------------------------------------------------------------------------------- /tests/episodes/c/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /tests/episodes/c/src/main/resources/c.xsd: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /tests/episodes/d/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /tests/episodes/d/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | 6 | com.evolvedbinary.maven.jvnet 7 | jaxb-maven-plugin-tests-episodes 8 | 0.16.0-SNAPSHOT 9 | 10 | jaxb-maven-plugin-tests-episodes-d 11 | jar 12 | Maven JAXB 2.x Plugin Tests [episodes:d] 13 | 14 | 15 | javax.xml.bind 16 | jaxb-api 17 | ${jaxb2-api.version} 18 | 19 | 20 | ${project.groupId} 21 | jaxb-maven-plugin-tests-episodes-a 22 | ${project.version} 23 | 24 | 25 | 26 | test 27 | 28 | 29 | ${project.groupId} 30 | jaxb22-maven-plugin 31 | 32 | true 33 | false 34 | 35 | 36 | ${project.groupId} 37 | jaxb-maven-plugin-tests-episodes-a 38 | ${project.version} 39 | 40 | 41 | 47 | src/main/resources/catalog.cat 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /tests/episodes/d/src/main/resources/catalog.cat: -------------------------------------------------------------------------------- 1 | -- 2 | If the parameter isn't working, this link to schema A is 3 | not recognized and the test will fail because of a missing schema. 4 | -- 5 | PUBLIC "a" "maven:com.evolvedbinary.maven.jvnet:jaxb-maven-plugin-tests-episodes-a:jar::!/a.xsd" 6 | -------------------------------------------------------------------------------- /tests/episodes/d/src/main/resources/d.xsd: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /tests/episodes/e/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /tests/episodes/e/src/main/resources/catalog.cat: -------------------------------------------------------------------------------- 1 | -- 2 | If the parameter isn't working, this link to schema A is 3 | not recognized and the test will fail because of a missing schema. 4 | -- 5 | PUBLIC "a" "maven:com.evolvedbinary.maven.jvnet:jaxb-maven-plugin-tests-episodes-a:jar::!/a.xsd" 6 | -------------------------------------------------------------------------------- /tests/episodes/e/src/main/resources/d.xsd: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /tests/episodes/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | 6 | com.evolvedbinary.maven.jvnet 7 | jaxb-maven-plugin-tests 8 | 0.16.0-SNAPSHOT 9 | 10 | jaxb-maven-plugin-tests-episodes 11 | pom 12 | Maven JAXB 2.x Plugin Tests [episodes] 13 | 14 | a 15 | b 16 | c 17 | d 18 | e 19 | 20 | 21 | test 22 | 23 | -------------------------------------------------------------------------------- /tests/full-build-1.7.bat: -------------------------------------------------------------------------------- 1 | setlocal 2 | echo Setting JAVA_HOME to %JAVA7_HOME%. 3 | set JAVA_HOME=%JAVA7_HOME% 4 | call mvn clean install -Pall,sonatype-oss-release -DperformRelease --fail-at-end 5 | endlocal -------------------------------------------------------------------------------- /tests/full-build-1.8.bat: -------------------------------------------------------------------------------- 1 | setlocal 2 | echo Setting JAVA_HOME to %JAVA8_HOME%. 3 | set JAVA_HOME=%JAVA8_HOME% 4 | call mvn clean install -Pall,sonatype-oss-release -DperformRelease --fail-at-end 5 | endlocal -------------------------------------------------------------------------------- /tests/full-build-9.bat: -------------------------------------------------------------------------------- 1 | setlocal 2 | echo Setting JAVA_HOME to %JAVA9_HOME%. 3 | set JAVA_HOME=%JAVA9_HOME% 4 | call mvn clean install -Pall,sonatype-oss-release -DperformRelease --fail-at-end 5 | endlocal -------------------------------------------------------------------------------- /tests/gh-issue-16/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /tests/gh-issue-16/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | jaxb-maven-plugin-tests-gh-issue-16 6 | 7 | com.evolvedbinary.maven.jvnet 8 | jaxb-maven-plugin-tests 9 | 0.16.0-SNAPSHOT 10 | 11 | jar 12 | Maven JAXB 2.x Plugin Tests [GitHub Issue #16] 13 | 14 | 15 | javax.xml.bind 16 | jaxb-api 17 | ${jaxb2-api.version} 18 | 19 | 20 | 21 | 22 | 23 | ${project.groupId} 24 | jaxb2-maven-plugin 25 | 26 | 27 | generate 28 | 29 | generate 30 | 31 | 32 | 33 | src/main/resources/ab/catalog.cat 34 | 35 | **/a.xsd 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /tests/gh-issue-16/src/main/resources/ab/a.xjb: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /tests/gh-issue-16/src/main/resources/ab/a.xsd: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /tests/gh-issue-16/src/main/resources/ab/b.xsd: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /tests/gh-issue-16/src/main/resources/ab/catalog.cat: -------------------------------------------------------------------------------- 1 | REWRITE_SYSTEM "http://www.ab.org" "../ab" 2 | 3 | -------------------------------------------------------------------------------- /tests/gh-issue-19/a/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /tests/gh-issue-19/a/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | 6 | com.evolvedbinary.maven.jvnet 7 | jaxb-maven-plugin-tests-gh-issue-19 8 | 0.12.1-SNAPSHOT 9 | 10 | jaxb-maven-plugin-tests-gh-issue-19-a 11 | jar 12 | Maven JAXB 2.x Plugin Tests [GitHub Issue #19:a] 13 | 14 | test 15 | 16 | 17 | ${project.groupId} 18 | jaxb2-maven-plugin 19 | 20 | 21 | a/a.xsd 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /tests/gh-issue-19/a/src/main/resources/a/a.xsd: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /tests/gh-issue-19/b/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /tests/gh-issue-19/b/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | 6 | com.evolvedbinary.maven.jvnet 7 | jaxb-maven-plugin-tests-gh-issue-19 8 | 0.12.1-SNAPSHOT 9 | 10 | jaxb-maven-plugin-tests-gh-issue-19-b 11 | jar 12 | Maven JAXB 2.x Plugin Tests [GitHub Issue #19:b] 13 | 14 | 15 | ${project.groupId} 16 | jaxb-maven-plugin-tests-gh-issue-19-a 17 | ${project.version} 18 | 19 | 20 | ${project.groupId} 21 | jaxb-maven-plugin-testing 22 | test 23 | 24 | 25 | 26 | test 27 | 28 | 29 | ${project.groupId} 30 | jaxb2-maven-plugin 31 | 32 | true 33 | 34 | b/b.xsd 35 | 36 | src/main/resources/b/b.cat 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /tests/gh-issue-19/b/src/main/resources/b/b.cat: -------------------------------------------------------------------------------- 1 | REWRITE_SYSTEM "../a" "maven:org.jvnet.jaxb2.maven2:maven-jaxb2-plugin-tests-gh-issue-19-a:jar::!/a" 2 | REWRITE_SYSTEM "file:/C:/Projects/workspaces/mj2p/maven-jaxb2-plugin-project/tests/gh-issue-19/b/src/main/resources/a" "maven:org.jvnet.jaxb2.maven2:maven-jaxb2-plugin-tests-gh-issue-19-a:jar::!/a" -------------------------------------------------------------------------------- /tests/gh-issue-19/b/src/main/resources/b/b.xsd: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /tests/gh-issue-19/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | 6 | com.evolvedbinary.maven.jvnet 7 | jaxb-maven-plugin-tests 8 | 0.12.1-SNAPSHOT 9 | 10 | jaxb-maven-plugin-tests-gh-issue-19 11 | pom 12 | Maven JAXB 2.x Plugin Tests [GitHub Issue #19] 13 | 14 | a 15 | b 16 | 17 | 18 | test 19 | 20 | -------------------------------------------------------------------------------- /tests/gh-issue-22/a/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /tests/gh-issue-22/a/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | 6 | com.evolvedbinary.maven.jvnet 7 | jaxb-maven-plugin-tests-gh-issue-22 8 | 0.16.0-SNAPSHOT 9 | 10 | jaxb-maven-plugin-tests-gh-issue-22-a 11 | jar 12 | Maven JAXB 2.x Plugin Tests [GitHub Issue #22:a] 13 | 14 | 15 | javax.xml.bind 16 | jaxb-api 17 | ${jaxb2-api.version} 18 | 19 | 20 | 21 | test 22 | 23 | 24 | ${project.groupId} 25 | jaxb2-maven-plugin 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /tests/gh-issue-22/a/src/main/resources/a.xsd: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /tests/gh-issue-22/b/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /tests/gh-issue-22/b/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | 6 | com.evolvedbinary.maven.jvnet 7 | jaxb-maven-plugin-tests-gh-issue-22 8 | 0.16.0-SNAPSHOT 9 | 10 | jaxb-maven-plugin-tests-gh-issue-22-b 11 | jar 12 | Maven JAXB 2.x Plugin Tests [GitHub Issue #22:b] 13 | 14 | 15 | javax.xml.bind 16 | jaxb-api 17 | ${jaxb2-api.version} 18 | 19 | 20 | 21 | test 22 | 23 | 24 | ${project.groupId} 25 | jaxb2-maven-plugin 26 | 27 | 28 | 29 | 30 | ${project.groupId} 31 | jaxb-maven-plugin-tests-gh-issue-22-a 32 | ${project.version} 33 | a.xsd 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /tests/gh-issue-22/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | 6 | com.evolvedbinary.maven.jvnet 7 | jaxb-maven-plugin-tests 8 | 0.16.0-SNAPSHOT 9 | 10 | jaxb-maven-plugin-tests-gh-issue-22 11 | pom 12 | Maven JAXB 2.x Plugin Tests [GitHub Issue #22] 13 | 14 | a 15 | b 16 | 17 | 18 | test 19 | 20 | -------------------------------------------------------------------------------- /tests/gh-issue-23/one-non-strict/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /tests/gh-issue-23/one-non-strict/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | 6 | com.evolvedbinary.maven.jvnet 7 | jaxb-maven-plugin-tests-gh-issue-23 8 | 0.16.0-SNAPSHOT 9 | 10 | jaxb-maven-plugin-tests-gh-issue-23-one-non-strict 11 | jar 12 | Maven JAXB 2.x Plugin Tests [GitHub Issue #23:one-non-strict] 13 | 14 | 15 | javax.xml.bind 16 | jaxb-api 17 | ${jaxb2-api.version} 18 | 19 | 20 | 21 | 22 | 23 | ${project.groupId} 24 | jaxb2-maven-plugin 25 | 26 | 27 | generate 28 | 29 | generate 30 | 31 | 32 | 33 | 34 | 35 | 36 | http://www.ab.org/one/a.xsd 37 | 38 | src/main/resources/META-INF/one/catalog.xml 39 | false 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /tests/gh-issue-23/one-non-strict/src/main/resources/META-INF/one/catalog.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/gh-issue-23/one-non-strict/src/main/resources/one/a.xsd: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /tests/gh-issue-23/one-non-strict/src/main/resources/one/b.xsd: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /tests/gh-issue-23/one-non-strict/src/main/resources/one/b1.xsd: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /tests/gh-issue-23/one-non-strict/src/main/resources/two/p.xsd: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /tests/gh-issue-23/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | 6 | com.evolvedbinary.maven.jvnet 7 | jaxb-maven-plugin-tests 8 | 0.16.0-SNAPSHOT 9 | 10 | jaxb-maven-plugin-tests-gh-issue-23 11 | pom 12 | Maven JAXB 2.x Plugin Tests [GitHub Issue #23] 13 | 14 | one-non-strict 15 | two-non-strict 16 | 17 | 18 | test 19 | 20 | -------------------------------------------------------------------------------- /tests/gh-issue-23/two-non-strict/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /tests/gh-issue-23/two-non-strict/src/main/resources/META-INF/two/catalog.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/gh-issue-23/two-non-strict/src/main/resources/one/a.xsd: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /tests/gh-issue-23/two-non-strict/src/main/resources/one/b.xsd: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /tests/gh-issue-23/two-non-strict/src/main/resources/one/b1.xsd: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /tests/gh-issue-23/two-non-strict/src/main/resources/two/p.xsd: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /tests/gh-issue-58/.gitignore: -------------------------------------------------------------------------------- 1 | .settings 2 | .classpath 3 | .project 4 | /target/ 5 | -------------------------------------------------------------------------------- /tests/gh-issue-58/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | jaxb-maven-plugin-tests-gh-issue-58 6 | 7 | com.evolvedbinary.maven.jvnet 8 | jaxb-maven-plugin-tests 9 | 0.16.0-SNAPSHOT 10 | 11 | jar 12 | Maven JAXB 2.x Plugin Tests [GitHub Issue #58] 13 | 14 | 15 | javax.xml.bind 16 | jaxb-api 17 | ${jaxb2-api.version} 18 | 19 | 20 | 21 | 22 | 23 | ${project.groupId} 24 | jaxb2-maven-plugin 25 | 26 | true 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /tests/issues/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /tests/issues/src/main/java/org/jvnet/jaxb2/maven2/tests/issues/common/Generated.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2.maven2.tests.issues.common; 2 | 3 | public class Generated 4 | { 5 | } 6 | -------------------------------------------------------------------------------- /tests/issues/src/main/resources/binding.xjb: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /tests/issues/src/main/resources/depends.dep: -------------------------------------------------------------------------------- 1 | See issue #99. 2 | If this file is changed, compilation will be forced. -------------------------------------------------------------------------------- /tests/issues/src/main/resources/depends.txt: -------------------------------------------------------------------------------- 1 | See issue #99. -------------------------------------------------------------------------------- /tests/issues/src/main/resources/schema.xsd: -------------------------------------------------------------------------------- 1 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /tests/issues/src/test/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | log4j.rootCategory=DEBUG, stdout 2 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 3 | log4j.appender.stdout.target=system.out 4 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 5 | log4j.appender.stdout.layout.ConversionPattern=%m%n %c%n%n 6 | log4j.logger.org.apache.commons.digester=INFO 7 | log4j.logger.org.jvnet.hyperjaxb3=DEBUG 8 | log4j.logger.org.hibernate=WARN -------------------------------------------------------------------------------- /tests/java-9/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /tests/java-9/install-10.bat: -------------------------------------------------------------------------------- 1 | setlocal 2 | set JAVA_HOME=%JAVA10_HOME% 3 | call mvn clean install 4 | endlocal -------------------------------------------------------------------------------- /tests/java-9/install-8.bat: -------------------------------------------------------------------------------- 1 | setlocal 2 | set JAVA_HOME=%JAVA8_HOME% 3 | call mvn clean install 4 | endlocal -------------------------------------------------------------------------------- /tests/java-9/install-9.bat: -------------------------------------------------------------------------------- 1 | setlocal 2 | set JAVA_HOME=%JAVA9_HOME% 3 | call mvn clean install 4 | endlocal -------------------------------------------------------------------------------- /tests/java-9/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | jaxb-maven-plugin-tests-java-9 6 | 7 | com.evolvedbinary.maven.jvnet 8 | jaxb-maven-plugin-tests 9 | 0.16.0-SNAPSHOT 10 | 11 | jar 12 | Maven JAXB 2.x Plugin Tests [Java 9] 13 | 14 | 15 | 16 | ${project.groupId} 17 | jaxb23-maven-plugin 18 | 19 | 20 | generate 21 | 22 | generate 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | javax.xml.bind 32 | jaxb-api 33 | ${jaxb2-api.version} 34 | 35 | 36 | junit 37 | junit 38 | test 39 | 40 | 41 | -------------------------------------------------------------------------------- /tests/java-9/src/main/resources/SimpleClass.xsd: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /tests/java-9/src/main/resources/SimpleClassWithOtherName.xsd: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /tests/java-9/src/main/resources/SimpleClassWithPackage.xsd: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /tests/java-9/src/test/java/org/jvnet/jaxb2/maven2/java9/Java9Test.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017 by Disy Informationssysteme GmbH 2 | package org.jvnet.jaxb2.maven2.java9; 3 | 4 | import static org.junit.Assert.assertNotNull; 5 | 6 | import org.junit.Test; 7 | 8 | // NOT_PUBLISHED 9 | public class Java9Test { 10 | 11 | @Test 12 | public void packageBindingRespected() throws Exception { 13 | Object o = Class.forName("with_pack.SimpleClassWithPackage").newInstance(); 14 | assertNotNull(o); 15 | } 16 | 17 | @Test 18 | public void classNameBindingRespected() throws Exception { 19 | Object o = Class.forName("class_name.SimpleClassWithRightName").newInstance(); 20 | assertNotNull(o); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /tests/p o/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /tests/p o/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | jaxb-maven-plugin-tests-p_o 6 | 7 | com.evolvedbinary.maven.jvnet 8 | jaxb-maven-plugin-tests 9 | 0.16.0-SNAPSHOT 10 | 11 | jar 12 | Maven JAXB 2.x Plugin Tests [p o] 13 | 14 | 15 | org.glassfish.jaxb 16 | jaxb-xjc 17 | ${jaxb2-api.version} 18 | test 19 | 20 | 21 | ${project.groupId} 22 | jaxb-maven-plugin-core 23 | test 24 | 25 | 26 | ${project.groupId} 27 | jaxb-maven-plugin-testing 28 | test 29 | 30 | 31 | javax.xml.bind 32 | jaxb-api 33 | ${jaxb2-api.version} 34 | 35 | 36 | 37 | 38 | 39 | ${project.groupId} 40 | jaxb2-maven-plugin 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /tests/p o/src/main/resources/binding.xjb: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/p o/src/test/java/org/jvnet/mjiip/v_2/tests/p_o/RunP_OPlugin.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.mjiip.v_2.tests.p_o; 2 | 3 | import org.jvnet.jaxb2.maven2.AbstractXJCMojo; 4 | import org.jvnet.jaxb2.maven2.test.RunXJC2Mojo; 5 | 6 | public class RunP_OPlugin extends RunXJC2Mojo { 7 | 8 | @Override 9 | protected void configureMojo(AbstractXJCMojo mojo) { 10 | super.configureMojo(mojo); 11 | // mojo.setExtension(true); 12 | // mojo.setForceRegenerate(true); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /tests/p o/src/test/java/org/jvnet/mjiip/v_2/tests/p_o/RunXJC.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.mjiip.v_2.tests.p_o; 2 | 3 | import com.sun.tools.xjc.Driver; 4 | 5 | public class RunXJC { 6 | 7 | public static void main(String args[]) throws Exception { 8 | Driver.main(new String[] { "src\\main\\resources\\purchaseorder.xsd", 9 | "-b", "src\\main\\resources\\binding.xjb", "-d", 10 | "target/generated-sources/xjc" }); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /tests/po-2.2/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /tests/po-2.2/build-1.5.bat: -------------------------------------------------------------------------------- 1 | setlocal 2 | set JAVA_HOME=%JAVA5_HOME% 3 | call mvn -X -Dmaven.test.skip=true clean install >std 2>err 4 | endlocal -------------------------------------------------------------------------------- /tests/po-2.2/build-1.6.bat: -------------------------------------------------------------------------------- 1 | setlocal 2 | set JAVA_HOME=%JAVA6_HOME% 3 | java -version 4 | call mvn -X -Dmaven.test.skip=true clean install >std 2>err 5 | endlocal -------------------------------------------------------------------------------- /tests/po-2.2/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | jaxb-maven-plugin-tests-po-2.2 6 | 7 | com.evolvedbinary.maven.jvnet 8 | jaxb-maven-plugin-tests 9 | 0.16.0-SNAPSHOT 10 | 11 | jar 12 | Maven JAXB 2.x Plugin Tests [po-2.2] 13 | 14 | 15 | javax.xml.bind 16 | jaxb-api 17 | ${jaxb22.version} 18 | 19 | 20 | 21 | 22 | 23 | ${project.groupId} 24 | jaxb22-maven-plugin 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /tests/po-2.3/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /tests/po-2.3/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | jaxb-maven-plugin-tests-po-2.3 6 | 7 | com.evolvedbinary.maven.jvnet 8 | jaxb-maven-plugin-tests 9 | 0.16.0-SNAPSHOT 10 | 11 | jar 12 | Maven JAXB 2.x Plugin Tests [po-2.3] 13 | 14 | 15 | javax.xml.bind 16 | jaxb-api 17 | ${jaxb2-api.version} 18 | 19 | 20 | 21 | 22 | 23 | ${project.groupId} 24 | jaxb23-maven-plugin 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /tests/po-3.0/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /tests/po-3.0/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | jaxb-maven-plugin-tests-po-3.0 6 | 7 | com.evolvedbinary.maven.jvnet 8 | jaxb-maven-plugin-tests 9 | 0.16.0-SNAPSHOT 10 | 11 | jar 12 | Maven JAXB 3.x Plugin Tests [po-3.0] 13 | 14 | 15 | jakarta.xml.bind 16 | jakarta.xml.bind-api 17 | ${jaxb30.version} 18 | 19 | 20 | 21 | 22 | 23 | ${project.groupId} 24 | jaxb30-maven-plugin 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /tests/po-scd/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /tests/po-scd/build-1.5.bat: -------------------------------------------------------------------------------- 1 | setlocal 2 | set JAVA_HOME=%JAVA5_HOME% 3 | call mvn -X -Dmaven.test.skip=true clean install >std 2>err 4 | endlocal -------------------------------------------------------------------------------- /tests/po-scd/build-1.6.bat: -------------------------------------------------------------------------------- 1 | setlocal 2 | set JAVA_HOME=%JAVA6_HOME% 3 | call mvn -X -Dmaven.test.skip=true clean install >std 2>err 4 | endlocal -------------------------------------------------------------------------------- /tests/po-scd/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | jaxb-maven-plugin-tests-po-scd 6 | 7 | com.evolvedbinary.maven.jvnet 8 | jaxb-maven-plugin-tests 9 | 0.16.0-SNAPSHOT 10 | 11 | jar 12 | Maven JAXB 2.x Plugin Tests [po-scd] 13 | 14 | 15 | javax.xml.bind 16 | jaxb-api 17 | ${jaxb2-api.version} 18 | 19 | 20 | 21 | 22 | 23 | ${project.groupId} 24 | jaxb2-maven-plugin 25 | 26 | true 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /tests/po-scd/src/main/resources/bindings.xjb: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /tests/res/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /tests/res/src/main/resources/bindings.xjb: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /tests/res/src/main/resources/catalog.cat: -------------------------------------------------------------------------------- 1 | REWRITE_SYSTEM "http://schemas.opengis.net" "../schema/ogc" -------------------------------------------------------------------------------- /tests/res/src/main/schema/ogc/wms/1.3.0/exceptions_1_3_0.xsd: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 14 | 15 | 16 | 17 | 18 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /tests/res/src/test/java/org/jvnet/jaxb2/maven2/tests/res/RunResMojo.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2.maven2.tests.res; 2 | 3 | import java.io.File; 4 | 5 | import org.jvnet.jaxb2.maven2.AbstractXJCMojo; 6 | import org.jvnet.jaxb2.maven2.DependencyResource; 7 | import org.jvnet.jaxb2.maven2.ResourceEntry; 8 | import org.jvnet.jaxb2.maven2.test.RunXJC2Mojo; 9 | 10 | public class RunResMojo extends RunXJC2Mojo { 11 | 12 | @Override 13 | protected void configureMojo(AbstractXJCMojo mojo) { 14 | super.configureMojo(mojo); 15 | 16 | mojo.setCatalog(new File(getBaseDir(),"src/main/jaxb/catalog.cat")); 17 | mojo.setExtension(true); 18 | final ResourceEntry purchaseorder_xsd = new ResourceEntry(); 19 | final DependencyResource purchaseorder_xsd_dependencyResource = new DependencyResource(); 20 | purchaseorder_xsd.setDependencyResource(purchaseorder_xsd_dependencyResource); 21 | purchaseorder_xsd.getDependencyResource().setGroupId("org.jvnet.jaxb2.maven2"); 22 | purchaseorder_xsd.getDependencyResource().setArtifactId("maven-jaxb2-plugin-tests-po"); 23 | purchaseorder_xsd.getDependencyResource().setResource("purchaseorder.xsd"); 24 | mojo.setSchemas(new ResourceEntry[]{ 25 | purchaseorder_xsd 26 | 27 | }); 28 | // mojo. 29 | // 30 | // final ResourceEntry a_xsd = new ResourceEntry(); 31 | // a_xsd.setUrl("http://www.ab.org/a.xsd"); 32 | // mojo.setStrict(false); 33 | // mojo.setSchemaIncludes(new String[] {}); 34 | // mojo.setSchemas(new ResourceEntry[] { a_xsd }); 35 | // mojo.setCatalog(new File(getBaseDir(), "src/main/resources/catalog.cat")); 36 | mojo.setForceRegenerate(true); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /tests/rnc/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /.settings/ 3 | /.classpath 4 | /.project 5 | -------------------------------------------------------------------------------- /tests/rnc/src/test/java/org/jvnet/jaxb2/maven2/tests/rnc/DatatypeLibraryLoaderTest.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2.maven2.tests.rnc; 2 | 3 | import org.junit.Test; 4 | import org.kohsuke.rngom.dt.builtin.BuiltinDatatypeLibraryFactory; 5 | import org.relaxng.datatype.DatatypeLibraryFactory; 6 | import org.relaxng.datatype.helpers.DatatypeLibraryLoader; 7 | 8 | public class DatatypeLibraryLoaderTest { 9 | 10 | @Test 11 | public void testDatatypeLibrary() 12 | { 13 | final DatatypeLibraryFactory b = new BuiltinDatatypeLibraryFactory(new DatatypeLibraryLoader()); 14 | b.createDatatypeLibrary(""); 15 | b.createDatatypeLibrary("http://www.w3.org/2001/XMLSchema-datatypes"); 16 | b.createDatatypeLibrary("http://www.w3.org/2001/XMLSchema-datatypes"); 17 | 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /tests/rnc/src/test/java/org/jvnet/jaxb2/maven2/tests/rnc/RunRNCMojo.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2.maven2.tests.rnc; 2 | 3 | import org.jvnet.jaxb2.maven2.AbstractXJCMojo; 4 | import org.jvnet.jaxb2.maven2.test.RunXJC2Mojo; 5 | 6 | import com.sun.tools.xjc.reader.Ring; 7 | 8 | 9 | public class RunRNCMojo extends RunXJC2Mojo { 10 | 11 | @Override 12 | protected void configureMojo(AbstractXJCMojo mojo) { 13 | super.configureMojo(mojo); 14 | 15 | // final ResourceEntry a_xsd = new ResourceEntry(); 16 | // a_xsd.setUrl("http://www.ab.org/a.xsd"); 17 | mojo.setStrict(false); 18 | mojo.setSchemaLanguage("RELAXNG_COMPACT"); 19 | mojo.setSchemaIncludes(new String[] { "*.rnc" }); 20 | mojo.setGeneratePackage("foo"); 21 | // mojo.setSchemas(new ResourceEntry[] { a_xsd }); 22 | // mojo.setCatalog(new File(getBaseDir(), 23 | // "src/main/resources/catalog.cat")); 24 | mojo.setForceRegenerate(true); 25 | // Ring.begin(); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /tests/tse/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /tests/tse/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | jaxb-maven-plugin-tests-tse 6 | 7 | com.evolvedbinary.maven.jvnet 8 | jaxb-maven-plugin-tests 9 | 0.16.0-SNAPSHOT 10 | 11 | jar 12 | Maven JAXB 2.x Plugin Tests [tse] 13 | 14 | 15 | javax.xml.bind 16 | jaxb-api 17 | ${jaxb22.version} 18 | 19 | 20 | 21 | 22 | 23 | ${project.groupId} 24 | jaxb22-maven-plugin 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /tests/tse/src/main/java/a/A2Enum.java: -------------------------------------------------------------------------------- 1 | package a; 2 | 3 | import javax.xml.bind.annotation.XmlEnum; 4 | import javax.xml.bind.annotation.XmlType; 5 | 6 | 7 | @XmlType(name = "A2EnumType", namespace = "a") 8 | @XmlEnum 9 | public enum A2Enum { 10 | 11 | ABC, 12 | DEF, 13 | GHI; 14 | 15 | public String value() { 16 | return name(); 17 | } 18 | 19 | public static A2Enum fromValue(String v) { 20 | return valueOf(v); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /tests/tse/src/main/java/a/ObjectFactory.java: -------------------------------------------------------------------------------- 1 | package a; 2 | 3 | import javax.xml.bind.annotation.XmlRegistry; 4 | 5 | @XmlRegistry 6 | public class ObjectFactory { 7 | 8 | public ObjectFactory() { 9 | } 10 | 11 | } 12 | -------------------------------------------------------------------------------- /tests/tse/src/main/resources/a.xsd: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /tests/tse/src/main/resources/b.xsd: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /tests/two/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /tests/two/build-1.5.bat: -------------------------------------------------------------------------------- 1 | setlocal 2 | set JAVA_HOME=%JAVA5_HOME% 3 | call mvn -X -Dmaven.test.skip=true clean install >std 2>err 4 | endlocal -------------------------------------------------------------------------------- /tests/two/build-1.6.bat: -------------------------------------------------------------------------------- 1 | setlocal 2 | set JAVA_HOME=%JAVA6_HOME% 3 | call mvn -X -Dmaven.test.skip=true clean install >std 2>err 4 | endlocal -------------------------------------------------------------------------------- /tests/two/src/main/resources/schema.xs: -------------------------------------------------------------------------------- 1 | This file must be excluded. -------------------------------------------------------------------------------- /tests/two/src/test/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | log4j.rootCategory=DEBUG, stdout 2 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 3 | log4j.appender.stdout.target=system.out 4 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 5 | log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - <%m>%n -------------------------------------------------------------------------------- /tests/two/src/test/samples/1.xml: -------------------------------------------------------------------------------- 1 | 2 | a 3 | b 4 | c 5 | d 6 | e 7 | 8 | 0 9 | 1 10 | 11 | 12 | -------------------------------------------------------------------------------- /tests/wsdl-file/.gitignore: -------------------------------------------------------------------------------- 1 | target 2 | -------------------------------------------------------------------------------- /tests/wsdl-file/build-1.5.bat: -------------------------------------------------------------------------------- 1 | setlocal 2 | set JAVA_HOME=%JAVA5_HOME% 3 | call mvn -X -e -Dmaven.test.skip=true clean install >std 2>err 4 | endlocal -------------------------------------------------------------------------------- /tests/wsdl-file/build-1.6.bat: -------------------------------------------------------------------------------- 1 | setlocal 2 | set JAVA_HOME=%JAVA6_HOME% 3 | call mvn -X -Dmaven.test.skip=true clean install >std 2>err 4 | endlocal -------------------------------------------------------------------------------- /tests/wsdl-file/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | jaxb-maven-plugin-tests-wsdl-file 6 | 7 | com.evolvedbinary.maven.jvnet 8 | jaxb-maven-plugin-tests 9 | 0.14.4-SNAPSHOT 10 | 11 | jar 12 | Maven JAXB 2.x Plugin Tests [wsdl-file] 13 | 14 | 15 | org.glassfish.jaxb 16 | jaxb-runtime 17 | ${jaxb.version} 18 | 19 | 20 | 21 | junit 22 | junit 23 | test 24 | 25 | 26 | 27 | 28 | 29 | ${project.groupId} 30 | jaxb2-maven-plugin 31 | 32 | 33 | *.wsdl 34 | 35 | WSDL 36 | 37 | 38 | 39 | 40 | 41 | 42 | jdk11.jaxb-api.2 43 | 44 | [11,) 45 | 46 | 47 | 48 | javax.xml.bind 49 | jaxb-api 50 | ${jaxb2-api.version} 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /tests/wsdl-file/src/main/resources/pedidowebservice.wsdl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /tests/wsdl-file/src/test/java/net/webservicex/test/JAXBContextTest.java: -------------------------------------------------------------------------------- 1 | package net.webservicex.test; 2 | 3 | import javax.xml.bind.JAXBContext; 4 | import javax.xml.bind.JAXBException; 5 | 6 | import org.junit.Test; 7 | 8 | import junit.framework.Assert; 9 | import net.webservicex.GetWeather; 10 | 11 | public class JAXBContextTest { 12 | 13 | public static final String CONTEXT_PATH = GetWeather.class.getPackage().getName(); 14 | 15 | @Test 16 | public void successfullyCreatesMarshallerAndUnmarshaller() throws JAXBException { 17 | final JAXBContext context = JAXBContext.newInstance(CONTEXT_PATH); 18 | Assert.assertNotNull(context.createMarshaller()); 19 | Assert.assertNotNull(context.createUnmarshaller()); 20 | 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /tests/wsdl/.gitignore: -------------------------------------------------------------------------------- 1 | target 2 | .classpath 3 | .project 4 | .settings 5 | -------------------------------------------------------------------------------- /tests/wsdl/build-1.5.bat: -------------------------------------------------------------------------------- 1 | setlocal 2 | set JAVA_HOME=%JAVA5_HOME% 3 | call mvn -X -e -Dmaven.test.skip=true clean install >std 2>err 4 | endlocal -------------------------------------------------------------------------------- /tests/wsdl/build-1.6.bat: -------------------------------------------------------------------------------- 1 | setlocal 2 | set JAVA_HOME=%JAVA6_HOME% 3 | call mvn -X -Dmaven.test.skip=true clean install >std 2>err 4 | endlocal -------------------------------------------------------------------------------- /tests/wsdl/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | jaxb-maven-plugin-tests-wsdl 6 | 7 | com.evolvedbinary.maven.jvnet 8 | jaxb-maven-plugin-tests 9 | 0.14.4-SNAPSHOT 10 | 11 | jar 12 | Maven JAXB 2.x Plugin Tests [wsdl] 13 | 14 | 15 | org.glassfish.jaxb 16 | jaxb-runtime 17 | ${jaxb.version} 18 | 19 | 20 | 21 | junit 22 | junit 23 | test 24 | 25 | 26 | 27 | 28 | 29 | ${project.groupId} 30 | jaxb2-maven-plugin 31 | 32 | 33 | 34 | http://www.webservicex.net/globalweather.asmx?wsdl 35 | 36 | 37 | WSDL 38 | 39 | 40 | 41 | 42 | 43 | 44 | jdk11.jaxb-api.2 45 | 46 | [11,) 47 | 48 | 49 | 50 | javax.xml.bind 51 | jaxb-api 52 | ${jaxb2-api.version} 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /tests/wsdl/src/test/java/net/webservicex/test/JAXBContextTest.java: -------------------------------------------------------------------------------- 1 | package net.webservicex.test; 2 | 3 | import javax.xml.bind.JAXBContext; 4 | import javax.xml.bind.JAXBException; 5 | 6 | import org.junit.Test; 7 | 8 | import junit.framework.Assert; 9 | import net.webservicex.GetWeather; 10 | 11 | public class JAXBContextTest { 12 | 13 | public static final String CONTEXT_PATH = GetWeather.class.getPackage().getName(); 14 | 15 | @Test 16 | public void successfullyCreatesMarshallerAndUnmarshaller() throws JAXBException { 17 | final JAXBContext context = JAXBContext.newInstance(CONTEXT_PATH); 18 | Assert.assertNotNull(context.createMarshaller()); 19 | Assert.assertNotNull(context.createUnmarshaller()); 20 | 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /tests/xjc-simple/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /tests/xjc-simple/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | jaxb-maven-plugin-tests-xjc-simple 6 | 7 | com.evolvedbinary.maven.jvnet 8 | jaxb-maven-plugin-tests 9 | 0.16.0-SNAPSHOT 10 | 11 | jar 12 | Maven JAXB 2.x Plugin Tests [xjc-simple] 13 | 14 | 15 | javax.xml.bind 16 | jaxb-api 17 | ${jaxb2-api.version} 18 | 19 | 20 | org.jvnet.jaxb2_commons 21 | jaxb2-basics-runtime 22 | 23 | 24 | 25 | 26 | 27 | ${project.groupId} 28 | jaxb2-maven-plugin 29 | 30 | 31 | generate 32 | 33 | generate 34 | 35 | 36 | 37 | -XtoString 38 | -Xequals 39 | -XhashCode 40 | -Xcopyable 41 | 42 | 43 | 44 | org.jvnet.jaxb2_commons 45 | jaxb2-basics 46 | ${jaxb2-basics.version} 47 | 48 | 49 | true 50 | 51 | 52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /tests/xjc-simple/src/main/resources/purchaseorder.xjb: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /www/alm-process/snippets/page.xml: -------------------------------------------------------------------------------- 1 | 2 | index.htmlSubprojects 3 | -------------------------------------------------------------------------------- /www/docs/guide.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Maven2 JAXB2 Plugin User Guide 5 | 6 | 7 |

User guide was moved to the following addres: http://confluence.highsource.org/display/MJIIP/User+Guide. 8 | Please update your bookmarks.

9 | 10 | -------------------------------------------------------------------------------- /www/project_tools.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 25 |