pax_global_header00006660000000000000000000000064142315563400014515gustar00rootroot0000000000000052 comment=cdfa3ce6de664c5e58f27c45d012f69d72e13906 maven-jaxb2-plugin-0.15.1/000077500000000000000000000000001423155634000152075ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/.github/000077500000000000000000000000001423155634000165475ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/.github/workflows/000077500000000000000000000000001423155634000206045ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/.github/workflows/maven-build-action.yaml000066400000000000000000000005551423155634000251530ustar00rootroot00000000000000name: Maven CI on: push: branches: [ master ] pull_request: branches: [ master ] jobs: build_and_test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Set up JDK 11 uses: actions/setup-java@v1 with: java-version: 11 - name: Build project with Maven run: mvn -fn -Pall clean install maven-jaxb2-plugin-0.15.1/.gitignore000066400000000000000000000001041423155634000171720ustar00rootroot00000000000000/.idea *.iml /err /std **/.classpath **/.project **/.settings targetmaven-jaxb2-plugin-0.15.1/LICENSE000066400000000000000000000024301423155634000162130ustar00rootroot00000000000000Copyright (c) 2006-2021, Alexey Valikov. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. maven-jaxb2-plugin-0.15.1/README.md000066400000000000000000000065421423155634000164750ustar00rootroot00000000000000# JAXB2 Maven Plugin # Welcome to the `org.jvnet.jaxb2.maven2:maven-jaxb2-plugin`, the most advanced and feature-full Maven plugin for XML Schema compilation. This Maven plugin wraps and enhances the [JAXB](https://jaxb.java.net/) [Schema Compiler (XJC)](http://docs.oracle.com/javase/6/docs/technotes/tools/share/xjc.html) and allows compiling XML Schemas (as well as WSDL, DTDs, RELAX NG) into Java classes in Maven builds. > If you are interested in the Mojohaus JAXB2 Maven Plugin (`org.codehaus.mojo:jaxb2-maven-plugin`), > please follow [this link](https://github.com/mojohaus/jaxb2-maven-plugin) to the corresponding website. ## Quick start ## * Put your schemas (`*.xsd`) and bindings (`*.xjb`) into the `src/main/resources` folder. * Add the plugin to your `pom.xml`: ```xml ... ... org.jvnet.jaxb2.maven2 maven-jaxb2-plugin 0.14.0 generate ... ... ``` ### JAXB Versions If you need a specific JAXB version, you can explicitly use one of the following variants: * `org.jvnet.jaxb2.maven2:maven-jaxb20-plugin` - JAXB 2.0. * `org.jvnet.jaxb2.maven2:maven-jaxb21-plugin` - JAXB 2.1. * `org.jvnet.jaxb2.maven2:maven-jaxb22-plugin` - JAXB 2.2. * `org.jvnet.jaxb2.maven2:maven-jaxb23-plugin` - JAXB 2.3. * `org.jvnet.jaxb2.maven2:maven-jaxb2-plugin` - "most actual version", at the moment same as `org.jvnet.jaxb2.maven2:maven-jaxb23-plugin`. ### Java versions Supported Java versions are `1.7`, `1.8`, `9` (only `maven-jaxb2-plugin` and `maven-jaxb23-plugin`). Java version `1.6` is no longer supported (since version `0.14.0`). ## [Documentation](https://github.com/highsource/maven-jaxb2-plugin/wiki) ## Please refer to the [wiki](https://github.com/highsource/maven-jaxb2-plugin/wiki) for the full documentation. * [User Guide](https://github.com/highsource/maven-jaxb2-plugin/wiki/User-Guide) * Maven Documentation (Work in progress) * [Configuration Cheat Sheet](https://github.com/highsource/maven-jaxb2-plugin/wiki/Configuration-Cheat-Sheet) * [Common Pitfalls and Problems](https://github.com/highsource/maven-jaxb2-plugin/wiki/Common-Pitfalls-and-Problems) (Work in progress) * [Best Practices](https://github.com/highsource/maven-jaxb2-plugin/wiki/Best-Practices) (Work in progress) * [FAQ](https://github.com/highsource/maven-jaxb2-plugin/wiki/FAQ) * [Sample Projects](https://github.com/highsource/maven-jaxb2-plugin/wiki/Sample-Projects) * [Support](https://github.com/highsource/maven-jaxb2-plugin/wiki/Support) * [License](https://github.com/highsource/maven-jaxb2-plugin/blob/master/LICENSE) ## Disclaimer ## This project is not developed, supported or in any other way affiliated with Apache. The `org.jvnet.jaxb2.maven2:maven-jaxb2-plugin` is not an Apache product (and does not pretend to be one), it is a completely independent development. This project is also *not* developed by or affiliated with Oracle or Sun. Even if it is featured on [https://jaxb.java.net/](https://jaxb.java.net) pages, **This plugin is in no way _official_ JAXB2 Maven plugin by Sun or Oracle.** This is a completely indepentent development. [I](https://github.com/highsource) am *not* an Oracle employee.maven-jaxb2-plugin-0.15.1/build-1.7.bat000066400000000000000000000001241423155634000172760ustar00rootroot00000000000000setlocal set JAVA_HOME=%JAVA7_HOME% call mvn -X clean install >std 2>err endlocalmaven-jaxb2-plugin-0.15.1/build-1.8.bat000066400000000000000000000001241423155634000172770ustar00rootroot00000000000000setlocal set JAVA_HOME=%JAVA8_HOME% call mvn -X clean install >std 2>err endlocalmaven-jaxb2-plugin-0.15.1/build-10.bat000066400000000000000000000001221423155634000172070ustar00rootroot00000000000000setlocal set JAVA_HOME=%JAVA10_HOME% call mvn -X clean install >std 2>err endlocalmaven-jaxb2-plugin-0.15.1/dist/000077500000000000000000000000001423155634000161525ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/dist/.gitignore000066400000000000000000000000211423155634000201330ustar00rootroot00000000000000/target/ /files/ maven-jaxb2-plugin-0.15.1/dist/pom.xml000066400000000000000000000047621423155634000175000ustar00rootroot00000000000000 4.0.0 org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-dist pom Maven JAXB 2.x Plugin Dist org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-project 0.15.1-SNAPSHOT org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-sample-catalog zip maven-src ${project.version} org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-sample-dtd zip maven-src ${project.version} org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-sample-episode zip maven-src ${project.version} org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-sample-jaxbplugins zip maven-src ${project.version} org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-sample-po zip maven-src ${project.version} org.apache.maven.plugins maven-deploy-plugin true org.apache.maven.plugins maven-dependency-plugin package copy-dependencies files true true runtime maven-jaxb2-plugin-0.15.1/full-build-1.7.bat000066400000000000000000000002271423155634000202420ustar00rootroot00000000000000setlocal echo Setting JAVA_HOME to %JAVA7_HOME%. set JAVA_HOME=%JAVA7_HOME% call mvn clean install -Pall,sonatype-oss-release -DperformRelease endlocalmaven-jaxb2-plugin-0.15.1/full-build-1.8.bat000066400000000000000000000002271423155634000202430ustar00rootroot00000000000000setlocal echo Setting JAVA_HOME to %JAVA8_HOME%. set JAVA_HOME=%JAVA8_HOME% call mvn clean install -Pall,sonatype-oss-release -DperformRelease endlocalmaven-jaxb2-plugin-0.15.1/full-build-10.bat000066400000000000000000000002311423155634000201500ustar00rootroot00000000000000setlocal echo Setting JAVA_HOME to %JAVA10_HOME%. set JAVA_HOME=%JAVA10_HOME% call mvn clean install -Pall,sonatype-oss-release -DperformRelease endlocalmaven-jaxb2-plugin-0.15.1/full-build-9.bat000066400000000000000000000002271423155634000201050ustar00rootroot00000000000000setlocal echo Setting JAVA_HOME to %JAVA9_HOME%. set JAVA_HOME=%JAVA9_HOME% call mvn clean install -Pall,sonatype-oss-release -DperformRelease endlocalmaven-jaxb2-plugin-0.15.1/plugin-2.0/000077500000000000000000000000001423155634000170025ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-2.0/.gitignore000066400000000000000000000000101423155634000207610ustar00rootroot00000000000000/target/maven-jaxb2-plugin-0.15.1/plugin-2.0/pom.xml000066400000000000000000000037361423155634000203300ustar00rootroot00000000000000 4.0.0 maven-jaxb20-plugin maven-plugin Maven JAXB 2.0.x Plugin org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-project 0.15.1 ${maven.version} org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-core org.codehaus.plexus plexus-utils com.sun.xml.bind jaxb-impl ${jaxb20.version} com.sun.xml.bind jaxb-xjc ${jaxb20.version} com.sun.activation jakarta.activation compile org.apache.maven.plugin-tools maven-plugin-annotations org.apache.maven.plugin-testing maven-plugin-testing-harness test org.apache.maven.plugins maven-plugin-plugin maven-compiler-plugin 1.7 1.7 maven-jaxb2-plugin-0.15.1/plugin-2.0/src/000077500000000000000000000000001423155634000175715ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-2.0/src/main/000077500000000000000000000000001423155634000205155ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-2.0/src/main/java/000077500000000000000000000000001423155634000214365ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-2.0/src/main/java/org/000077500000000000000000000000001423155634000222255ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-2.0/src/main/java/org/jvnet/000077500000000000000000000000001423155634000233535ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-2.0/src/main/java/org/jvnet/mjiip/000077500000000000000000000000001423155634000244635ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-2.0/src/main/java/org/jvnet/mjiip/v_2_0/000077500000000000000000000000001423155634000253705ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-2.0/src/main/java/org/jvnet/mjiip/v_2_0/LoggingCodeWriter.java000066400000000000000000000025561423155634000316210ustar00rootroot00000000000000/** * */ package org.jvnet.mjiip.v_2_0; import java.io.File; import java.io.IOException; import java.io.OutputStream; import java.io.Writer; import org.apache.maven.plugin.logging.Log; import com.sun.codemodel.CodeWriter; import com.sun.codemodel.JPackage; import com.sun.codemodel.writer.FilterCodeWriter; public class LoggingCodeWriter extends FilterCodeWriter { private final boolean verbose; private final Log log; public LoggingCodeWriter(CodeWriter output, Log log, boolean verbose) { super(output); this.log = log; this.verbose = verbose; } public Writer openSource(JPackage pkg, String fileName) throws IOException { if (verbose) { if (pkg.isUnnamed()) log.info("XJC writing: " + fileName); else log.info("XJC writing: " + pkg.name().replace('.', File.separatorChar) + File.separatorChar + fileName); } return core.openSource(pkg, fileName); } public OutputStream openBinary(JPackage pkg, String fileName) throws IOException { if (verbose) { if (pkg.isUnnamed()) log.info("XJC writing: " + fileName); else log.info("XJC writing: " + pkg.name().replace('.', File.separatorChar) + File.separatorChar + fileName); } return core.openBinary(pkg, fileName); } @Override public void close() throws IOException { core.close(); } }maven-jaxb2-plugin-0.15.1/plugin-2.0/src/main/java/org/jvnet/mjiip/v_2_0/LoggingErrorReceiver.java000066400000000000000000000024311423155634000323200ustar00rootroot00000000000000/** * */ package org.jvnet.mjiip.v_2_0; import org.apache.maven.plugin.logging.Log; import org.xml.sax.SAXParseException; import com.sun.tools.xjc.ErrorReceiver; public class LoggingErrorReceiver extends ErrorReceiver { private final Log log; private final boolean verbose; private final String messagePrefix; public LoggingErrorReceiver(String messagePrefix, Log log, boolean verbose) { this.log = log; this.verbose = verbose; this.messagePrefix = messagePrefix; } public void warning(SAXParseException saxex) { log.warn(getMessage(saxex), saxex); } public void error(SAXParseException saxex) { log.error(getMessage(saxex), saxex); } public void fatalError(SAXParseException saxex) { log.error(getMessage(saxex), saxex); } public void info(SAXParseException saxex) { if (verbose) log.info(getMessage(saxex)); } private String getMessage(SAXParseException ex) { final int row = ex.getLineNumber(); final int col = ex.getColumnNumber(); final String sys = ex.getSystemId(); final String pub = ex.getPublicId(); return messagePrefix + "Location [" + (sys != null ? " " + sys : "") + (pub != null ? " " + pub : "") + (row > 0 ? "{" + row + (col > 0 ? "," + col : "") + "}" : "") + "]."; } }maven-jaxb2-plugin-0.15.1/plugin-2.0/src/main/java/org/jvnet/mjiip/v_2_0/OptionsFactory.java000066400000000000000000000071641423155634000312260ustar00rootroot00000000000000package org.jvnet.mjiip.v_2_0; import java.text.MessageFormat; import java.util.List; import org.apache.maven.plugin.MojoExecutionException; import org.jvnet.jaxb2.maven2.OptionsConfiguration; import org.jvnet.jaxb2.maven2.util.StringUtils; import org.xml.sax.InputSource; import com.sun.tools.xjc.BadCommandLineException; import com.sun.tools.xjc.Language; import com.sun.tools.xjc.Options; public class OptionsFactory implements org.jvnet.jaxb2.maven2.OptionsFactory { /** * Creates and initializes an instance of XJC options. * */ public Options createOptions(OptionsConfiguration optionsConfiguration) throws MojoExecutionException { final Options options = new Options(); options.verbose = optionsConfiguration.isVerbose(); options.debugMode = optionsConfiguration.isDebugMode(); options.classpaths.addAll(optionsConfiguration.getPlugins()); options.setSchemaLanguage(createLanguage(optionsConfiguration .getSchemaLanguage())); options.entityResolver = optionsConfiguration.getEntityResolver(); for (InputSource grammar : optionsConfiguration.getGrammars()) { options.addGrammar(grammar); } for (InputSource bindFile : optionsConfiguration.getBindFiles()) { options.addBindFile(bindFile); } // Setup Other Options options.defaultPackage = optionsConfiguration.getGeneratePackage(); options.targetDir = optionsConfiguration.getGenerateDirectory(); options.strictCheck = optionsConfiguration.isStrict(); options.readOnly = optionsConfiguration.isReadOnly(); options.packageLevelAnnotations = optionsConfiguration .isPackageLevelAnnotations(); options.noFileHeader = optionsConfiguration.isNoFileHeader(); // options.enableIntrospection = // optionsConfiguration.isEnableIntrospection(); // options.disableXmlSecurity = // optionsConfiguration.isDisableXmlSecurity(); if (optionsConfiguration.getAccessExternalSchema() != null) { System.setProperty("javax.xml.accessExternalSchema", optionsConfiguration.getAccessExternalSchema()); } if (optionsConfiguration.getAccessExternalDTD() != null) { System.setProperty("javax.xml.accessExternalDTD", optionsConfiguration.getAccessExternalDTD()); } if (optionsConfiguration.isEnableExternalEntityProcessing()) { System.setProperty("enableExternalEntityProcessing", Boolean.TRUE.toString()); } // options.contentForWildcard = // optionsConfiguration.isContentForWildcard() if (optionsConfiguration.isExtension()) { options.compatibilityMode = Options.EXTENSION; } final List arguments = optionsConfiguration.getArguments(); try { options.parseArguments(arguments.toArray(new String[arguments .size()])); } catch (BadCommandLineException bclex) { throw new MojoExecutionException("Error parsing the command line [" + arguments + "]", bclex); } return options; } private Language createLanguage(String schemaLanguage) throws MojoExecutionException { if (StringUtils.isEmpty(schemaLanguage)) { return null; } else if ("AUTODETECT".equalsIgnoreCase(schemaLanguage)) return null; // nothing, it is AUTDETECT by default. else if ("XMLSCHEMA".equalsIgnoreCase(schemaLanguage)) return Language.XMLSCHEMA; else if ("DTD".equalsIgnoreCase(schemaLanguage)) return Language.DTD; else if ("RELAXNG".equalsIgnoreCase(schemaLanguage)) return Language.RELAXNG; else if ("RELAXNG_COMPACT".equalsIgnoreCase(schemaLanguage)) return Language.RELAXNG_COMPACT; else if ("WSDL".equalsIgnoreCase(schemaLanguage)) return Language.WSDL; else { throw new MojoExecutionException(MessageFormat.format( "Unknown schemaLanguage [{0}].", schemaLanguage)); } } } maven-jaxb2-plugin-0.15.1/plugin-2.0/src/main/java/org/jvnet/mjiip/v_2_0/XJC20Mojo.java000066400000000000000000000122011423155634000276420ustar00rootroot00000000000000package org.jvnet.mjiip.v_2_0; import java.io.File; import java.io.IOException; import java.text.MessageFormat; import java.util.Collection; import java.util.Collections; import java.util.Iterator; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugins.annotations.LifecyclePhase; import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.ResolutionScope; import org.jvnet.jaxb2.maven2.RawXJC2Mojo; import com.sun.codemodel.CodeWriter; import com.sun.codemodel.JCodeModel; import com.sun.codemodel.JDefinedClass; import com.sun.codemodel.JPackage; import com.sun.tools.xjc.ModelLoader; import com.sun.tools.xjc.Options; import com.sun.tools.xjc.model.Model; import com.sun.tools.xjc.outline.Outline; /** * JAXB 2.x Mojo. * * @author Aleksei Valikov (valikov@gmx.net) */ @Mojo(name = "generate", defaultPhase = LifecyclePhase.GENERATE_SOURCES, requiresDependencyResolution = ResolutionScope.COMPILE, threadSafe = true) public class XJC20Mojo extends RawXJC2Mojo { private final org.jvnet.jaxb2.maven2.OptionsFactory optionsFactory = new OptionsFactory(); @Override protected org.jvnet.jaxb2.maven2.OptionsFactory getOptionsFactory() { return optionsFactory; } @Override public void doExecute(Options options) throws MojoExecutionException { final Model model = loadModel(options); final Outline outline = generateCode(model); writeCode(outline); } protected Model loadModel(Options options) throws MojoExecutionException { if (getVerbose()) { getLog().info("Parsing input schema(s)..."); } final Model model = ModelLoader.load(options, new JCodeModel(), new LoggingErrorReceiver("Error while parsing schema(s).", getLog(), getVerbose())); if (model == null) throw new MojoExecutionException( "Unable to parse input schema(s). Error messages should have been provided."); return model; } protected Outline generateCode(final Model model) throws MojoExecutionException { if (getVerbose()) { getLog().info("Compiling input schema(s)..."); } final Outline outline = model.generateCode(model.options, new LoggingErrorReceiver("Error while generating code.", getLog(), getVerbose())); if (outline == null) { throw new MojoExecutionException( "Failed to compile input schema(s)! Error messages should have been provided."); } else { return outline; } } protected void writeCode(Outline outline) throws MojoExecutionException { if (getWriteCode()) { final Model model = outline.getModel(); final JCodeModel codeModel = model.codeModel; final File targetDirectory = model.options.targetDir; if (getVerbose()) { getLog().info( MessageFormat.format("Writing output to [{0}].", targetDirectory.getAbsolutePath())); } try { if (getCleanPackageDirectories()) { if (getVerbose()) { getLog().info("Cleaning package directories."); } cleanPackageDirectories(targetDirectory, codeModel); } final CodeWriter codeWriter = new LoggingCodeWriter( model.options.createCodeWriter(), getLog(), getVerbose()); codeModel.build(codeWriter); } catch (IOException e) { throw new MojoExecutionException("Unable to write files: " + e.getMessage(), e); } } else { getLog().info( "The [writeCode] setting is set to false, the code will not be written."); } } private void cleanPackageDirectories(File targetDirectory, JCodeModel codeModel) { for (Iterator packages = codeModel.packages(); packages .hasNext();) { final JPackage _package = packages.next(); final File packageDirectory; if (_package.isUnnamed()) { packageDirectory = targetDirectory; } else { packageDirectory = new File(targetDirectory, _package.name() .replace('.', File.separatorChar)); } if (packageDirectory.isDirectory()) { if (isRelevantPackage(_package)) { if (getVerbose()) { getLog().info( MessageFormat .format("Cleaning directory [{0}] of the package [{1}].", packageDirectory .getAbsolutePath(), _package.name())); } cleanPackageDirectory(packageDirectory); } else { if (getVerbose()) { getLog().info( MessageFormat .format("Skipping directory [{0}] of the package [{1}] as it does not contain generated classes or resources.", packageDirectory .getAbsolutePath(), _package.name())); } } } } } private boolean isRelevantPackage(JPackage _package) { if (_package.propertyFiles().hasNext()) { return true; } Iterator classes = _package.classes(); for (; classes.hasNext();) { JDefinedClass _class = (JDefinedClass) classes.next(); if (!_class.isHidden()) { return true; } } return false; } @Override public Collection getEpisodeFiles() { return Collections.emptyList(); } @Override public boolean getEpisode() { return false; } } maven-jaxb2-plugin-0.15.1/plugin-2.0/src/main/resources/000077500000000000000000000000001423155634000225275ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-2.0/src/main/resources/META-INF/000077500000000000000000000000001423155634000236675ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-2.0/src/main/resources/META-INF/m2e/000077500000000000000000000000001423155634000243525ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-2.0/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml000066400000000000000000000006621423155634000322460ustar00rootroot00000000000000 generate true true maven-jaxb2-plugin-0.15.1/plugin-2.0/src/site/000077500000000000000000000000001423155634000205355ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-2.0/src/site/site.xml000066400000000000000000000001451423155634000222230ustar00rootroot00000000000000 ${reports} maven-jaxb2-plugin-0.15.1/plugin-2.1/000077500000000000000000000000001423155634000170035ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-2.1/.gitignore000066400000000000000000000000111423155634000207630ustar00rootroot00000000000000/target/ maven-jaxb2-plugin-0.15.1/plugin-2.1/pom.xml000066400000000000000000000044131423155634000203220ustar00rootroot00000000000000 4.0.0 maven-jaxb21-plugin maven-plugin Maven JAXB 2.1.x Plugin org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-project 0.15.1 ${maven.version} org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-core org.codehaus.plexus plexus-utils com.sun.xml.bind jaxb-impl ${jaxb21.version} com.sun.xml.bind jaxb-core com.sun.xml.bind jaxb-xjc ${jaxb21.version} com.sun.xml.bind jaxb-core com.sun.activation jakarta.activation compile org.apache.maven.plugin-tools maven-plugin-annotations org.apache.maven.plugin-testing maven-plugin-testing-harness test org.apache.maven.plugins maven-plugin-plugin maven-compiler-plugin 1.7 1.7 maven-jaxb2-plugin-0.15.1/plugin-2.1/src/000077500000000000000000000000001423155634000175725ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-2.1/src/main/000077500000000000000000000000001423155634000205165ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-2.1/src/main/java/000077500000000000000000000000001423155634000214375ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-2.1/src/main/java/org/000077500000000000000000000000001423155634000222265ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-2.1/src/main/java/org/jvnet/000077500000000000000000000000001423155634000233545ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-2.1/src/main/java/org/jvnet/mjiip/000077500000000000000000000000001423155634000244645ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-2.1/src/main/java/org/jvnet/mjiip/v_2_1/000077500000000000000000000000001423155634000253725ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-2.1/src/main/java/org/jvnet/mjiip/v_2_1/LoggingCodeWriter.java000066400000000000000000000025561423155634000316230ustar00rootroot00000000000000/** * */ package org.jvnet.mjiip.v_2_1; import java.io.File; import java.io.IOException; import java.io.OutputStream; import java.io.Writer; import org.apache.maven.plugin.logging.Log; import com.sun.codemodel.CodeWriter; import com.sun.codemodel.JPackage; import com.sun.codemodel.writer.FilterCodeWriter; public class LoggingCodeWriter extends FilterCodeWriter { private final boolean verbose; private final Log log; public LoggingCodeWriter(CodeWriter output, Log log, boolean verbose) { super(output); this.log = log; this.verbose = verbose; } public Writer openSource(JPackage pkg, String fileName) throws IOException { if (verbose) { if (pkg.isUnnamed()) log.info("XJC writing: " + fileName); else log.info("XJC writing: " + pkg.name().replace('.', File.separatorChar) + File.separatorChar + fileName); } return core.openSource(pkg, fileName); } public OutputStream openBinary(JPackage pkg, String fileName) throws IOException { if (verbose) { if (pkg.isUnnamed()) log.info("XJC writing: " + fileName); else log.info("XJC writing: " + pkg.name().replace('.', File.separatorChar) + File.separatorChar + fileName); } return core.openBinary(pkg, fileName); } @Override public void close() throws IOException { core.close(); } }maven-jaxb2-plugin-0.15.1/plugin-2.1/src/main/java/org/jvnet/mjiip/v_2_1/LoggingErrorReceiver.java000066400000000000000000000024311423155634000323220ustar00rootroot00000000000000/** * */ package org.jvnet.mjiip.v_2_1; import org.apache.maven.plugin.logging.Log; import org.xml.sax.SAXParseException; import com.sun.tools.xjc.ErrorReceiver; public class LoggingErrorReceiver extends ErrorReceiver { private final Log log; private final boolean verbose; private final String messagePrefix; public LoggingErrorReceiver(String messagePrefix, Log log, boolean verbose) { this.log = log; this.verbose = verbose; this.messagePrefix = messagePrefix; } public void warning(SAXParseException saxex) { log.warn(getMessage(saxex), saxex); } public void error(SAXParseException saxex) { log.error(getMessage(saxex), saxex); } public void fatalError(SAXParseException saxex) { log.error(getMessage(saxex), saxex); } public void info(SAXParseException saxex) { if (verbose) log.info(getMessage(saxex)); } private String getMessage(SAXParseException ex) { final int row = ex.getLineNumber(); final int col = ex.getColumnNumber(); final String sys = ex.getSystemId(); final String pub = ex.getPublicId(); return messagePrefix + "Location [" + (sys != null ? " " + sys : "") + (pub != null ? " " + pub : "") + (row > 0 ? "{" + row + (col > 0 ? "," + col : "") + "}" : "") + "]."; } }maven-jaxb2-plugin-0.15.1/plugin-2.1/src/main/java/org/jvnet/mjiip/v_2_1/OptionsFactory.java000066400000000000000000000072771423155634000312350ustar00rootroot00000000000000package org.jvnet.mjiip.v_2_1; import java.text.MessageFormat; import java.util.List; import org.apache.maven.plugin.MojoExecutionException; import org.jvnet.jaxb2.maven2.OptionsConfiguration; import org.jvnet.jaxb2.maven2.util.StringUtils; import org.xml.sax.InputSource; import com.sun.tools.xjc.BadCommandLineException; import com.sun.tools.xjc.Language; import com.sun.tools.xjc.Options; import com.sun.tools.xjc.api.SpecVersion; public class OptionsFactory implements org.jvnet.jaxb2.maven2.OptionsFactory { /** * Creates and initializes an instance of XJC options. * */ public Options createOptions(OptionsConfiguration optionsConfiguration) throws MojoExecutionException { final Options options = new Options(); options.verbose = optionsConfiguration.isVerbose(); options.debugMode = optionsConfiguration.isDebugMode(); options.classpaths.addAll(optionsConfiguration.getPlugins()); options.target = SpecVersion.V2_1; options.setSchemaLanguage(createLanguage(optionsConfiguration .getSchemaLanguage())); options.entityResolver = optionsConfiguration.getEntityResolver(); for (InputSource grammar : optionsConfiguration.getGrammars()) { options.addGrammar(grammar); } for (InputSource bindFile : optionsConfiguration.getBindFiles()) { options.addBindFile(bindFile); } // Setup Other Options options.defaultPackage = optionsConfiguration.getGeneratePackage(); options.targetDir = optionsConfiguration.getGenerateDirectory(); options.strictCheck = optionsConfiguration.isStrict(); options.readOnly = optionsConfiguration.isReadOnly(); options.packageLevelAnnotations = optionsConfiguration .isPackageLevelAnnotations(); options.noFileHeader = optionsConfiguration.isNoFileHeader(); options.enableIntrospection = optionsConfiguration .isEnableIntrospection(); // options.disableXmlSecurity = // optionsConfiguration.isDisableXmlSecurity(); if (optionsConfiguration.getAccessExternalSchema() != null) { System.setProperty("javax.xml.accessExternalSchema", optionsConfiguration.getAccessExternalSchema()); } if (optionsConfiguration.getAccessExternalDTD() != null) { System.setProperty("javax.xml.accessExternalDTD", optionsConfiguration.getAccessExternalDTD()); } if (optionsConfiguration.isEnableExternalEntityProcessing()) { System.setProperty("enableExternalEntityProcessing", Boolean.TRUE.toString()); } options.contentForWildcard = optionsConfiguration .isContentForWildcard(); if (optionsConfiguration.isExtension()) { options.compatibilityMode = Options.EXTENSION; } final List arguments = optionsConfiguration.getArguments(); try { options.parseArguments(arguments.toArray(new String[arguments .size()])); } catch (BadCommandLineException bclex) { throw new MojoExecutionException("Error parsing the command line [" + arguments + "]", bclex); } return options; } private Language createLanguage(String schemaLanguage) throws MojoExecutionException { if (StringUtils.isEmpty(schemaLanguage)) { return null; } else if ("AUTODETECT".equalsIgnoreCase(schemaLanguage)) return null; // nothing, it is AUTDETECT by default. else if ("XMLSCHEMA".equalsIgnoreCase(schemaLanguage)) return Language.XMLSCHEMA; else if ("DTD".equalsIgnoreCase(schemaLanguage)) return Language.DTD; else if ("RELAXNG".equalsIgnoreCase(schemaLanguage)) return Language.RELAXNG; else if ("RELAXNG_COMPACT".equalsIgnoreCase(schemaLanguage)) return Language.RELAXNG_COMPACT; else if ("WSDL".equalsIgnoreCase(schemaLanguage)) return Language.WSDL; else { throw new MojoExecutionException(MessageFormat.format( "Unknown schemaLanguage [{0}].", schemaLanguage)); } } } maven-jaxb2-plugin-0.15.1/plugin-2.1/src/main/java/org/jvnet/mjiip/v_2_1/XJC21Mojo.java000066400000000000000000000116421423155634000276550ustar00rootroot00000000000000package org.jvnet.mjiip.v_2_1; import java.io.File; import java.io.IOException; import java.text.MessageFormat; import java.util.Iterator; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugins.annotations.LifecyclePhase; import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.ResolutionScope; import org.jvnet.jaxb2.maven2.RawXJC2Mojo; import com.sun.codemodel.CodeWriter; import com.sun.codemodel.JCodeModel; import com.sun.codemodel.JDefinedClass; import com.sun.codemodel.JPackage; import com.sun.tools.xjc.ModelLoader; import com.sun.tools.xjc.Options; import com.sun.tools.xjc.model.Model; import com.sun.tools.xjc.outline.Outline; /** * JAXB 2.x Mojo. * * @author Aleksei Valikov (valikov@gmx.net) */ @Mojo(name = "generate", defaultPhase = LifecyclePhase.GENERATE_SOURCES, requiresDependencyResolution = ResolutionScope.COMPILE, threadSafe = true) public class XJC21Mojo extends RawXJC2Mojo { private final org.jvnet.jaxb2.maven2.OptionsFactory optionsFactory = new OptionsFactory(); @Override protected org.jvnet.jaxb2.maven2.OptionsFactory getOptionsFactory() { return optionsFactory; } @Override public void doExecute(Options options) throws MojoExecutionException { final Model model = loadModel(options); final Outline outline = generateCode(model); writeCode(outline); } protected Model loadModel(Options options) throws MojoExecutionException { if (getVerbose()) { getLog().info("Parsing input schema(s)..."); } final Model model = ModelLoader.load(options, new JCodeModel(), new LoggingErrorReceiver("Error while parsing schema(s).", getLog(), getVerbose())); if (model == null) throw new MojoExecutionException( "Unable to parse input schema(s). Error messages should have been provided."); return model; } protected Outline generateCode(final Model model) throws MojoExecutionException { if (getVerbose()) { getLog().info("Compiling input schema(s)..."); } final Outline outline = model.generateCode(model.options, new LoggingErrorReceiver("Error while generating code.", getLog(), getVerbose())); if (outline == null) { throw new MojoExecutionException( "Failed to compile input schema(s)! Error messages should have been provided."); } else { return outline; } } protected void writeCode(Outline outline) throws MojoExecutionException { if (getWriteCode()) { final Model model = outline.getModel(); final JCodeModel codeModel = model.codeModel; final File targetDirectory = model.options.targetDir; if (getVerbose()) { getLog().info( MessageFormat.format("Writing output to [{0}].", targetDirectory.getAbsolutePath())); } try { if (getCleanPackageDirectories()) { if (getVerbose()) { getLog().info("Cleaning package directories."); } cleanPackageDirectories(targetDirectory, codeModel); } final CodeWriter codeWriter = new LoggingCodeWriter( model.options.createCodeWriter(), getLog(), getVerbose()); codeModel.build(codeWriter); } catch (IOException e) { throw new MojoExecutionException("Unable to write files: " + e.getMessage(), e); } } else { getLog().info( "The [writeCode] setting is set to false, the code will not be written."); } } protected final void cleanPackageDirectories(File targetDirectory, JCodeModel codeModel) { for (Iterator packages = codeModel.packages(); packages .hasNext();) { final JPackage _package = packages.next(); final File packageDirectory; if (_package.isUnnamed()) { packageDirectory = targetDirectory; } else { packageDirectory = new File(targetDirectory, _package.name() .replace('.', File.separatorChar)); } if (packageDirectory.isDirectory()) { if (isRelevantPackage(_package)) { if (getVerbose()) { getLog().info( MessageFormat .format("Cleaning directory [{0}] of the package [{1}].", packageDirectory .getAbsolutePath(), _package.name())); } cleanPackageDirectory(packageDirectory); } else { if (getVerbose()) { getLog().info( MessageFormat .format("Skipping directory [{0}] of the package [{1}] as it does not contain generated classes or resources.", packageDirectory .getAbsolutePath(), _package.name())); } } } } } private boolean isRelevantPackage(JPackage _package) { if (_package.propertyFiles().hasNext()) { return true; } Iterator classes = _package.classes(); for (; classes.hasNext();) { JDefinedClass _class = (JDefinedClass) classes.next(); if (!_class.isHidden()) { return true; } } return false; } } maven-jaxb2-plugin-0.15.1/plugin-2.1/src/main/resources/000077500000000000000000000000001423155634000225305ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-2.1/src/main/resources/META-INF/000077500000000000000000000000001423155634000236705ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-2.1/src/main/resources/META-INF/m2e/000077500000000000000000000000001423155634000243535ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-2.1/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml000066400000000000000000000006621423155634000322470ustar00rootroot00000000000000 generate true true maven-jaxb2-plugin-0.15.1/plugin-2.1/src/site/000077500000000000000000000000001423155634000205365ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-2.1/src/site/site.xml000066400000000000000000000001451423155634000222240ustar00rootroot00000000000000 ${reports} maven-jaxb2-plugin-0.15.1/plugin-2.1/src/test/000077500000000000000000000000001423155634000205515ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-2.1/src/test/java/000077500000000000000000000000001423155634000214725ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-2.1/src/test/java/org/000077500000000000000000000000001423155634000222615ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-2.1/src/test/java/org/jvnet/000077500000000000000000000000001423155634000234075ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-2.1/src/test/java/org/jvnet/mjiip/000077500000000000000000000000001423155634000245175ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-2.1/src/test/java/org/jvnet/mjiip/v_2_1/000077500000000000000000000000001423155634000254255ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-2.1/src/test/java/org/jvnet/mjiip/v_2_1/JAXBGenerateTest.java000066400000000000000000000060221423155634000313270ustar00rootroot00000000000000/* * Copyright [2006] java.net * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.jvnet.mjiip.v_2_1; import java.io.File; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.repository.DefaultArtifactRepository; import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.testing.AbstractMojoTestCase; import org.apache.maven.project.MavenProject; import org.apache.maven.project.MavenProjectBuilder; public abstract class JAXBGenerateTest extends AbstractMojoTestCase { static { System.setProperty("basedir", getBaseDir().getAbsolutePath()); } protected MavenProjectBuilder mavenProjectBuilder; protected void setUp() throws Exception { super.setUp(); mavenProjectBuilder = (MavenProjectBuilder) getContainer().lookup( MavenProjectBuilder.ROLE); } protected static File getBaseDir() { try { return (new File(JAXBGenerateTest.class.getProtectionDomain() .getCodeSource().getLocation().getFile())).getParentFile() .getParentFile().getAbsoluteFile(); } catch (Exception ex) { throw new AssertionError(ex); } } /** * Validate the generation of a java files from purchaseorder.xsd. * * @throws MojoExecutionException */ public void testExecute() throws Exception { final File pom = new File(getBaseDir(), "src/test/resources/test-pom.xml"); final ArtifactRepository localRepository = new DefaultArtifactRepository( "local", new File(getBaseDir(), "target/test-repository").toURI().toURL().toString() , new DefaultRepositoryLayout()); final MavenProject mavenProject = mavenProjectBuilder.build(pom, localRepository, null); final XJC21Mojo generator = (XJC21Mojo) lookupMojo("generate", pom); generator.setProject(mavenProject); generator.setLocalRepository(localRepository); generator.setSchemaDirectory(new File(getBaseDir(),"src/test/resources/")); generator.setSchemaIncludes(new String[] { "*.xsd" }); generator.setBindingIncludes(new String[] { "*.xjb" }); generator.setGenerateDirectory(new File(getBaseDir(), "target/test/generated-sources")); generator.setVerbose(true); generator.setGeneratePackage("unittest"); generator.setRemoveOldOutput(false); generator.execute(); } public static void main(String[] args) throws Exception { // new JAXBGenerateTest().testExecute(); } } maven-jaxb2-plugin-0.15.1/plugin-2.1/src/test/java/org/jvnet/mjiip/v_2_1/JAXBGenerateTestSuite.java000066400000000000000000000023731423155634000323460ustar00rootroot00000000000000/* * Copyright [2006] java.net * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.jvnet.mjiip.v_2_1; import junit.framework.Test; import junit.framework.TestSuite; /** * Created by IntelliJ IDEA. User: Owner Date: Feb 8, 2006 Time: 12:20:24 AM To * change this template use File | Settings | File Templates. */ public class JAXBGenerateTestSuite { public static Test suite() { TestSuite suite = new TestSuite(); // Test all methods // suite.addTestSuite(JAXBGenerateTest.class); return suite; } /** Runs the test suite using the textual runner. */ public static void main(String[] args) { junit.textui.TestRunner.run(suite()); } } maven-jaxb2-plugin-0.15.1/plugin-2.2/000077500000000000000000000000001423155634000170045ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-2.2/.gitignore000066400000000000000000000000111423155634000207640ustar00rootroot00000000000000/target/ maven-jaxb2-plugin-0.15.1/plugin-2.2/pom.xml000066400000000000000000000067071423155634000203330ustar00rootroot00000000000000 4.0.0 maven-jaxb22-plugin maven-plugin Maven JAXB 2.2.x Plugin org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-project 0.15.1 ${maven.version} org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-core org.codehaus.plexus plexus-utils org.glassfish.jaxb jaxb-runtime ${jaxb22.version} org.glassfish.jaxb jaxb-core ${jaxb22.version} javax.xml.bind jaxb-api ${jaxb22.version} org.glassfish.jaxb txw2 ${jaxb22.version} com.sun.istack istack-commons-runtime org.jvnet.staxex stax-ex com.sun.xml.fastinfoset FastInfoset com.sun.activation jakarta.activation compile org.glassfish.jaxb jaxb-xjc ${jaxb22.version} com.sun.xsom xsom org.glassfish.jaxb codemodel com.sun.xml.bind.external rngom com.sun.xml.dtd-parser dtd-parser com.sun.istack istack-commons-tools org.apache.maven.plugin-tools maven-plugin-annotations org.apache.maven.plugin-testing maven-plugin-testing-harness test org.apache.maven.plugins maven-plugin-plugin maven-compiler-plugin 1.7 1.7 maven-jaxb2-plugin-0.15.1/plugin-2.2/src/000077500000000000000000000000001423155634000175735ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-2.2/src/main/000077500000000000000000000000001423155634000205175ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-2.2/src/main/java/000077500000000000000000000000001423155634000214405ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-2.2/src/main/java/org/000077500000000000000000000000001423155634000222275ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-2.2/src/main/java/org/jvnet/000077500000000000000000000000001423155634000233555ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-2.2/src/main/java/org/jvnet/mjiip/000077500000000000000000000000001423155634000244655ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-2.2/src/main/java/org/jvnet/mjiip/v_2_2/000077500000000000000000000000001423155634000253745ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-2.2/src/main/java/org/jvnet/mjiip/v_2_2/LoggingCodeWriter.java000066400000000000000000000025561423155634000316250ustar00rootroot00000000000000/** * */ package org.jvnet.mjiip.v_2_2; import java.io.File; import java.io.IOException; import java.io.OutputStream; import java.io.Writer; import org.apache.maven.plugin.logging.Log; import com.sun.codemodel.CodeWriter; import com.sun.codemodel.JPackage; import com.sun.codemodel.writer.FilterCodeWriter; public class LoggingCodeWriter extends FilterCodeWriter { private final boolean verbose; private final Log log; public LoggingCodeWriter(CodeWriter output, Log log, boolean verbose) { super(output); this.log = log; this.verbose = verbose; } public Writer openSource(JPackage pkg, String fileName) throws IOException { if (verbose) { if (pkg.isUnnamed()) log.info("XJC writing: " + fileName); else log.info("XJC writing: " + pkg.name().replace('.', File.separatorChar) + File.separatorChar + fileName); } return core.openSource(pkg, fileName); } public OutputStream openBinary(JPackage pkg, String fileName) throws IOException { if (verbose) { if (pkg.isUnnamed()) log.info("XJC writing: " + fileName); else log.info("XJC writing: " + pkg.name().replace('.', File.separatorChar) + File.separatorChar + fileName); } return core.openBinary(pkg, fileName); } @Override public void close() throws IOException { core.close(); } }maven-jaxb2-plugin-0.15.1/plugin-2.2/src/main/java/org/jvnet/mjiip/v_2_2/LoggingErrorReceiver.java000066400000000000000000000024311423155634000323240ustar00rootroot00000000000000/** * */ package org.jvnet.mjiip.v_2_2; import org.apache.maven.plugin.logging.Log; import org.xml.sax.SAXParseException; import com.sun.tools.xjc.ErrorReceiver; public class LoggingErrorReceiver extends ErrorReceiver { private final Log log; private final boolean verbose; private final String messagePrefix; public LoggingErrorReceiver(String messagePrefix, Log log, boolean verbose) { this.log = log; this.verbose = verbose; this.messagePrefix = messagePrefix; } public void warning(SAXParseException saxex) { log.warn(getMessage(saxex), saxex); } public void error(SAXParseException saxex) { log.error(getMessage(saxex), saxex); } public void fatalError(SAXParseException saxex) { log.error(getMessage(saxex), saxex); } public void info(SAXParseException saxex) { if (verbose) log.info(getMessage(saxex)); } private String getMessage(SAXParseException ex) { final int row = ex.getLineNumber(); final int col = ex.getColumnNumber(); final String sys = ex.getSystemId(); final String pub = ex.getPublicId(); return messagePrefix + "Location [" + (sys != null ? " " + sys : "") + (pub != null ? " " + pub : "") + (row > 0 ? "{" + row + (col > 0 ? "," + col : "") + "}" : "") + "]."; } }maven-jaxb2-plugin-0.15.1/plugin-2.2/src/main/java/org/jvnet/mjiip/v_2_2/OptionsFactory.java000066400000000000000000000102571423155634000312270ustar00rootroot00000000000000package org.jvnet.mjiip.v_2_2; import java.nio.charset.Charset; import java.nio.charset.IllegalCharsetNameException; import java.text.MessageFormat; import java.util.List; import org.apache.maven.plugin.MojoExecutionException; import org.jvnet.jaxb2.maven2.OptionsConfiguration; import org.jvnet.jaxb2.maven2.util.StringUtils; import org.xml.sax.InputSource; import com.sun.tools.xjc.BadCommandLineException; import com.sun.tools.xjc.Language; import com.sun.tools.xjc.Options; import com.sun.tools.xjc.api.SpecVersion; public class OptionsFactory implements org.jvnet.jaxb2.maven2.OptionsFactory { /** * Creates and initializes an instance of XJC options. * */ public Options createOptions(OptionsConfiguration optionsConfiguration) throws MojoExecutionException { final Options options = new Options(); options.verbose = optionsConfiguration.isVerbose(); options.debugMode = optionsConfiguration.isDebugMode(); options.classpaths.addAll(optionsConfiguration.getPlugins()); options.target = SpecVersion.V2_2; final String encoding = optionsConfiguration.getEncoding(); if (encoding != null) { options.encoding = createEncoding(encoding); } options.setSchemaLanguage(createLanguage(optionsConfiguration .getSchemaLanguage())); options.entityResolver = optionsConfiguration.getEntityResolver(); for (InputSource grammar : optionsConfiguration.getGrammars()) { options.addGrammar(grammar); } for (InputSource bindFile : optionsConfiguration.getBindFiles()) { options.addBindFile(bindFile); } // Setup Other Options options.defaultPackage = optionsConfiguration.getGeneratePackage(); options.targetDir = optionsConfiguration.getGenerateDirectory(); options.strictCheck = optionsConfiguration.isStrict(); options.readOnly = optionsConfiguration.isReadOnly(); options.packageLevelAnnotations = optionsConfiguration .isPackageLevelAnnotations(); options.noFileHeader = optionsConfiguration.isNoFileHeader(); options.enableIntrospection = optionsConfiguration .isEnableIntrospection(); options.disableXmlSecurity = optionsConfiguration .isDisableXmlSecurity(); if (optionsConfiguration.getAccessExternalSchema() != null) { System.setProperty("javax.xml.accessExternalSchema", optionsConfiguration.getAccessExternalSchema()); } if (optionsConfiguration.getAccessExternalDTD() != null) { System.setProperty("javax.xml.accessExternalDTD", optionsConfiguration.getAccessExternalDTD()); } if (optionsConfiguration.isEnableExternalEntityProcessing()) { System.setProperty("enableExternalEntityProcessing", Boolean.TRUE.toString()); } options.contentForWildcard = optionsConfiguration .isContentForWildcard(); if (optionsConfiguration.isExtension()) { options.compatibilityMode = Options.EXTENSION; } final List arguments = optionsConfiguration.getArguments(); try { options.parseArguments(arguments.toArray(new String[arguments .size()])); } catch (BadCommandLineException bclex) { throw new MojoExecutionException("Error parsing the command line [" + arguments + "]", bclex); } return options; } private String createEncoding(String encoding) throws MojoExecutionException { if (encoding == null) { return null; } try { if (!Charset.isSupported(encoding)) { throw new MojoExecutionException(MessageFormat.format( "Unsupported encoding [{0}].", encoding)); } return encoding; } catch (IllegalCharsetNameException icne) { throw new MojoExecutionException(MessageFormat.format( "Unsupported encoding [{0}].", encoding)); } } private Language createLanguage(String schemaLanguage) throws MojoExecutionException { if (StringUtils.isEmpty(schemaLanguage)) { return null; } else if ("AUTODETECT".equalsIgnoreCase(schemaLanguage)) return null; // nothing, it is AUTDETECT by default. else if ("XMLSCHEMA".equalsIgnoreCase(schemaLanguage)) return Language.XMLSCHEMA; else if ("DTD".equalsIgnoreCase(schemaLanguage)) return Language.DTD; else if ("WSDL".equalsIgnoreCase(schemaLanguage)) return Language.WSDL; else { throw new MojoExecutionException("Unknown schemaLanguage [" + schemaLanguage + "]."); } } } maven-jaxb2-plugin-0.15.1/plugin-2.2/src/main/java/org/jvnet/mjiip/v_2_2/XJC22Mojo.java000066400000000000000000000116331423155634000276600ustar00rootroot00000000000000package org.jvnet.mjiip.v_2_2; import java.io.File; import java.io.IOException; import java.text.MessageFormat; import java.util.Iterator; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugins.annotations.LifecyclePhase; import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.ResolutionScope; import org.jvnet.jaxb2.maven2.RawXJC2Mojo; import com.sun.codemodel.CodeWriter; import com.sun.codemodel.JCodeModel; import com.sun.codemodel.JDefinedClass; import com.sun.codemodel.JPackage; import com.sun.tools.xjc.ModelLoader; import com.sun.tools.xjc.Options; import com.sun.tools.xjc.model.Model; import com.sun.tools.xjc.outline.Outline; /** * JAXB 2.x Mojo. * * @author Aleksei Valikov (valikov@gmx.net) */ @Mojo(name = "generate", defaultPhase = LifecyclePhase.GENERATE_SOURCES, requiresDependencyResolution = ResolutionScope.COMPILE, threadSafe = true) public class XJC22Mojo extends RawXJC2Mojo { private final org.jvnet.jaxb2.maven2.OptionsFactory optionsFactory = new OptionsFactory(); @Override protected org.jvnet.jaxb2.maven2.OptionsFactory getOptionsFactory() { return optionsFactory; } @Override public void doExecute(Options options) throws MojoExecutionException { final Model model = loadModel(options); final Outline outline = generateCode(model); writeCode(outline); } protected Model loadModel(Options options) throws MojoExecutionException { if (getVerbose()) { getLog().info("Parsing input schema(s)..."); } final Model model = ModelLoader.load(options, new JCodeModel(), new LoggingErrorReceiver("Error while parsing schema(s).", getLog(), getVerbose())); if (model == null) throw new MojoExecutionException( "Unable to parse input schema(s). Error messages should have been provided."); return model; } protected Outline generateCode(final Model model) throws MojoExecutionException { if (getVerbose()) { getLog().info("Compiling input schema(s)..."); } final Outline outline = model.generateCode(model.options, new LoggingErrorReceiver("Error while generating code.", getLog(), getVerbose())); if (outline == null) { throw new MojoExecutionException( "Failed to compile input schema(s)! Error messages should have been provided."); } else { return outline; } } protected void writeCode(Outline outline) throws MojoExecutionException { if (getWriteCode()) { final Model model = outline.getModel(); final JCodeModel codeModel = model.codeModel; final File targetDirectory = model.options.targetDir; if (getVerbose()) { getLog().info( MessageFormat.format("Writing output to [{0}].", targetDirectory.getAbsolutePath())); } try { if (getCleanPackageDirectories()) { if (getVerbose()) { getLog().info("Cleaning package directories."); } cleanPackageDirectories(targetDirectory, codeModel); } final CodeWriter codeWriter = new LoggingCodeWriter( model.options.createCodeWriter(), getLog(), getVerbose()); codeModel.build(codeWriter); } catch (IOException e) { throw new MojoExecutionException("Unable to write files: " + e.getMessage(), e); } } else { getLog().info( "The [writeCode] setting is set to false, the code will not be written."); } } private void cleanPackageDirectories(File targetDirectory, JCodeModel codeModel) { for (Iterator packages = codeModel.packages(); packages .hasNext();) { final JPackage _package = packages.next(); final File packageDirectory; if (_package.isUnnamed()) { packageDirectory = targetDirectory; } else { packageDirectory = new File(targetDirectory, _package.name() .replace('.', File.separatorChar)); } if (packageDirectory.isDirectory()) { if (isRelevantPackage(_package)) { if (getVerbose()) { getLog().info( MessageFormat .format("Cleaning directory [{0}] of the package [{1}].", packageDirectory .getAbsolutePath(), _package.name())); } cleanPackageDirectory(packageDirectory); } else { if (getVerbose()) { getLog().info( MessageFormat .format("Skipping directory [{0}] of the package [{1}] as it does not contain generated classes or resources.", packageDirectory .getAbsolutePath(), _package.name())); } } } } } private boolean isRelevantPackage(JPackage _package) { if (_package.propertyFiles().hasNext()) { return true; } Iterator classes = _package.classes(); for (; classes.hasNext();) { JDefinedClass _class = (JDefinedClass) classes.next(); if (!_class.isHidden()) { return true; } } return false; } } maven-jaxb2-plugin-0.15.1/plugin-2.2/src/main/resources/000077500000000000000000000000001423155634000225315ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-2.2/src/main/resources/META-INF/000077500000000000000000000000001423155634000236715ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-2.2/src/main/resources/META-INF/m2e/000077500000000000000000000000001423155634000243545ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-2.2/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml000066400000000000000000000006621423155634000322500ustar00rootroot00000000000000 generate true true maven-jaxb2-plugin-0.15.1/plugin-2.2/src/site/000077500000000000000000000000001423155634000205375ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-2.2/src/site/site.xml000066400000000000000000000001451423155634000222250ustar00rootroot00000000000000 ${reports} maven-jaxb2-plugin-0.15.1/plugin-2.3/000077500000000000000000000000001423155634000170055ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-2.3/.gitignore000066400000000000000000000000111423155634000207650ustar00rootroot00000000000000/target/ maven-jaxb2-plugin-0.15.1/plugin-2.3/pom.xml000066400000000000000000000062011423155634000203210ustar00rootroot00000000000000 4.0.0 maven-jaxb23-plugin maven-plugin Maven JAXB 2.3.x Plugin org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-project 0.15.1 ${maven.version} org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-core org.codehaus.plexus plexus-utils javax.xml.bind jaxb-api org.glassfish.jaxb jaxb-runtime org.glassfish.jaxb jaxb-xjc com.sun.activation jakarta.activation compile org.apache.maven.plugin-tools maven-plugin-annotations org.apache.maven.plugin-testing maven-plugin-testing-harness test src/main/resources true ${project.build.directory}/generated-resources/jaxb-xjc-runtime false org.apache.maven.plugins maven-plugin-plugin maven-compiler-plugin 1.8 1.8 org.apache.maven.plugins maven-dependency-plugin unpack generate-resources unpack org.glassfish.jaxb jaxb-xjc ${jaxb23.version} sources jar false ${project.build.directory}/generated-resources/jaxb-xjc-runtime com/sun/tools/xjc/runtime/*.java maven-jaxb2-plugin-0.15.1/plugin-2.3/src/000077500000000000000000000000001423155634000175745ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-2.3/src/main/000077500000000000000000000000001423155634000205205ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-2.3/src/main/java/000077500000000000000000000000001423155634000214415ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-2.3/src/main/java/org/000077500000000000000000000000001423155634000222305ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-2.3/src/main/java/org/jvnet/000077500000000000000000000000001423155634000233565ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-2.3/src/main/java/org/jvnet/mjiip/000077500000000000000000000000001423155634000244665ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-2.3/src/main/java/org/jvnet/mjiip/v_2_3/000077500000000000000000000000001423155634000253765ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-2.3/src/main/java/org/jvnet/mjiip/v_2_3/LoggingCodeWriter.java000066400000000000000000000024631423155634000316240ustar00rootroot00000000000000/** * */ package org.jvnet.mjiip.v_2_3; import java.io.File; import java.io.IOException; import java.io.OutputStream; import java.io.Writer; import org.apache.maven.plugin.logging.Log; import com.sun.codemodel.CodeWriter; import com.sun.codemodel.JPackage; import com.sun.codemodel.writer.FilterCodeWriter; public class LoggingCodeWriter extends FilterCodeWriter { private final boolean verbose; private final Log log; public LoggingCodeWriter(CodeWriter output, Log log, boolean verbose) { super(output); this.log = log; this.verbose = verbose; } public Writer openSource(JPackage pkg, String fileName) throws IOException { if (verbose) { if (pkg.isUnnamed()) log.info("XJC writing: " + fileName); else log.info("XJC writing: " + pkg.name().replace('.', File.separatorChar) + File.separatorChar + fileName); } return core.openSource(pkg, fileName); } public OutputStream openBinary(JPackage pkg, String fileName) throws IOException { if (verbose) { if (pkg.isUnnamed()) log.info("XJC writing: " + fileName); else log.info("XJC writing: " + pkg.name().replace('.', File.separatorChar) + File.separatorChar + fileName); } return core.openBinary(pkg, fileName); } @Override public void close() throws IOException { core.close(); } }maven-jaxb2-plugin-0.15.1/plugin-2.3/src/main/java/org/jvnet/mjiip/v_2_3/LoggingErrorReceiver.java000066400000000000000000000023471423155634000323340ustar00rootroot00000000000000/** * */ package org.jvnet.mjiip.v_2_3; import org.apache.maven.plugin.logging.Log; import org.xml.sax.SAXParseException; import com.sun.tools.xjc.ErrorReceiver; public class LoggingErrorReceiver extends ErrorReceiver { private final Log log; private final boolean verbose; private final String messagePrefix; public LoggingErrorReceiver(String messagePrefix, Log log, boolean verbose) { this.log = log; this.verbose = verbose; this.messagePrefix = messagePrefix; } public void warning(SAXParseException saxex) { log.warn(getMessage(saxex), saxex); } public void error(SAXParseException saxex) { log.error(getMessage(saxex), saxex); } public void fatalError(SAXParseException saxex) { log.error(getMessage(saxex), saxex); } public void info(SAXParseException saxex) { if (verbose) log.info(getMessage(saxex)); } private String getMessage(SAXParseException ex) { final int row = ex.getLineNumber(); final int col = ex.getColumnNumber(); final String sys = ex.getSystemId(); final String pub = ex.getPublicId(); return messagePrefix + "Location [" + (sys != null ? " " + sys : "") + (pub != null ? " " + pub : "") + (row > 0 ? "{" + row + (col > 0 ? "," + col : "") + "}" : "") + "]."; } }maven-jaxb2-plugin-0.15.1/plugin-2.3/src/main/java/org/jvnet/mjiip/v_2_3/OptionsFactory.java000066400000000000000000000102571423155634000312310ustar00rootroot00000000000000package org.jvnet.mjiip.v_2_3; import java.nio.charset.Charset; import java.nio.charset.IllegalCharsetNameException; import java.text.MessageFormat; import java.util.List; import org.apache.maven.plugin.MojoExecutionException; import org.jvnet.jaxb2.maven2.OptionsConfiguration; import org.jvnet.jaxb2.maven2.util.StringUtils; import org.xml.sax.InputSource; import com.sun.tools.xjc.BadCommandLineException; import com.sun.tools.xjc.Language; import com.sun.tools.xjc.Options; import com.sun.tools.xjc.api.SpecVersion; public class OptionsFactory implements org.jvnet.jaxb2.maven2.OptionsFactory { /** * Creates and initializes an instance of XJC options. * */ public Options createOptions(OptionsConfiguration optionsConfiguration) throws MojoExecutionException { final Options options = new Options(); options.verbose = optionsConfiguration.isVerbose(); options.debugMode = optionsConfiguration.isDebugMode(); options.classpaths.addAll(optionsConfiguration.getPlugins()); options.target = SpecVersion.V2_2; final String encoding = optionsConfiguration.getEncoding(); if (encoding != null) { options.encoding = createEncoding(encoding); } options.setSchemaLanguage(createLanguage(optionsConfiguration .getSchemaLanguage())); options.entityResolver = optionsConfiguration.getEntityResolver(); for (InputSource grammar : optionsConfiguration.getGrammars()) { options.addGrammar(grammar); } for (InputSource bindFile : optionsConfiguration.getBindFiles()) { options.addBindFile(bindFile); } // Setup Other Options options.defaultPackage = optionsConfiguration.getGeneratePackage(); options.targetDir = optionsConfiguration.getGenerateDirectory(); options.strictCheck = optionsConfiguration.isStrict(); options.readOnly = optionsConfiguration.isReadOnly(); options.packageLevelAnnotations = optionsConfiguration .isPackageLevelAnnotations(); options.noFileHeader = optionsConfiguration.isNoFileHeader(); options.enableIntrospection = optionsConfiguration .isEnableIntrospection(); options.disableXmlSecurity = optionsConfiguration .isDisableXmlSecurity(); if (optionsConfiguration.getAccessExternalSchema() != null) { System.setProperty("javax.xml.accessExternalSchema", optionsConfiguration.getAccessExternalSchema()); } if (optionsConfiguration.getAccessExternalDTD() != null) { System.setProperty("javax.xml.accessExternalDTD", optionsConfiguration.getAccessExternalDTD()); } if (optionsConfiguration.isEnableExternalEntityProcessing()) { System.setProperty("enableExternalEntityProcessing", Boolean.TRUE.toString()); } options.contentForWildcard = optionsConfiguration .isContentForWildcard(); if (optionsConfiguration.isExtension()) { options.compatibilityMode = Options.EXTENSION; } final List arguments = optionsConfiguration.getArguments(); try { options.parseArguments(arguments.toArray(new String[arguments .size()])); } catch (BadCommandLineException bclex) { throw new MojoExecutionException("Error parsing the command line [" + arguments + "]", bclex); } return options; } private String createEncoding(String encoding) throws MojoExecutionException { if (encoding == null) { return null; } try { if (!Charset.isSupported(encoding)) { throw new MojoExecutionException(MessageFormat.format( "Unsupported encoding [{0}].", encoding)); } return encoding; } catch (IllegalCharsetNameException icne) { throw new MojoExecutionException(MessageFormat.format( "Unsupported encoding [{0}].", encoding)); } } private Language createLanguage(String schemaLanguage) throws MojoExecutionException { if (StringUtils.isEmpty(schemaLanguage)) { return null; } else if ("AUTODETECT".equalsIgnoreCase(schemaLanguage)) return null; // nothing, it is AUTDETECT by default. else if ("XMLSCHEMA".equalsIgnoreCase(schemaLanguage)) return Language.XMLSCHEMA; else if ("DTD".equalsIgnoreCase(schemaLanguage)) return Language.DTD; else if ("WSDL".equalsIgnoreCase(schemaLanguage)) return Language.WSDL; else { throw new MojoExecutionException("Unknown schemaLanguage [" + schemaLanguage + "]."); } } } maven-jaxb2-plugin-0.15.1/plugin-2.3/src/main/java/org/jvnet/mjiip/v_2_3/XJC23Mojo.java000066400000000000000000000113741423155634000276650ustar00rootroot00000000000000package org.jvnet.mjiip.v_2_3; import java.io.File; import java.io.IOException; import java.text.MessageFormat; import java.util.Iterator; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugins.annotations.LifecyclePhase; import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.ResolutionScope; import org.jvnet.jaxb2.maven2.RawXJC2Mojo; import com.sun.codemodel.CodeWriter; import com.sun.codemodel.JCodeModel; import com.sun.codemodel.JDefinedClass; import com.sun.codemodel.JPackage; import com.sun.tools.xjc.ModelLoader; import com.sun.tools.xjc.Options; import com.sun.tools.xjc.model.Model; import com.sun.tools.xjc.outline.Outline; /** * JAXB 2.x Mojo. * * @author Aleksei Valikov (valikov@gmx.net) */ @Mojo(name = "generate", defaultPhase = LifecyclePhase.GENERATE_SOURCES, requiresDependencyResolution = ResolutionScope.COMPILE, threadSafe = true) public class XJC23Mojo extends RawXJC2Mojo { private final org.jvnet.jaxb2.maven2.OptionsFactory optionsFactory = new OptionsFactory(); @Override protected org.jvnet.jaxb2.maven2.OptionsFactory getOptionsFactory() { return optionsFactory; } @Override public void doExecute(Options options) throws MojoExecutionException { final Model model = loadModel(options); final Outline outline = generateCode(model); writeCode(outline); } protected Model loadModel(Options options) throws MojoExecutionException { if (getVerbose()) { getLog().info("Parsing input schema(s)..."); } final Model model = ModelLoader.load(options, new JCodeModel(), new LoggingErrorReceiver("Error while parsing schema(s).", getLog(), getVerbose())); if (model == null) throw new MojoExecutionException( "Unable to parse input schema(s). Error messages should have been provided."); return model; } protected Outline generateCode(final Model model) throws MojoExecutionException { if (getVerbose()) { getLog().info("Compiling input schema(s)..."); } final Outline outline = model.generateCode(model.options, new LoggingErrorReceiver("Error while generating code.", getLog(), getVerbose())); if (outline == null) { throw new MojoExecutionException( "Failed to compile input schema(s)! Error messages should have been provided."); } else { return outline; } } protected void writeCode(Outline outline) throws MojoExecutionException { if (getWriteCode()) { final Model model = outline.getModel(); final JCodeModel codeModel = model.codeModel; final File targetDirectory = model.options.targetDir; if (getVerbose()) { getLog().info( MessageFormat.format("Writing output to [{0}].", targetDirectory.getAbsolutePath())); } try { if (getCleanPackageDirectories()) { if (getVerbose()) { getLog().info("Cleaning package directories."); } cleanPackageDirectories(targetDirectory, codeModel); } final CodeWriter codeWriter = new LoggingCodeWriter( model.options.createCodeWriter(), getLog(), getVerbose()); codeModel.build(codeWriter); } catch (IOException e) { throw new MojoExecutionException("Unable to write files: " + e.getMessage(), e); } } else { getLog().info( "The [writeCode] setting is set to false, the code will not be written."); } } private void cleanPackageDirectories(File targetDirectory, JCodeModel codeModel) { for (Iterator packages = codeModel.packages(); packages .hasNext();) { final JPackage _package = packages.next(); final File packageDirectory; if (_package.isUnnamed()) { packageDirectory = targetDirectory; } else { packageDirectory = new File(targetDirectory, _package.name() .replace('.', File.separatorChar)); } if (packageDirectory.isDirectory()) { if (isRelevantPackage(_package)) { if (getVerbose()) { getLog().info( MessageFormat .format("Cleaning directory [{0}] of the package [{1}].", packageDirectory .getAbsolutePath(), _package.name())); } cleanPackageDirectory(packageDirectory); } else { if (getVerbose()) { getLog().info( MessageFormat .format("Skipping directory [{0}] of the package [{1}] as it does not contain generated classes or resources.", packageDirectory .getAbsolutePath(), _package.name())); } } } } } private boolean isRelevantPackage(JPackage _package) { if (_package.propertyFiles().hasNext()) { return true; } Iterator classes = _package.classes(); for (; classes.hasNext();) { JDefinedClass _class = (JDefinedClass) classes.next(); if (!_class.isHidden()) { return true; } } return false; } } maven-jaxb2-plugin-0.15.1/plugin-2.3/src/main/resources/000077500000000000000000000000001423155634000225325ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-2.3/src/main/resources/META-INF/000077500000000000000000000000001423155634000236725ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-2.3/src/main/resources/META-INF/m2e/000077500000000000000000000000001423155634000243555ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-2.3/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml000066400000000000000000000006621423155634000322510ustar00rootroot00000000000000 generate true true maven-jaxb2-plugin-0.15.1/plugin-2.3/src/site/000077500000000000000000000000001423155634000205405ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-2.3/src/site/site.xml000066400000000000000000000001371423155634000222270ustar00rootroot00000000000000 ${reports} maven-jaxb2-plugin-0.15.1/plugin-core/000077500000000000000000000000001423155634000174335ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/.gitignore000066400000000000000000000000111423155634000214130ustar00rootroot00000000000000/target/ maven-jaxb2-plugin-0.15.1/plugin-core/pom.xml000066400000000000000000000041661423155634000207570ustar00rootroot00000000000000 4.0.0 maven-jaxb2-plugin-core jar Maven JAXB 2.x Plugin Core org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-project 0.15.1 javax.xml.bind jaxb-api provided org.slf4j slf4j-api org.apache.commons commons-lang3 com.sun.org.apache.xml.internal resolver 20050927 org.glassfish.jaxb txw2 org.apache.maven maven-plugin-api org.sonatype.plexus plexus-build-api org.codehaus.plexus plexus-utils org.apache.maven maven-project org.apache.maven.plugin-tools maven-plugin-annotations org.apache.maven.plugin-testing maven-plugin-testing-harness test maven-compiler-plugin 1.7 1.7 maven-jaxb2-plugin-0.15.1/plugin-core/src/000077500000000000000000000000001423155634000202225ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/main/000077500000000000000000000000001423155634000211465ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/main/java/000077500000000000000000000000001423155634000220675ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/main/java/org/000077500000000000000000000000001423155634000226565ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/main/java/org/jvnet/000077500000000000000000000000001423155634000240045ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/main/java/org/jvnet/jaxb2/000077500000000000000000000000001423155634000250125ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/main/java/org/jvnet/jaxb2/maven2/000077500000000000000000000000001423155634000262025ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/main/java/org/jvnet/jaxb2/maven2/AbstractXJC2Mojo.java000066400000000000000000001253441423155634000320750ustar00rootroot00000000000000package org.jvnet.jaxb2.maven2; import java.io.File; import java.io.FileFilter; import java.io.IOException; import java.net.MalformedURLException; import java.net.URI; import java.net.URISyntaxException; import java.net.URL; import java.text.MessageFormat; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.LinkedList; import java.util.List; import java.util.Set; import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.factory.ArtifactFactory; import org.apache.maven.artifact.metadata.ArtifactMetadataSource; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.resolver.ArtifactNotFoundException; import org.apache.maven.artifact.resolver.ArtifactResolutionException; import org.apache.maven.artifact.resolver.ArtifactResolver; import org.apache.maven.model.Dependency; import org.apache.maven.model.FileSet; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugins.annotations.Component; import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.project.MavenProject; import org.apache.maven.project.MavenProjectBuilder; import org.apache.maven.project.artifact.InvalidDependencyVersionException; import org.apache.maven.project.artifact.MavenMetadataSource; import org.apache.maven.settings.Settings; import org.jvnet.jaxb2.maven2.util.ArtifactUtils; import org.jvnet.jaxb2.maven2.util.IOUtils; import org.sonatype.plexus.build.incremental.BuildContext; import org.sonatype.plexus.build.incremental.DefaultBuildContext; public abstract class AbstractXJC2Mojo extends AbstractMojo implements DependencyResourceResolver { @Parameter(defaultValue = "${settings}", readonly = true) private Settings settings; public Settings getSettings() { return settings; } public void setSettings(Settings settings) { this.settings = settings; } /** * If set to true, passes Maven's active proxy settings to XJC. * Default value is false. Proxy settings are passed using the * -httpproxy argument in the form * [user[:password]@]proxyHost[:proxyPort]. This sets both HTTP * as well as HTTPS proxy. */ @Parameter(property = "maven.xjc2.useActiveProxyAsHttpproxy", defaultValue = "false") private boolean useActiveProxyAsHttpproxy = false; public boolean isUseActiveProxyAsHttpproxy() { return this.useActiveProxyAsHttpproxy; } public void setUseActiveProxyAsHttpproxy(boolean useActiveProxyAsHttpproxy) { this.useActiveProxyAsHttpproxy = useActiveProxyAsHttpproxy; } @Parameter(property = "maven.xjc2.proxyHost") private String proxyHost; public void setProxyHost(String proxyHost) { this.proxyHost = proxyHost; } public String getProxyHost() { return this.proxyHost; } @Parameter(property = "maven.xjc2.proxyPort") private int proxyPort; public void setProxyPort(int proxyPort) { this.proxyPort = proxyPort; } public int getProxyPort() { return this.proxyPort; } @Parameter(property = "maven.xjc2.proxyUsername") private String proxyUsername; public void setProxyUsername(String proxyUsername) { this.proxyUsername = proxyUsername; } public String getProxyUsername() { return this.proxyUsername; } @Parameter(property = "maven.xjc2.proxyPassword") private String proxyPassword; public void setProxyPassword(String proxyPassword) { this.proxyPassword = proxyPassword; } public String getProxyPassword() { return this.proxyPassword; } /** * Encoding for the generated sources, defaults to * ${project.build.sourceEncoding}. */ @Parameter(property = "encoding", defaultValue = "${project.build.sourceEncoding}") private String encoding; public String getEncoding() { return encoding; } public void setEncoding(String encoding) { this.encoding = encoding; } /** * Locale for the generated sources. */ @Parameter(property = "locale") private String locale; public String getLocale() { return locale; } public void setLocale(String locale) { this.locale = locale; } /** * Type of input schema language. One of: DTD, XMLSCHEMA, RELAXNG, * RELAXNG_COMPACT, WSDL, AUTODETECT. If unspecified, it is assumed * AUTODETECT. */ @Parameter(property = "maven.xjc2.schemaLanguage") private String schemaLanguage; public String getSchemaLanguage() { return schemaLanguage; } public void setSchemaLanguage(String schemaLanguage) { this.schemaLanguage = schemaLanguage; } /** * The source directory containing *.xsd schema files. Notice that binding * files are searched by default in this directory. */ @Parameter(defaultValue = "src/main/resources", property = "maven.xjc2.schemaDirectory", required = true) private File schemaDirectory; public File getSchemaDirectory() { return schemaDirectory; } public void setSchemaDirectory(File schemaDirectory) { this.schemaDirectory = schemaDirectory; } /** *

* A list of regular expression file search patterns to specify the schemas * to be processed. Searching is based from the root of * schemaDirectory. *

*

* If left undefined, then all *.xsd files in * schemaDirectory will be processed. *

*/ @Parameter private String[] schemaIncludes = new String[] { "*.xsd" }; public String[] getSchemaIncludes() { return schemaIncludes; } public void setSchemaIncludes(String[] schemaIncludes) { this.schemaIncludes = schemaIncludes; } /** * A list of regular expression file search patterns to specify the schemas * to be excluded from the schemaIncludes list. Searching is * based from the root of schemaDirectory. */ @Parameter private String[] schemaExcludes; public String[] getSchemaExcludes() { return schemaExcludes; } public void setSchemaExcludes(String[] schemaExcludes) { this.schemaExcludes = schemaExcludes; } /** * A list of schema resources which could includes file sets, URLs, Maven * artifact resources. */ @Parameter private ResourceEntry[] schemas = new ResourceEntry[0]; public ResourceEntry[] getSchemas() { return schemas; } public void setSchemas(ResourceEntry[] schemas) { this.schemas = schemas; } /** *

* The source directory containing the *.xjb binding files. *

*

* If left undefined, then the schemaDirectory is assumed. *

*/ @Parameter(property = "maven.xjc2.bindingDirectory") private File bindingDirectory; public void setBindingDirectory(File bindingDirectory) { this.bindingDirectory = bindingDirectory; } public File getBindingDirectory() { return bindingDirectory != null ? bindingDirectory : getSchemaDirectory(); } /** * The source directory containing *.cat catalog files. Defaults to the schemaDirectory. */ @Parameter(property = "maven.xjc2.catalogDirectory") private File catalogDirectory; public void setCatalogDirectory(File catalogDirectory) { this.catalogDirectory = catalogDirectory; } public File getCatalogDirectory() { return catalogDirectory != null ? catalogDirectory : getSchemaDirectory(); } /** *

* A list of regular expression file search patterns to specify the binding * files to be processed. Searching is based from the root of * bindingDirectory. *

*

* If left undefined, then all *.xjb files in schemaDirectory will be * processed. *

*/ @Parameter private String[] bindingIncludes = new String[] { "*.xjb" }; public String[] getBindingIncludes() { return bindingIncludes; } public void setBindingIncludes(String[] bindingIncludes) { this.bindingIncludes = bindingIncludes; } /** * A list of regular expression file search patterns to specify the binding * files to be excluded from the bindingIncludes. Searching is * based from the root of bindingDirectory. */ @Parameter private String[] bindingExcludes; public String[] getBindingExcludes() { return bindingExcludes; } public void setBindingExcludes(String[] bindingExcludes) { this.bindingExcludes = bindingExcludes; } /** * A list of binding resources which could includes file sets, URLs, Maven * artifact resources. */ @Parameter private ResourceEntry[] bindings = new ResourceEntry[0]; public ResourceEntry[] getBindings() { return bindings; } public void setBindings(ResourceEntry[] bindings) { this.bindings = bindings; } /** * If 'true', maven's default exludes are NOT added to all the excludes * lists. */ @Parameter(defaultValue = "false", property = "maven.xjc2.disableDefaultExcludes") private boolean disableDefaultExcludes; public boolean getDisableDefaultExcludes() { return disableDefaultExcludes; } public void setDisableDefaultExcludes(boolean disableDefaultExcludes) { this.disableDefaultExcludes = disableDefaultExcludes; } /** * Specify the catalog file to resolve external entity references (xjc's * -catalog option)

*

* Support TR9401, XCatalog, and OASIS XML Catalog format. See the * catalog-resolver sample and this article for details. *

*/ @Parameter(property = "maven.xjc2.catalog") private File catalog; public File getCatalog() { return catalog; } public void setCatalog(File catalog) { this.catalog = catalog; } /** *

* A list of regular expression file search patterns to specify the catalogs * to be processed. Searching is based from the root of * catalogDirectory. *

*

* If left undefined, then all *.cat files in * catalogDirectory will be processed. *

*/ @Parameter private String[] catalogIncludes = new String[] { "*.cat" }; public String[] getCatalogIncludes() { return catalogIncludes; } public void setCatalogIncludes(String[] catalogIncludes) { this.catalogIncludes = catalogIncludes; } /** * A list of regular expression file search patterns to specify the catalogs * to be excluded from the catalogIncludes list. Searching is * based from the root of catalogDirectory. */ @Parameter private String[] catalogExcludes; public String[] getCatalogExcludes() { return catalogExcludes; } public void setCatalogExcludes(String[] catalogExcludes) { this.catalogExcludes = catalogExcludes; } /** * A list of catalog resources which could includes file sets, URLs, Maven * artifact resources. */ @Parameter private ResourceEntry[] catalogs = new ResourceEntry[0]; public ResourceEntry[] getCatalogs() { return catalogs; } public void setCatalogs(ResourceEntry[] catalogs) { this.catalogs = catalogs; } protected List createCatalogURIs() throws MojoExecutionException { final File catalog = getCatalog(); final ResourceEntry[] catalogs = getCatalogs(); final List catalogUris = new ArrayList((catalog == null ? 0 : 1) + catalogs.length); if (catalog != null) { catalogUris.add(getCatalog().toURI()); } for (ResourceEntry resourceEntry : catalogs) { catalogUris.addAll(createResourceEntryUris(resourceEntry, getCatalogDirectory().getAbsolutePath(), getCatalogIncludes(), getCatalogExcludes())); } return catalogUris; } /** * Provides the class name of the catalog resolver. */ @Parameter(property = "maven.xjc2.catalogResolver") protected String catalogResolver = null; public String getCatalogResolver() { return catalogResolver; } public void setCatalogResolver(String catalogResolver) { this.catalogResolver = catalogResolver; } /** *

* The generated classes will all be placed under this Java package (xjc's * -p option), unless otherwise specified in the schemas. *

*

* If left unspecified, the package will be derived from the schemas only. *

*/ @Parameter(property = "maven.xjc2.generatePackage") private String generatePackage; public String getGeneratePackage() { return generatePackage; } public void setGeneratePackage(String generatePackage) { this.generatePackage = generatePackage; } /** *

* Generated code will be written under this directory. *

*

* For instance, if you specify generateDirectory="doe/ray" and * generatePackage="org.here", then files are generated to * doe/ray/org/here. *

*/ @Parameter(defaultValue = "${project.build.directory}/generated-sources/xjc", property = "maven.xjc2.generateDirectory", required = true) private File generateDirectory; public File getGenerateDirectory() { return generateDirectory; } public void setGenerateDirectory(File generateDirectory) { this.generateDirectory = generateDirectory; if (getEpisodeFile() == null) { final File episodeFile = new File(getGenerateDirectory(), "META-INF" + File.separator + "sun-jaxb.episode"); setEpisodeFile(episodeFile); } } /** * If set to true (default), adds target directory as a compile source root * of this Maven project. */ @Parameter(defaultValue = "true", property = "maven.xjc2.addCompileSourceRoot", required = false) private boolean addCompileSourceRoot = true; public boolean getAddCompileSourceRoot() { return addCompileSourceRoot; } public void setAddCompileSourceRoot(boolean addCompileSourceRoot) { this.addCompileSourceRoot = addCompileSourceRoot; } /** * If set to true, adds target directory as a test compile source root of * this Maven project. Default value is false. */ @Parameter(defaultValue = "false", property = "maven.xjc2.addTestCompileSourceRoot", required = false) private boolean addTestCompileSourceRoot = false; public boolean getAddTestCompileSourceRoot() { return addTestCompileSourceRoot; } public void setAddTestCompileSourceRoot(boolean addTestCompileSourceRoot) { this.addTestCompileSourceRoot = addTestCompileSourceRoot; } /** * If 'true', the generated Java source files are set as read-only (xjc's * -readOnly option). */ @Parameter(defaultValue = "false", property = "maven.xjc2.readOnly") private boolean readOnly; public boolean getReadOnly() { return readOnly; } public void setReadOnly(boolean readOnly) { this.readOnly = readOnly; } /** * If 'false', suppresses generation of package level annotations * (package-info.java), xjc's -npa option. */ @Parameter(defaultValue = "true", property = "maven.xjc2.packageLevelAnnotations") private boolean packageLevelAnnotations = true; public boolean getPackageLevelAnnotations() { return packageLevelAnnotations; } public void setPackageLevelAnnotations(boolean packageLevelAnnotations) { this.packageLevelAnnotations = packageLevelAnnotations; } /** * If 'true', suppresses generation of a file header with timestamp, xjc's * -no-header option. */ @Parameter(defaultValue = "false", property = "maven.xjc2.noFileHeader") private boolean noFileHeader = false; public boolean getNoFileHeader() { return noFileHeader; } public void setNoFileHeader(boolean noFileHeader) { this.noFileHeader = noFileHeader; } /** * If 'true', enables correct generation of Boolean getters/setters to * enable Bean Introspection apis; xjc's -enableIntrospection option. */ @Parameter(defaultValue = "false", property = "maven.xjc2.enableIntrospection") private boolean enableIntrospection = false; public boolean getEnableIntrospection() { return enableIntrospection; } public void setEnableIntrospection(boolean enableIntrospection) { this.enableIntrospection = enableIntrospection; } /** * If 'true', disables XML security features when parsing XML documents; * xjc's -disableXmlSecurity option. */ @Parameter(defaultValue = "true", property = "maven.xjc2.disableXmlSecurity") private boolean disableXmlSecurity = true; public boolean getDisableXmlSecurity() { return disableXmlSecurity; } public void setDisableXmlSecurity(boolean disableXmlSecurity) { this.disableXmlSecurity = disableXmlSecurity; } /** * Restrict access to the protocols specified for external reference set by * the schemaLocation attribute, Import and Include element. Value: a list * of protocols separated by comma. A protocol is the scheme portion of a * {@link java.net.URI}, or in the case of the JAR protocol, "jar" plus the * scheme portion separated by colon. The keyword "all" grants permission to * all protocols. */ @Parameter(defaultValue = "all", property = "maven.xjc2.accessExternalSchema") private String accessExternalSchema = "all"; public String getAccessExternalSchema() { return accessExternalSchema; } public void setAccessExternalSchema(String accessExternalSchema) { this.accessExternalSchema = accessExternalSchema; } /** * Restricts access to external DTDs and external Entity References to the * protocols specified. Value: a list of protocols separated by comma. A * protocol is the scheme portion of a {@link java.net.URI}, or in the case * of the JAR protocol, "jar" plus the scheme portion separated by colon. * The keyword "all" grants permission to all protocols. */ @Parameter(defaultValue = "all", property = "maven.xjc2.accessExternalDTD") private String accessExternalDTD = "all"; public String getAccessExternalDTD() { return accessExternalDTD; } public void setAccessExternalDTD(String accessExternalDTD) { this.accessExternalDTD = accessExternalDTD; } /** * Enables external entity processing. */ @Parameter(defaultValue = "true", property = "maven.xjc2.enableExternalEntityProcessing") private boolean enableExternalEntityProcessing; public boolean isEnableExternalEntityProcessing() { return enableExternalEntityProcessing; } public void setEnableExternalEntityProcessing(boolean enableExternalEntityProcessing) { this.enableExternalEntityProcessing = enableExternalEntityProcessing; } /** * If true, generates content property for types with multiple xs:any * derived elements; corresponds to the XJC -contentForWildcard option. */ @Parameter(defaultValue="false") private boolean contentForWildcard; public boolean getContentForWildcard() { return contentForWildcard; } public void setContentForWildcard(boolean contentForWildcard) { this.contentForWildcard = contentForWildcard; } /** * If 'true', the XJC binding compiler will run in the extension mode (xjc's * -extension option). Otherwise, it will run in the strict conformance * mode. */ @Parameter(defaultValue = "true", property = "maven.xjc2.extension") private boolean extension; public boolean getExtension() { return extension; } public void setExtension(boolean extension) { this.extension = extension; } /** * If 'true' (default), Perform strict validation of the input schema * (disabled by the xjc's -nv option). */ @Parameter(defaultValue = "true", property = "maven.xjc2.strict") private boolean strict = true; public boolean getStrict() { return strict; } public void setStrict(boolean strict) { this.strict = strict; } /** * If 'false', the plugin will not write the generated code to disk. */ @Parameter(defaultValue = "true", property = "maven.xjc2.writeCode") private boolean writeCode = true; public boolean getWriteCode() { return writeCode; } public void setWriteCode(boolean writeCode) { this.writeCode = writeCode; } /** *

* If 'true', the plugin and the XJC compiler are both set to verbose mode * (xjc's -verbose option). *

*

* It is automatically set to 'true' when maven is run in debug mode (mvn's * -X option). *

*/ @Parameter(defaultValue = "false", property = "maven.xjc2.verbose") private boolean verbose; public boolean getVerbose() { return verbose; } public void setVerbose(boolean verbose) { this.verbose = verbose; } /** *

* If 'true', the XJC compiler is set to debug mode (xjc's -debug option). *

*

* It is automatically set to 'true' when maven is run in debug mode (mvn's * -X option). *

*/ @Parameter(defaultValue = "false", property = "maven.xjc2.debug") private boolean debug; public boolean getDebug() { return debug; } public void setDebug(boolean debug) { this.debug = debug; } /** *

* A list of extra XJC's command-line arguments (items must include the dash * '-'). Use this argument to enable the JAXB2 plugins you want to use. *

*

* Arguments set here take precedence over other mojo parameters. *

*/ @Parameter private List args = new LinkedList(); public List getArgs() { return args; } public void setArgs(List args) { this.args.addAll(args); } /** * If true, no up-to-date check is performed and the XJC always re-generates * the sources. Otherwise schemas will only be recompiled if anything has * changed. * */ @Parameter(defaultValue = "false", property = "maven.xjc2.forceRegenerate") private boolean forceRegenerate; public boolean getForceRegenerate() { return forceRegenerate; } public void setForceRegenerate(boolean forceRegenerate) { this.forceRegenerate = forceRegenerate; } /** *

* If 'true', the generateDirectory will be deleted before the XJC binding * compiler recompiles the source files. Default is false. *

*

* Note that if set to 'false', the up-to-date check might not work, since * XJC does not regenerate all files (i.e. files for "any" elements under * 'xjc/org/w3/_2001/xmlschema' directory). *

* */ @Parameter(defaultValue = "false", property = "maven.xjc2.removeOldOutput") private boolean removeOldOutput; public boolean getRemoveOldOutput() { return removeOldOutput; } public void setRemoveOldOutput(boolean removeOldOutput) { this.removeOldOutput = removeOldOutput; } /** *

* If 'true', package directories will be cleaned before the XJC binding * compiler generates the source files. *

* */ @Parameter(defaultValue = "true", property = "maven.xjc2.removeOldPackages") private boolean cleanPackageDirectories = true; public boolean getCleanPackageDirectories() { return cleanPackageDirectories; } public void setCleanPackageDirectories(boolean removeOldPackages) { this.cleanPackageDirectories = removeOldPackages; } /** * Specifies patterns of files produced by this plugin. This is used to * check if produced files are up-to-date. Default value is ** /*.*, ** * /*.java, ** /bgm.ser, ** /jaxb.properties. */ @Parameter private String[] produces = new String[] { "**/*.*", "**/*.java", "**/bgm.ser", "**/jaxb.properties" }; public String[] getProduces() { return produces; } public void setProduces(String[] produces) { this.produces = produces; } /** * A list of of input files or URLs to consider during the up-to-date. By * default it always considers: 1. schema files, 2. binding files, 3. * catalog file, and 4. the pom.xml file of the project executing this * plugin. Deprecated, use {@link #otherDependsIncludes} and {@link #otherDependsExcludes} instead. */ @Deprecated @Parameter private File[] otherDepends; @Deprecated public File[] getOtherDepends() { return otherDepends; } @Deprecated public void setOtherDepends(File[] otherDepends) { this.otherDepends = otherDepends; } @Parameter private String[] otherDependsIncludes; public String[] getOtherDependsIncludes() { return otherDependsIncludes; } public void setOtherDependsIncludes(String[] otherDependsIncludes) { this.otherDependsIncludes = otherDependsIncludes; } @Parameter private String[] otherDependsExcludes; public String[] getOtherDependsExcludes() { return otherDependsExcludes; } public void setOtherDependsExcludes(String[] otherDependsExcludes) { this.otherDependsExcludes = otherDependsExcludes; } /** * Target location of the episode file. By default it is * target/generated-sources/xjc/META-INF/sun-jaxb.episode so that the * episode file will appear as META-INF/sun-jaxb.episode in the JAR - just * as XJC wants it. */ @Parameter(property = "maven.xjc2.episodeFile") private File episodeFile; public File getEpisodeFile() { return episodeFile; } public void setEpisodeFile(File episodeFile) { this.episodeFile = episodeFile; } /** * If true, the episode file (describing mapping of elements and types to * classes for the compiled schema) will be generated. */ @Parameter(property = "maven.xjc2.episode", defaultValue = "true") private boolean episode = true; public boolean getEpisode() { return episode; } public void setEpisode(boolean episode) { this.episode = episode; } /** * If true (default), adds if-exists="true" * attributes to the bindings elements associated with schemas * (via scd="x-schema::...") in the generated episode files. * This is necessary to avoid the annoying `SCD "x-schema::tns" didn't * match any schema component` errors. */ @Parameter(property = "maven.xjc2.addIfExistsToEpisodeSchemaBindings", defaultValue = "true") private boolean addIfExistsToEpisodeSchemaBindings = true; public boolean isAddIfExistsToEpisodeSchemaBindings() { return this.addIfExistsToEpisodeSchemaBindings; } public void setAddIfExistsToEpisodeSchemaBindings( boolean addIfExistsToEpisodeSchemaBindings) { this.addIfExistsToEpisodeSchemaBindings = addIfExistsToEpisodeSchemaBindings; } /** * If true, marks generated classes using a @Generated annotation - i.e. * turns on XJC -mark-generated option. Default is false. */ @Parameter(property = "maven.xjc2.markGenerated", defaultValue = "false") private boolean markGenerated = false; public boolean getMarkGenerated() { return markGenerated; } public void setMarkGenerated(boolean markGenerated) { this.markGenerated = markGenerated; } /** * XJC plugins to be made available to XJC. They still need to be activated * by using <args/> and enable plugin activation option. */ @Parameter protected Dependency[] plugins; public Dependency[] getPlugins() { return plugins; } public void setPlugins(Dependency[] plugins) { this.plugins = plugins; } @Component private ArtifactResolver artifactResolver; @Component private ArtifactMetadataSource artifactMetadataSource; @Component private ArtifactFactory artifactFactory; /** * Location of the local repository. */ @Parameter(defaultValue = "${localRepository}", required = true) private ArtifactRepository localRepository; /** * Artifact factory, needed to download source jars. */ @Component(role = org.apache.maven.project.MavenProjectBuilder.class) private MavenProjectBuilder mavenProjectBuilder; @Component private BuildContext buildContext = new DefaultBuildContext(); /** * Plugin artifacts. */ @Parameter(defaultValue = "${plugin.artifacts}", required = true) private List pluginArtifacts; /** * If you want to use existing artifacts as episodes for separate * compilation, configure them as episodes/episode elements. It is assumed * that episode artifacts contain an appropriate META-INF/sun-jaxb.episode * resource. */ @Parameter private Dependency[] episodes; public Dependency[] getEpisodes() { return episodes; } public void setEpisodes(Dependency[] episodes) { this.episodes = episodes; } /** * Use all of the compile-scope project dependencies as episode artifacts. * It is assumed that episode artifacts contain an appropriate * META-INF/sun-jaxb.episode resource. Default is false. */ @Parameter private boolean useDependenciesAsEpisodes = false; public boolean getUseDependenciesAsEpisodes() { return useDependenciesAsEpisodes; } public void setUseDependenciesAsEpisodes(boolean useDependenciesAsEpisodes) { this.useDependenciesAsEpisodes = useDependenciesAsEpisodes; } /** * Scan all compile-scoped project dependencies for XML binding files. */ @Parameter(defaultValue = "false") private boolean scanDependenciesForBindings = false; public boolean getScanDependenciesForBindings() { return scanDependenciesForBindings; } public void setScanDependenciesForBindings( boolean scanDependenciesForBindings) { this.scanDependenciesForBindings = scanDependenciesForBindings; } /** * Version of the JAXB specification (ex. 2.0, 2.1 or 2.2). */ @Parameter(defaultValue = "2.2") private String specVersion = "2.2"; public String getSpecVersion() { return specVersion; } public void setSpecVersion(String specVersion) { this.specVersion = specVersion; } protected void logConfiguration() throws MojoExecutionException { logApiConfiguration(); getLog().info("pluginArtifacts:" + getPluginArtifacts()); getLog().info("specVersion:" + getSpecVersion()); getLog().info("encoding:" + getEncoding()); getLog().info("locale:" + getLocale()); getLog().info("schemaLanguage:" + getSchemaLanguage()); getLog().info("schemaDirectory:" + getSchemaDirectory()); getLog().info("schemaIncludes:" + Arrays.toString(getSchemaIncludes())); getLog().info("schemaExcludes:" + Arrays.toString(getSchemaExcludes())); getLog().info("schemas:" + Arrays.toString(getSchemas())); getLog().info("bindingDirectory:" + getBindingDirectory()); getLog().info( "bindingIncludes:" + Arrays.toString(getBindingIncludes())); getLog().info( "bindingExcludes:" + Arrays.toString(getBindingExcludes())); getLog().info("bindings:" + Arrays.toString(getBindings())); getLog().info("disableDefaultExcludes:" + getDisableDefaultExcludes()); getLog().info("catalog:" + getCatalog()); getLog().info("catalogResolver:" + getCatalogResolver()); getLog().info("generatePackage:" + getGeneratePackage()); getLog().info("generateDirectory:" + getGenerateDirectory()); getLog().info("readOnly:" + getReadOnly()); getLog().info("extension:" + getExtension()); getLog().info("strict:" + getStrict()); getLog().info("writeCode:" + getWriteCode()); getLog().info("verbose:" + getVerbose()); getLog().info("debug:" + getDebug()); getLog().info("args:" + getArgs()); getLog().info("forceRegenerate:" + getForceRegenerate()); getLog().info("removeOldOutput:" + getRemoveOldOutput()); getLog().info("produces:" + Arrays.toString(getProduces())); getLog().info("otherDepends:" + getOtherDepends()); getLog().info("otherDependIncludes:" + getOtherDependsIncludes()); getLog().info("otherDependExcludes:" + getOtherDependsExcludes()); getLog().info("episodeFile:" + getEpisodeFile()); getLog().info("episode:" + getEpisode()); getLog().info("plugins:" + Arrays.toString(getPlugins())); getLog().info("episodes:" + Arrays.toString(getEpisodes())); getLog().info( "useDependenciesAsEpisodes:" + getUseDependenciesAsEpisodes()); getLog().info( "scanDependenciesForBindings:" + getScanDependenciesForBindings()); getLog().info("xjcPlugins:" + Arrays.toString(getPlugins())); getLog().info("episodes:" + Arrays.toString(getEpisodes())); } private static final String XML_SCHEMA_CLASS_NAME = "XmlSchema"; @Parameter( defaultValue = "${project}", readonly = true ) private MavenProject project; public MavenProject getProject() { return project; } public void setProject(MavenProject project) { this.project = project; } private static final String XML_SCHEMA_CLASS_QNAME = "javax.xml.bind.annotation." + XML_SCHEMA_CLASS_NAME; public ArtifactResolver getArtifactResolver() { return artifactResolver; } public void setArtifactResolver(ArtifactResolver artifactResolver) { this.artifactResolver = artifactResolver; } private static final String XML_SCHEMA_RESOURCE_NAME = XML_SCHEMA_CLASS_NAME + ".class"; public ArtifactMetadataSource getArtifactMetadataSource() { return artifactMetadataSource; } public void setArtifactMetadataSource( ArtifactMetadataSource artifactMetadataSource) { this.artifactMetadataSource = artifactMetadataSource; } private static final String XML_SCHEMA_RESOURCE_QNAME = "/javax/xml/bind/annotation/" + XML_SCHEMA_RESOURCE_NAME; public ArtifactFactory getArtifactFactory() { return artifactFactory; } public void setArtifactFactory(ArtifactFactory artifactFactory) { this.artifactFactory = artifactFactory; } private static final String XML_ELEMENT_REF_CLASS_NAME = "XmlElementRef"; public ArtifactRepository getLocalRepository() { return localRepository; } public void setLocalRepository(ArtifactRepository localRepository) { this.localRepository = localRepository; } private static final String XML_ELEMENT_REF_CLASS_QNAME = "javax.xml.bind.annotation." + XML_ELEMENT_REF_CLASS_NAME; public MavenProjectBuilder getMavenProjectBuilder() { return mavenProjectBuilder; } public void setMavenProjectBuilder(MavenProjectBuilder mavenProjectBuilder) { this.mavenProjectBuilder = mavenProjectBuilder; } public BuildContext getBuildContext() { return buildContext; } public void setBuildContext(BuildContext buildContext) { this.buildContext = buildContext; } protected void logApiConfiguration() { try { final Class xmlSchemaClass = Class .forName(XML_SCHEMA_CLASS_QNAME); final URL resource = xmlSchemaClass .getResource(XML_SCHEMA_RESOURCE_NAME); final String draftLocation = resource.toExternalForm(); final String location; if (draftLocation.endsWith(XML_SCHEMA_RESOURCE_QNAME)) { location = draftLocation.substring(0, draftLocation.length() - XML_SCHEMA_RESOURCE_QNAME.length()); } else { location = draftLocation; } getLog().info("JAXB API is loaded from the [" + location + "]."); try { xmlSchemaClass.getMethod("location"); final Class xmlElementRefClass = Class .forName(XML_ELEMENT_REF_CLASS_QNAME); try { xmlElementRefClass.getMethod("required"); getLog().info("Detected JAXB API version [2.2]."); } catch (NoSuchMethodException nsmex2) { getLog().info("Detected JAXB API version [2.1]."); } } catch (NoSuchMethodException nsmex1) { getLog().info("Detected JAXB API version [2.0]."); } } catch (ClassNotFoundException cnfex) { getLog().error( "Could not find JAXB 2.x API classes. Make sure JAXB 2.x API is on the classpath."); } } public List getPluginArtifacts() { return pluginArtifacts; } public void setPluginArtifacts( List plugingArtifacts) { this.pluginArtifacts = plugingArtifacts; } public List getProjectDependencies() { @SuppressWarnings("unchecked") final Set artifacts = getProject().getArtifacts(); if (artifacts == null) { return Collections.emptyList(); } else { final List dependencies = new ArrayList(artifacts.size()); for (Artifact artifact : artifacts) { final Dependency dependency = new Dependency(); dependency.setGroupId(artifact.getGroupId()); dependency.setArtifactId(artifact.getArtifactId()); dependency.setVersion(artifact.getVersion()); dependency.setClassifier(artifact.getClassifier()); dependency.setScope(artifact.getScope()); dependency.setType(artifact.getType()); dependencies.add(dependency); } return dependencies; } } protected List createResourceEntryUris(ResourceEntry resourceEntry, String defaultDirectory, String[] defaultIncludes, String[] defaultExcludes) throws MojoExecutionException { if (resourceEntry == null) { return Collections.emptyList(); } else { final List uris = new LinkedList(); if (resourceEntry.getFileset() != null) { final FileSet fileset = resourceEntry.getFileset(); uris.addAll(createFileSetUris(fileset, defaultDirectory, defaultIncludes, defaultExcludes)); } if (resourceEntry.getUrl() != null) { String urlDraft = resourceEntry.getUrl(); uris.add(createUri(urlDraft)); } if (resourceEntry.getDependencyResource() != null) { final String systemId = resourceEntry.getDependencyResource() .getSystemId(); try { URI uri = new URI(systemId); uris.add(uri); } catch (URISyntaxException e) { throw new MojoExecutionException( MessageFormat.format( "Could not create the resource entry URI from the following system id: [{0}].", systemId), e); } } return uris; } } public URL resolveDependencyResource(DependencyResource dependencyResource) throws MojoExecutionException { if (dependencyResource.getGroupId() == null) { throw new MojoExecutionException(MessageFormat.format( "Dependency resource [{0}] does define the groupId.", dependencyResource)); } if (dependencyResource.getArtifactId() == null) { throw new MojoExecutionException( MessageFormat .format("Dependency resource [{0}] does not define the artifactId.", dependencyResource)); } if (dependencyResource.getType() == null) { throw new MojoExecutionException(MessageFormat.format( "Dependency resource [{0}] does not define the type.", dependencyResource)); } if (getProject().getDependencyManagement() != null) { @SuppressWarnings("unchecked") final List dependencies = getProject() .getDependencyManagement().getDependencies(); merge(dependencyResource, dependencies); } List dependencies = getProjectDependencies(); if (dependencies != null) { merge(dependencyResource, dependencies); } if (dependencyResource.getVersion() == null) { throw new MojoExecutionException(MessageFormat.format( "Dependency resource [{0}] does not define the version.", dependencyResource)); } try { @SuppressWarnings("unchecked") final Set artifacts = MavenMetadataSource .createArtifacts(getArtifactFactory(), Arrays.asList(dependencyResource), Artifact.SCOPE_RUNTIME, null, getProject()); if (artifacts.size() != 1) { getLog().error( MessageFormat .format("Resolved dependency resource [{0}] to artifacts [{1}].", dependencyResource, artifacts)); throw new MojoExecutionException(MessageFormat.format( "Could not create artifact for dependency [{0}].", dependencyResource)); } final Artifact artifact = artifacts.iterator().next(); getArtifactResolver().resolve(artifact, getProject().getRemoteArtifactRepositories(), getLocalRepository()); final String resource = dependencyResource.getResource(); if (resource == null) { throw new MojoExecutionException( MessageFormat .format("Dependency resource [{0}] does not define the resource.", dependencyResource)); } final URL resourceURL = createArtifactResourceUrl(artifact, resource); getLog().debug( MessageFormat .format("Resolved dependency resource [{0}] to resource URL [{1}].", dependencyResource, resourceURL)); return resourceURL; } catch (ArtifactNotFoundException anfex) { throw new MojoExecutionException(MessageFormat.format( "Could not find artifact for dependency [{0}].", dependencyResource)); } catch (InvalidDependencyVersionException e) { throw new MojoExecutionException(MessageFormat.format( "Invalid version of dependency [{0}].", dependencyResource)); } catch (ArtifactResolutionException e) { throw new MojoExecutionException(MessageFormat.format( "Could not resolver artifact for dependency [{0}].", dependencyResource)); } } private URL createArtifactResourceUrl(final Artifact artifact, String resource) throws MojoExecutionException { final File artifactFile = artifact.getFile(); if (artifactFile.isDirectory()) { final File resourceFile = new File(artifactFile, resource); try { return resourceFile.toURI().toURL(); } catch (MalformedURLException murlex) { throw new MojoExecutionException( MessageFormat .format("Could not create an URL for dependency directory [{0}] and resource [{1}].", artifactFile, resource)); } } else { try { return new URL("jar:" + artifactFile.toURI().toURL().toExternalForm() + "!/" + resource); } catch (MalformedURLException murlex) { throw new MojoExecutionException( MessageFormat .format("Could not create an URL for dependency file [{0}] and resource [{1}].", artifactFile, resource)); } } } private URI createUri(String uriString) throws MojoExecutionException { try { final URI uri = new URI(uriString); return uri; } catch (URISyntaxException urisex) { throw new MojoExecutionException(MessageFormat.format( "Could not create the URI from string [{0}].", uriString), urisex); } } private List createFileSetUris(final FileSet fileset, String defaultDirectory, String[] defaultIncludes, String defaultExcludes[]) throws MojoExecutionException { final String draftDirectory = fileset.getDirectory(); final String directory = draftDirectory == null ? defaultDirectory : draftDirectory; final List includes; @SuppressWarnings("unchecked") final List draftIncludes = (List) fileset.getIncludes(); if (draftIncludes == null || draftIncludes.isEmpty()) { includes = defaultIncludes == null ? Collections . emptyList() : Arrays.asList(defaultIncludes); } else { includes = draftIncludes; } final List excludes; @SuppressWarnings("unchecked") final List draftExcludes = (List) fileset.getExcludes(); if (draftExcludes == null || draftExcludes.isEmpty()) { excludes = defaultExcludes == null ? Collections . emptyList() : Arrays.asList(defaultExcludes); } else { excludes = draftExcludes; } String[] includesArray = includes.toArray(new String[includes.size()]); String[] excludesArray = excludes.toArray(new String[excludes.size()]); try { final List files = IOUtils.scanDirectoryForFiles( getBuildContext(), new File(directory), includesArray, excludesArray, !getDisableDefaultExcludes()); final List uris = new ArrayList(files.size()); for (final File file : files) { // try { final URI uri = file.toURI(); uris.add(uri); // } catch (MalformedURLException murlex) { // throw new MojoExecutionException( // MessageFormat.format( // "Could not create an URL for the file [{0}].", // file), murlex); // } } return uris; } catch (IOException ioex) { throw new MojoExecutionException( MessageFormat .format("Could not scan directory [{0}] for files with inclusion [{1}] and exclusion [{2}].", directory, includes, excludes)); } } private void merge(Dependency dependency, final List managedDependencies) { for (Dependency managedDependency : managedDependencies) { if (dependency.getManagementKey().equals( managedDependency.getManagementKey())) { ArtifactUtils.mergeDependencyWithDefaults(dependency, managedDependency); } } } protected abstract OptionsFactory getOptionsFactory(); protected void cleanPackageDirectory(final File packageDirectory) { final File[] files = packageDirectory.listFiles(new FileFilter() { // @Override public boolean accept(File file) { return file.isFile(); } }); if (files != null) { for (File file : files) { file.delete(); } } } } maven-jaxb2-plugin-0.15.1/plugin-core/src/main/java/org/jvnet/jaxb2/maven2/DependencyResource.java000066400000000000000000000075521423155634000326440ustar00rootroot00000000000000package org.jvnet.jaxb2.maven2; import java.text.MessageFormat; import org.apache.maven.artifact.Artifact; import org.apache.maven.model.Dependency; import org.jvnet.jaxb2.maven2.resolver.tools.MavenCatalogResolver; import org.jvnet.jaxb2.maven2.util.StringUtils; public class DependencyResource extends Dependency { private static final long serialVersionUID = -7680130645800522100L; private String resource; public String getResource() { return resource; } public void setResource(String resource) { this.resource = resource; } public DependencyResource() { setScope(Artifact.SCOPE_RUNTIME); } public String toString() { return "Dependency {groupId=" + getGroupId() + ", artifactId=" + getArtifactId() + ", version=" + getVersion() + ", type=" + getType() + ", classifier=" + getClassifier() + ", resource=" + getResource() + "}"; } private String systemId; public void setSystemId(String systemId) { this.systemId = systemId; } public String getSystemId() { if (this.systemId != null) { return this.systemId; } else { // maven:groupId:artifactId:type:classifier:version!/resource/path/in/jar/schema.xsd StringBuilder sb = new StringBuilder(); sb.append(MavenCatalogResolver.URI_SCHEME_MAVEN).append(':'); sb.append(getGroupId()).append(':'); sb.append(getArtifactId()).append(':'); sb.append(getType() == null ? "" : getType()).append(':'); sb.append(getClassifier() == null ? "" : getClassifier()).append( ':'); sb.append(getVersion() == null ? "" : getVersion()); sb.append("!/"); sb.append(getResource()); return sb.toString(); } } public static DependencyResource valueOf(String value) throws IllegalArgumentException { final String resourceDelimiter = "!/"; final int resourceDelimiterPosition = value.indexOf(resourceDelimiter); final String dependencyPart; final String resource; if (resourceDelimiterPosition == -1) { dependencyPart = value; resource = ""; } else { dependencyPart = value.substring(0, resourceDelimiterPosition); resource = value.substring(resourceDelimiterPosition + resourceDelimiter.length()); } final String[] dependencyParts = StringUtils.split(dependencyPart, ':', true); if (dependencyParts.length < 2) { throw new IllegalArgumentException( MessageFormat .format("Error parsing dependency descriptor [{0}], both groupId and artifactId must be specified.", dependencyPart)); } if (dependencyParts.length > 5) { throw new IllegalArgumentException( MessageFormat .format("Error parsing dependency descriptor [{0}], it contains too many parts.", dependencyPart)); } final String groupId = dependencyParts[0]; final String artifactId = dependencyParts[1]; final String version; final String type; if (dependencyParts.length > 2) { type = (dependencyParts[2] == null || dependencyParts[2].length() == 0) ? null : dependencyParts[2]; } else { type = null; } final String classifier; if (dependencyParts.length > 3) { classifier = (dependencyParts[3] == null || dependencyParts[3] .length() == 0) ? null : dependencyParts[3]; } else { classifier = null; } if (dependencyParts.length > 4) { version = (dependencyParts[4] == null || dependencyParts[4] .length() == 0) ? null : dependencyParts[4]; } else { version = null; } final DependencyResource dependencyResource = new DependencyResource(); dependencyResource.setGroupId(groupId); dependencyResource.setArtifactId(artifactId); if (version != null) { dependencyResource.setVersion(version); } if (type != null) { dependencyResource.setType(type); } if (classifier != null) { dependencyResource.setClassifier(classifier); } if (resource != null) { dependencyResource.setResource(resource); } dependencyResource.setSystemId(value); return dependencyResource; } } DependencyResourceResolver.java000066400000000000000000000004321423155634000342750ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/main/java/org/jvnet/jaxb2/maven2package org.jvnet.jaxb2.maven2; import java.net.URL; import org.apache.maven.plugin.MojoExecutionException; public interface DependencyResourceResolver { public URL resolveDependencyResource(DependencyResource dependencyResource) throws MojoExecutionException; } maven-jaxb2-plugin-0.15.1/plugin-core/src/main/java/org/jvnet/jaxb2/maven2/OptionsConfiguration.java000066400000000000000000000135051423155634000332340ustar00rootroot00000000000000package org.jvnet.jaxb2.maven2; import java.io.File; import java.net.URL; import java.text.MessageFormat; import java.util.ArrayList; import java.util.List; import org.xml.sax.EntityResolver; import org.xml.sax.InputSource; public class OptionsConfiguration { private final String encoding; private final String schemaLanguage; private List grammars; private List bindFiles; private final EntityResolver entityResolver; private final String generatePackage; private final File generateDirectory; private final boolean readOnly; private final boolean packageLevelAnnotations; private final boolean noFileHeader; private final boolean enableIntrospection; private final boolean disableXmlSecurity; private final String accessExternalSchema; private final String accessExternalDTD; private final boolean enableExternalEntityProcessing; private final boolean contentForWildcard; private final boolean extension; private final boolean strict; private final boolean verbose; private final boolean debugMode; private final List arguments; private final List plugins; private final String specVersion; public OptionsConfiguration(String encoding, String schemaLanguage, List grammars, List bindFiles, EntityResolver entityResolver, String generatePackage, File generateDirectory, boolean readOnly, boolean packageLevelAnnotations, boolean noFileHeader, boolean enableIntrospection, boolean disableXmlSecurity, String accessExternalSchema, String accessExternalDTD, boolean enableExternalEntityProcessing, boolean contentForWildcard, boolean extension, boolean strict, boolean verbose, boolean debugMode, List arguments, List plugins, String specVersion) { super(); this.encoding = encoding; this.schemaLanguage = schemaLanguage; this.grammars = grammars; this.bindFiles = bindFiles; this.entityResolver = entityResolver; this.generatePackage = generatePackage; this.generateDirectory = generateDirectory; this.readOnly = readOnly; this.packageLevelAnnotations = packageLevelAnnotations; this.noFileHeader = noFileHeader; this.enableIntrospection = enableIntrospection; this.disableXmlSecurity = disableXmlSecurity; this.accessExternalSchema = accessExternalSchema; this.accessExternalDTD = accessExternalDTD; this.enableExternalEntityProcessing = enableExternalEntityProcessing; this.contentForWildcard = contentForWildcard; this.extension = extension; this.strict = strict; this.verbose = verbose; this.debugMode = debugMode; this.arguments = arguments; this.plugins = plugins; this.specVersion = specVersion; } public String getEncoding() { return encoding; } public String getSchemaLanguage() { return schemaLanguage; } public List getGrammars() { return grammars; } public List getBindFiles() { return bindFiles; } public EntityResolver getEntityResolver() { return entityResolver; } public String getGeneratePackage() { return generatePackage; } public File getGenerateDirectory() { return generateDirectory; } public boolean isReadOnly() { return readOnly; } public boolean isPackageLevelAnnotations() { return packageLevelAnnotations; } public boolean isNoFileHeader() { return noFileHeader; } public boolean isEnableIntrospection() { return enableIntrospection; } public boolean isDisableXmlSecurity() { return disableXmlSecurity; } public String getAccessExternalSchema() { return accessExternalSchema; } public String getAccessExternalDTD() { return accessExternalDTD; } public boolean isEnableExternalEntityProcessing() { return enableExternalEntityProcessing; } public boolean isContentForWildcard() { return contentForWildcard; } public boolean isExtension() { return extension; } public boolean isStrict() { return strict; } public boolean isVerbose() { return verbose; } public boolean isDebugMode() { return debugMode; } public List getArguments() { return arguments; } public String getSpecVersion() { return specVersion; } public List getPlugins() { return plugins; } @Override public String toString() { return MessageFormat.format( "OptionsConfiguration [" + // "specVersion={0}\n " + // "generateDirectory={1}\n " + // "generatePackage={2}\n " + // "schemaLanguage={3}\n " + // "grammars.systemIds={4}\n " + // "bindFiles.systemIds={5}\n " + // "plugins={6}\n " + // "readOnly={7}\n " + // "packageLevelAnnotations={8}\n " + // "noFileHeader={9}\n " + // "enableIntrospection={10}\n " + // "disableXmlSecurity={11}\n " + // "accessExternalSchema={12}\n " + // "accessExternalDTD={13}\n " + // "contentForWildcard={14}\n " + // "extension={15}\n " + // "strict={16}\n " + // "verbose={17}\n " + // "debugMode={18}\n " + // "arguments={19}" + // "]", // 0 specVersion, generateDirectory, generatePackage, schemaLanguage, getSystemIds(grammars), // 5 getSystemIds(bindFiles), plugins, readOnly, packageLevelAnnotations, noFileHeader, // 10 enableIntrospection, disableXmlSecurity, accessExternalSchema, accessExternalDTD, contentForWildcard, // 15 extension, strict, verbose, debugMode, arguments); } private List getSystemIds(List inputSources) { if (inputSources == null) { return null; } else { final List systemIds = new ArrayList( inputSources.size()); for (InputSource inputSource : inputSources) { systemIds.add(inputSource == null ? null : inputSource .getSystemId()); } return systemIds; } } } maven-jaxb2-plugin-0.15.1/plugin-core/src/main/java/org/jvnet/jaxb2/maven2/OptionsFactory.java000066400000000000000000000003611423155634000320300ustar00rootroot00000000000000package org.jvnet.jaxb2.maven2; import org.apache.maven.plugin.MojoExecutionException; public interface OptionsFactory { public O createOptions(OptionsConfiguration optionsConfiguration) throws MojoExecutionException; } ParentFirstClassLoader.java000066400000000000000000000034651423155634000333540ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/main/java/org/jvnet/jaxb2/maven2/* * Copyright [2006] java.net * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.jvnet.jaxb2.maven2; import java.net.URL; import java.net.URLClassLoader; public class ParentFirstClassLoader extends URLClassLoader { public ParentFirstClassLoader(URL[] urls) { super(urls); } public ParentFirstClassLoader(URL[] urls, ClassLoader parent) { super(urls, parent); } public void addURL(URL url) { super.addURL(url); } public Class loadClass(String name) throws ClassNotFoundException { return loadClass(name, false); } protected Class loadClass(String name, boolean resolve) throws ClassNotFoundException { // First, check if the class has already been loaded @SuppressWarnings("rawtypes") Class c = findLoadedClass(name); // if not loaded, search the system class loader if (c == null) { try { c = getSystemClassLoader().loadClass(name); } catch (ClassNotFoundException cnfe) { // ignore } } // then the parent class loader if (c == null) { try { c = getParent().loadClass(name); } catch (ClassNotFoundException cnfe) { } } // then the child class loader if (c == null) { try { c = findClass(name); } catch (ClassNotFoundException cnfe) { throw cnfe; } } if (resolve) { resolveClass(c); } return c; } }maven-jaxb2-plugin-0.15.1/plugin-core/src/main/java/org/jvnet/jaxb2/maven2/RawXJC2Mojo.java000066400000000000000000001257761423155634000310740ustar00rootroot00000000000000/* * Copyright [2006] java.net * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.jvnet.jaxb2.maven2; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.net.URISyntaxException; import java.net.URL; import java.text.MessageFormat; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.Enumeration; import java.util.LinkedHashSet; import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.TreeMap; import java.util.jar.JarEntry; import java.util.jar.JarFile; import javax.xml.bind.annotation.XmlSchema; import javax.xml.transform.OutputKeys; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerException; import javax.xml.transform.TransformerFactory; import javax.xml.transform.dom.DOMResult; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; import javax.xml.transform.stream.StreamSource; import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.DefaultArtifact; import org.apache.maven.artifact.resolver.ArtifactNotFoundException; import org.apache.maven.artifact.resolver.ArtifactResolutionException; import org.apache.maven.artifact.resolver.filter.AndArtifactFilter; import org.apache.maven.artifact.resolver.filter.ArtifactFilter; import org.apache.maven.artifact.resolver.filter.ScopeArtifactFilter; import org.apache.maven.artifact.resolver.filter.TypeArtifactFilter; import org.apache.maven.model.Dependency; import org.apache.maven.model.DependencyManagement; import org.apache.maven.model.Resource; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.project.artifact.InvalidDependencyVersionException; import org.apache.maven.settings.Proxy; import org.apache.maven.settings.Settings; import org.codehaus.plexus.util.FileUtils; import org.codehaus.plexus.util.IOUtil; import org.jvnet.jaxb2.maven2.net.CompositeURILastModifiedResolver; import org.jvnet.jaxb2.maven2.net.FileURILastModifiedResolver; import org.jvnet.jaxb2.maven2.net.URILastModifiedResolver; import org.jvnet.jaxb2.maven2.resolver.tools.MavenCatalogResolver; import org.jvnet.jaxb2.maven2.resolver.tools.ReResolvingEntityResolverWrapper; import org.jvnet.jaxb2.maven2.util.ArtifactUtils; import org.jvnet.jaxb2.maven2.util.CollectionUtils; import org.jvnet.jaxb2.maven2.util.CollectionUtils.Function; import org.jvnet.jaxb2.maven2.util.IOUtils; import org.jvnet.jaxb2.maven2.util.LocaleUtils; import org.sonatype.plexus.build.incremental.BuildContext; import org.xml.sax.EntityResolver; import org.xml.sax.InputSource; import org.xml.sax.SAXException; import com.sun.org.apache.xml.internal.resolver.CatalogManager; import com.sun.org.apache.xml.internal.resolver.tools.CatalogResolver; import com.sun.xml.txw2.annotation.XmlNamespace; /** * Maven JAXB 2.x Mojo. * * @author Aleksei Valikov (valikov@gmx.net) */ public abstract class RawXJC2Mojo extends AbstractXJC2Mojo { private static final String JAXB_NSURI = "http://java.sun.com/xml/ns/jaxb"; public static final String ADD_IF_EXISTS_TO_EPISODE_SCHEMA_BINDINGS_TRANSFORMATION_RESOURCE_NAME = "/" + RawXJC2Mojo.class.getPackage().getName().replace('.', '/') + "/addIfExistsToEpisodeSchemaBindings.xslt"; private Collection xjcPluginArtifacts; private Collection xjcPluginFiles; private List xjcPluginURLs; public Collection getXjcPluginArtifacts() { return xjcPluginArtifacts; } public Collection getXjcPluginFiles() { return xjcPluginFiles; } public List getXjcPluginURLs() { return xjcPluginURLs; } private Collection episodeArtifacts; private Collection episodeFiles; public Collection getEpisodeArtifacts() { return episodeArtifacts; } public Collection getEpisodeFiles() { return episodeFiles; } private List schemaFiles; public List getSchemaFiles() { return schemaFiles; } private List schemaURIs; protected List getSchemaURIs() { if (schemaURIs == null) { throw new IllegalStateException("Schema URIs were not set up yet."); } return schemaURIs; } private List resolvedSchemaURIs; protected List getResolvedSchemaURIs() { if (resolvedSchemaURIs == null) { throw new IllegalStateException("Resolved schema URIs were not set up yet."); } return resolvedSchemaURIs; } private List grammars; protected List getGrammars() { if (grammars == null) { throw new IllegalArgumentException("Grammars were not set up yet."); } return grammars; } private void setupSchemas() throws MojoExecutionException { this.schemaURIs = createSchemaURIs(); this.resolvedSchemaURIs = resolveURIs(getSchemaURIs()); this.grammars = createGrammars(); } private List createSchemaURIs() throws MojoExecutionException { final List schemaFiles = getSchemaFiles(); final List schemaURIs = new ArrayList(schemaFiles.size()); for (final File schemaFile : schemaFiles) { final URI schema = schemaFile.toURI(); schemaURIs.add(schema); } final ResourceEntry[] schemas = getSchemas(); if (schemas != null) { for (ResourceEntry resourceEntry : schemas) { schemaURIs.addAll(createResourceEntryUris(resourceEntry, getSchemaDirectory().getAbsolutePath(), getSchemaIncludes(), getSchemaExcludes())); } } return schemaURIs; } private List createGrammars() throws MojoExecutionException { try { final List schemaURIs = getSchemaURIs(); return getInputSources(schemaURIs); } catch (IOException ioex) { throw new MojoExecutionException("Could not resolve grammars.", ioex); } catch (SAXException ioex) { throw new MojoExecutionException("Could not resolve grammars.", ioex); } } private List bindingFiles; public List getBindingFiles() { return bindingFiles; } private List bindingURIs; protected List getBindingURIs() { if (bindingURIs == null) { throw new IllegalStateException("Binding URIs were not set up yet."); } return bindingURIs; } private List resolvedBindingURIs; protected List getResolvedBindingURIs() { if (resolvedBindingURIs == null) { throw new IllegalStateException("Resolved binding URIs were not set up yet."); } return resolvedBindingURIs; } private List bindFiles; protected List getBindFiles() { if (bindFiles == null) { throw new IllegalStateException("BindFiles were not set up yet."); } return bindFiles; } private void setupBindings() throws MojoExecutionException { this.bindingURIs = createBindingURIs(); this.resolvedBindingURIs = resolveURIs(getBindingURIs()); this.bindFiles = createBindFiles(); } protected List createBindingURIs() throws MojoExecutionException { final List bindingFiles = new LinkedList(); bindingFiles.addAll(getBindingFiles()); for (final File episodeFile : getEpisodeFiles()) { getLog().debug(MessageFormat.format("Checking episode file [{0}].", episodeFile.getAbsolutePath())); if (episodeFile.isDirectory()) { final File episodeMetaInfFile = new File(episodeFile, "META-INF"); if (episodeMetaInfFile.isDirectory()) { final File episodeBindingsFile = new File(episodeMetaInfFile, "sun-jaxb.episode"); if (episodeBindingsFile.isFile()) { bindingFiles.add(episodeBindingsFile); } } } } final List bindingUris = new ArrayList(bindingFiles.size()); for (final File bindingFile : bindingFiles) { URI uri; // try { uri = bindingFile.toURI(); bindingUris.add(uri); // } catch (MalformedURLException murlex) { // throw new MojoExecutionException( // MessageFormat.format( // "Could not create a binding URL for the binding file [{0}].", // bindingFile), murlex); // } } if (getBindings() != null) { for (ResourceEntry resourceEntry : getBindings()) { bindingUris.addAll(createResourceEntryUris(resourceEntry, getBindingDirectory().getAbsolutePath(), getBindingIncludes(), getBindingExcludes())); } } if (getScanDependenciesForBindings()) { collectBindingUrisFromDependencies(bindingUris); } return bindingUris; } private List createBindFiles() throws MojoExecutionException { try { final List bindingURIs = getBindingURIs(); return getInputSources(bindingURIs); } catch (IOException ioex) { throw new MojoExecutionException("Could not resolve binding files.", ioex); } catch (SAXException ioex) { throw new MojoExecutionException("Could not resolve binding files.", ioex); } } private List dependsURIs; public List getDependsURIs() { return dependsURIs; } private List producesURIs; public List getProducesURIs() { return producesURIs; } private static final Object lock = new Object(); /** * Execute the maven2 mojo to invoke the xjc2 compiler based on any * configuration settings. */ public void execute() throws MojoExecutionException { synchronized (lock) { injectDependencyDefaults(); resolveArtifacts(); // Install project dependencies into classloader's class path // and execute xjc2. final ClassLoader currentClassLoader = Thread.currentThread().getContextClassLoader(); final ClassLoader classLoader = createClassLoader(currentClassLoader); Thread.currentThread().setContextClassLoader(classLoader); final Locale currentDefaultLocale = Locale.getDefault(); try { final Locale locale = LocaleUtils.valueOf(getLocale()); Locale.setDefault(locale); // doExecute(); } finally { Locale.setDefault(currentDefaultLocale); // Set back the old classloader Thread.currentThread().setContextClassLoader(currentClassLoader); } } } /** * ************************************************************************* * */ protected void injectDependencyDefaults() { injectDependencyDefaults(getPlugins()); injectDependencyDefaults(getEpisodes()); } @SuppressWarnings("unchecked") protected void injectDependencyDefaults(Dependency[] dependencies) { if (dependencies != null) { final Map dependencyMap = new TreeMap(); for (final Dependency dependency : dependencies) { if (dependency.getScope() == null) { dependency.setScope(Artifact.SCOPE_RUNTIME); } dependencyMap.put(dependency.getManagementKey(), dependency); } final DependencyManagement dependencyManagement = getProject().getDependencyManagement(); if (dependencyManagement != null) { merge(dependencyMap, dependencyManagement.getDependencies()); } merge(dependencyMap, getProjectDependencies()); } } private void merge(final Map dependencyMap, final List managedDependencies) { for (final Dependency managedDependency : managedDependencies) { final String key = managedDependency.getManagementKey(); final Dependency dependency = (Dependency) dependencyMap.get(key); if (dependency != null) { ArtifactUtils.mergeDependencyWithDefaults(dependency, managedDependency); } } } protected void resolveArtifacts() throws MojoExecutionException { try { resolveXJCPluginArtifacts(); resolveEpisodeArtifacts(); } catch (ArtifactResolutionException arex) { throw new MojoExecutionException("Could not resolve the artifact.", arex); } catch (ArtifactNotFoundException anfex) { throw new MojoExecutionException("Artifact not found.", anfex); } catch (InvalidDependencyVersionException idvex) { throw new MojoExecutionException("Invalid dependency version.", idvex); } } protected void resolveXJCPluginArtifacts() throws ArtifactResolutionException, ArtifactNotFoundException, InvalidDependencyVersionException { this.xjcPluginArtifacts = ArtifactUtils.resolveTransitively(getArtifactFactory(), getArtifactResolver(), getLocalRepository(), getArtifactMetadataSource(), getPlugins(), getProject()); this.xjcPluginFiles = ArtifactUtils.getFiles(this.xjcPluginArtifacts); this.xjcPluginURLs = CollectionUtils.apply(this.xjcPluginFiles, IOUtils.GET_URL); } protected void resolveEpisodeArtifacts() throws ArtifactResolutionException, ArtifactNotFoundException, InvalidDependencyVersionException { this.episodeArtifacts = new LinkedHashSet(); { final Collection episodeArtifacts = ArtifactUtils.resolve(getArtifactFactory(), getArtifactResolver(), getLocalRepository(), getArtifactMetadataSource(), getEpisodes(), getProject()); this.episodeArtifacts.addAll(episodeArtifacts); } { if (getUseDependenciesAsEpisodes()) { @SuppressWarnings("unchecked") final Collection projectArtifacts = getProject().getArtifacts(); final AndArtifactFilter filter = new AndArtifactFilter(); filter.add(new ScopeArtifactFilter(DefaultArtifact.SCOPE_COMPILE)); filter.add(new TypeArtifactFilter("jar")); for (Artifact artifact : projectArtifacts) { if (filter.include(artifact)) { this.episodeArtifacts.add(artifact); } } } } this.episodeFiles = ArtifactUtils.getFiles(this.episodeArtifacts); } protected ClassLoader createClassLoader(ClassLoader parent) { final Collection xjcPluginURLs = getXjcPluginURLs(); return new ParentFirstClassLoader(xjcPluginURLs.toArray(new URL[xjcPluginURLs.size()]), parent); } protected void doExecute() throws MojoExecutionException { setupLogging(); if (getVerbose()) getLog().info("Started execution."); setupBindInfoPackage(); setupEpisodePackage(); setupMavenPaths(); setupCatalogResolver(); setupEntityResolver(); setupSchemaFiles(); setupBindingFiles(); setupSchemas(); setupBindings(); setupDependsURIs(); setupProducesURIs(); setupURILastModifiedResolver(); if (getVerbose()) { logConfiguration(); } final OptionsConfiguration optionsConfiguration = createOptionsConfiguration(); if (getVerbose()) { getLog().info("optionsConfiguration:" + optionsConfiguration); } checkCatalogsInStrictMode(); if (getGrammars().isEmpty()) { getLog().warn("No schemas to compile. Skipping XJC execution. "); } else { final O options = getOptionsFactory().createOptions(optionsConfiguration); if (getForceRegenerate()) { getLog().warn("You are using forceRegenerate=true in your configuration.\n" + "This configuration setting is deprecated and not recommended " + "as it causes problems with incremental builds in IDEs.\n" + "Please refer to the following link for more information:\n" + "https://github.com/highsource/maven-jaxb2-plugin/wiki/Do-Not-Use-forceRegenerate\n" + "Consider removing this setting from your plugin configuration.\n"); getLog().info("The [forceRegenerate] switch is turned on, XJC will be executed."); } else { final boolean isUpToDate = isUpToDate(); if (!isUpToDate) { getLog().info("Sources are not up-to-date, XJC will be executed."); } else { getLog().info("Sources are up-to-date, XJC will be skipped."); return; } } setupDirectories(); doExecute(options); addIfExistsToEpisodeSchemaBindings(); final BuildContext buildContext = getBuildContext(); getLog().debug(MessageFormat.format("Refreshing the generated directory [{0}].", getGenerateDirectory().getAbsolutePath())); buildContext.refresh(getGenerateDirectory()); } if (getVerbose()) { getLog().info("Finished execution."); } } private void setupBindInfoPackage() { String packageInfoClassName = "com.sun.tools.xjc.reader.xmlschema.bindinfo.package-info"; try { final Class packageInfoClass = Class.forName(packageInfoClassName); final XmlSchema xmlSchema = packageInfoClass.getAnnotation(XmlSchema.class); if (xmlSchema == null) { getLog().warn(MessageFormat.format( "Class [{0}] is missing the [{1}] annotation. Processing bindings will probably fail.", packageInfoClassName, XmlSchema.class.getName())); } else { final String namespace = xmlSchema.namespace(); if (!JAXB_NSURI.equals(namespace)) { getLog().warn(MessageFormat.format( "Namespace of the [{0}] annotation is [{1}] and does not match [{2}]. Processing bindings will probably fail.", namespace, XmlSchema.class.getName(), JAXB_NSURI)); } } } catch (ClassNotFoundException cnfex) { getLog().warn( MessageFormat.format("Class [{0}] could not be found. Processing bindings will probably faile.", packageInfoClassName), cnfex); } } private void setupEpisodePackage() { String packageInfoClassName = "com.sun.xml.bind.v2.schemagen.episode.package-info"; try { final Class packageInfoClass = Class.forName(packageInfoClassName); final XmlNamespace xmlNamespace = packageInfoClass.getAnnotation(XmlNamespace.class); if (xmlNamespace == null) { getLog().warn(MessageFormat.format( "Class [{0}] is missing the [{1}] annotation. Processing bindings will probably fail.", packageInfoClassName, XmlNamespace.class.getName())); } else { final String namespace = xmlNamespace.value(); if (!JAXB_NSURI.equals(namespace)) { getLog().warn(MessageFormat.format( "Namespace of the [{0}] annotation is [{1}] and does not match [{2}]. Processing bindings will probably fail.", XmlNamespace.class.getName(), namespace, JAXB_NSURI)); } } } catch (ClassNotFoundException cnfex) { getLog().warn( MessageFormat.format("Class [{0}] could not be found. Processing bindings will probably faile.", packageInfoClassName), cnfex); } } private void addIfExistsToEpisodeSchemaBindings() throws MojoExecutionException { if (!getEpisode() || !isAddIfExistsToEpisodeSchemaBindings()) { return; } final File episodeFile = getEpisodeFile(); if (!episodeFile.canWrite()) { getLog().warn(MessageFormat .format("Episode file [{0}] is not writable, could not add if-exists attributes.", episodeFile)); return; } InputStream is = null; try { final TransformerFactory transformerFactory = TransformerFactory.newInstance(); is = getClass().getResourceAsStream(ADD_IF_EXISTS_TO_EPISODE_SCHEMA_BINDINGS_TRANSFORMATION_RESOURCE_NAME); final Transformer addIfExistsToEpisodeSchemaBindingsTransformer = transformerFactory .newTransformer(new StreamSource(is)); final DOMResult result = new DOMResult(); addIfExistsToEpisodeSchemaBindingsTransformer.transform(new StreamSource(episodeFile), result); final DOMSource source = new DOMSource(result.getNode()); final Transformer identityTransformer = transformerFactory.newTransformer(); identityTransformer.setOutputProperty(OutputKeys.INDENT, "yes"); identityTransformer.transform(source, new StreamResult(episodeFile)); getLog().info(MessageFormat.format("Episode file [{0}] was augmented with if-exists=\"true\" attributes.", episodeFile)); } catch (TransformerException e) { throw new MojoExecutionException(MessageFormat.format( "Error augmenting the episode file [{0}] with if-exists=\"true\" attributes. Transformation failed with an unexpected error.", episodeFile), e); } finally { IOUtil.close(is); } } private URILastModifiedResolver uriLastModifiedResolver; private void setupURILastModifiedResolver() { this.uriLastModifiedResolver = new CompositeURILastModifiedResolver(getLog()); } protected URILastModifiedResolver getURILastModifiedResolver() { if (uriLastModifiedResolver == null) { throw new IllegalStateException("URILastModifiedResolver was not set up yet."); } return uriLastModifiedResolver; } private void checkCatalogsInStrictMode() { if (getStrict() && !getCatalogURIs().isEmpty()) { getLog().warn("The plugin is configured to use catalogs and strict mode at the same time.\n" + "Using catalogs to resolve schema URIs in strict mode is known to be problematic and may fail.\n" + "Please refer to the following link for more information:\n" + "https://github.com/highsource/maven-jaxb2-plugin/wiki/Catalogs-in-Strict-Mode\n" + "Consider setting false in your plugin configuration.\n"); } } public abstract void doExecute(O options) throws MojoExecutionException; /** * Initializes logging. If Maven is run in debug mode (that is, debug level is * enabled in the log), turn on the verbose mode in Mojo. Further on, if vebose * mode is on, set the com.sun.tools.xjc.Options.findServices * system property on to enable debuggin of XJC plugins. * */ protected void setupLogging() { setVerbose(getVerbose() || getLog().isDebugEnabled()); if (getVerbose()) { System.setProperty("com.sun.tools.xjc.Options.findServices", "true"); } } /** * Augments Maven paths with generated resources. */ protected void setupMavenPaths() { if (getAddCompileSourceRoot()) { getProject().addCompileSourceRoot(getGenerateDirectory().getPath()); } if (getAddTestCompileSourceRoot()) { getProject().addTestCompileSourceRoot(getGenerateDirectory().getPath()); } if (getEpisode() && getEpisodeFile() != null) { final String episodeFilePath = getEpisodeFile().getAbsolutePath(); final String generatedDirectoryPath = getGenerateDirectory().getAbsolutePath(); if (episodeFilePath.startsWith(generatedDirectoryPath + File.separator)) { final String path = episodeFilePath.substring(generatedDirectoryPath.length() + 1); final Resource resource = new Resource(); resource.setDirectory(generatedDirectoryPath); resource.addInclude(path); if (getAddCompileSourceRoot()) { getProject().addResource(resource); } if (getAddTestCompileSourceRoot()) { getProject().addTestResource(resource); } } } } protected void setupDirectories() { final File generateDirectory = getGenerateDirectory(); if (getRemoveOldOutput() && generateDirectory.exists()) { try { FileUtils.deleteDirectory(this.getGenerateDirectory()); } catch (IOException ex) { getLog().warn("Failed to remove old generateDirectory [" + generateDirectory + "].", ex); } } // Create the destination path if it does not exist. if (generateDirectory != null && !generateDirectory.exists()) { generateDirectory.mkdirs(); } final File episodeFile = getEpisodeFile(); if (getEpisode() && episodeFile != null) { final File parentFile = episodeFile.getParentFile(); parentFile.mkdirs(); } } protected void setupSchemaFiles() throws MojoExecutionException { try { final File schemaDirectory = getSchemaDirectory(); if (schemaDirectory == null || !schemaDirectory.exists()) { this.schemaFiles = Collections.emptyList(); } else if (schemaDirectory.isDirectory()) { this.schemaFiles = IOUtils.scanDirectoryForFiles(getBuildContext(), schemaDirectory, getSchemaIncludes(), getSchemaExcludes(), !getDisableDefaultExcludes()); } else { this.schemaFiles = Collections.emptyList(); getLog().warn( MessageFormat.format("Schema directory [{0}] is not a directory.", schemaDirectory.getPath())); } } catch (IOException ioex) { throw new MojoExecutionException("Could not set up schema files.", ioex); } } protected void setupBindingFiles() throws MojoExecutionException { try { final File bindingDirectory = getBindingDirectory(); if (bindingDirectory == null || !bindingDirectory.exists()) { this.bindingFiles = Collections.emptyList(); } else if (bindingDirectory.isDirectory()) { this.bindingFiles = IOUtils.scanDirectoryForFiles(getBuildContext(), bindingDirectory, getBindingIncludes(), getBindingExcludes(), !getDisableDefaultExcludes()); } else { this.bindingFiles = Collections.emptyList(); getLog().warn(MessageFormat.format("Binding directory [{0}] is not a directory.", bindingDirectory.getPath())); } } catch (IOException ioex) { throw new MojoExecutionException("Could not set up binding files.", ioex); } } protected void setupDependsURIs() throws MojoExecutionException { final List dependsURIs = new LinkedList(); dependsURIs.addAll(getResolvedCatalogURIs()); dependsURIs.addAll(getResolvedSchemaURIs()); dependsURIs.addAll(getResolvedBindingURIs()); final File projectFile = getProject().getFile(); if (projectFile != null) { dependsURIs.add(projectFile.toURI()); } if (getOtherDepends() != null) { getLog().warn( "Configuration element [otherDepends] is deprecated, please use [otherDependsIncludes] and [otherDependsExcludes] instead."); for (File file : getOtherDepends()) { if (file != null) { dependsURIs.add(file.toURI()); } } } if (getOtherDependsIncludes() != null) { try { List otherDependsFiles = IOUtils.scanDirectoryForFiles(getBuildContext(), getProject().getBasedir(), getOtherDependsIncludes(), getOtherDependsExcludes(), !getDisableDefaultExcludes()); for (File file : otherDependsFiles) { if (file != null) { dependsURIs.add(file.toURI()); } } } catch (IOException ioex) { throw new MojoExecutionException("Could not set up [otherDepends] files.", ioex); } } this.dependsURIs = dependsURIs; } private void setupProducesURIs() throws MojoExecutionException { this.producesURIs = createProducesURIs(); } protected List createProducesURIs() throws MojoExecutionException { final List producesURIs = new LinkedList(); try { final List producesFiles = IOUtils.scanDirectoryForFiles(getBuildContext(), getGenerateDirectory(), getProduces(), new String[0], !getDisableDefaultExcludes()); if (producesFiles != null) { for (File producesFile : producesFiles) { if (producesFile != null) { producesURIs.add(producesFile.toURI()); } } } return producesURIs; } catch (IOException ioex) { throw new MojoExecutionException("Could not set up produced files.", ioex); } } /** * Log the configuration settings. Shown when exception thrown or when verbose * is true. */ protected void logConfiguration() throws MojoExecutionException { super.logConfiguration(); // TODO clean up getLog().info("catalogURIs (calculated):" + getCatalogURIs()); getLog().info("resolvedCatalogURIs (calculated):" + getResolvedCatalogURIs()); getLog().info("schemaFiles (calculated):" + getSchemaFiles()); getLog().info("schemaURIs (calculated):" + getSchemaURIs()); getLog().info("resolvedSchemaURIs (calculated):" + getResolvedSchemaURIs()); getLog().info("bindingFiles (calculated):" + getBindingFiles()); getLog().info("bindingURIs (calculated):" + getBindingURIs()); getLog().info("resolvedBindingURIs (calculated):" + getResolvedBindingURIs()); getLog().info("xjcPluginArtifacts (resolved):" + getXjcPluginArtifacts()); getLog().info("xjcPluginFiles (resolved):" + getXjcPluginFiles()); getLog().info("xjcPluginURLs (resolved):" + getXjcPluginURLs()); getLog().info("episodeArtifacts (resolved):" + getEpisodeArtifacts()); getLog().info("episodeFiles (resolved):" + getEpisodeFiles()); getLog().info("dependsURIs (resolved):" + getDependsURIs()); } private void collectBindingUrisFromDependencies(List bindingUris) throws MojoExecutionException { @SuppressWarnings("unchecked") final Collection projectArtifacts = getProject().getArtifacts(); final List compileScopeArtifacts = new ArrayList(projectArtifacts.size()); final ArtifactFilter filter = new ScopeArtifactFilter(DefaultArtifact.SCOPE_COMPILE); for (Artifact artifact : projectArtifacts) { if (filter.include(artifact)) { compileScopeArtifacts.add(artifact); } } for (Artifact artifact : compileScopeArtifacts) { getLog().debug(MessageFormat.format("Scanning artifact [{0}] for JAXB binding files.", artifact)); collectBindingUrisFromArtifact(artifact.getFile(), bindingUris); } } void collectBindingUrisFromArtifact(File file, List bindingUris) throws MojoExecutionException { try (JarFile jarFile = new JarFile(file)) { final Enumeration jarFileEntries = jarFile.entries(); while (jarFileEntries.hasMoreElements()) { JarEntry entry = jarFileEntries.nextElement(); if (entry.getName().endsWith(".xjb")) { try { bindingUris.add(new URI("jar:" + file.toURI() + "!/" + entry.getName())); } catch (URISyntaxException urisex) { throw new MojoExecutionException(MessageFormat.format( "Could not create the URI of the binding file from [{0}]", entry.getName()), urisex); } } } } catch (IOException ioex) { throw new MojoExecutionException( "Unable to read the artifact JAR file [" + file.getAbsolutePath() + "].", ioex); } } private CatalogResolver catalogResolverInstance; private List catalogURIs; private List resolvedCatalogURIs; protected List getCatalogURIs() { if (catalogURIs == null) { throw new IllegalStateException("Catalog URIs were not set up yet."); } return catalogURIs; } protected List getResolvedCatalogURIs() { if (resolvedCatalogURIs == null) { throw new IllegalStateException("Resolved catalog URIs were not set up yet."); } return resolvedCatalogURIs; } protected CatalogResolver getCatalogResolverInstance() { if (catalogResolverInstance == null) { throw new IllegalStateException("Catalog resolver was not set up yet."); } return catalogResolverInstance; } private void setupCatalogResolver() throws MojoExecutionException { this.catalogResolverInstance = createCatalogResolver(); this.catalogURIs = createCatalogURIs(); this.resolvedCatalogURIs = resolveURIs(getCatalogURIs()); parseResolvedCatalogURIs(); } private EntityResolver entityResolver; protected EntityResolver getEntityResolver() { if (entityResolver == null) { throw new IllegalStateException("Entity resolver was not set up yet."); } return entityResolver; } private void setupEntityResolver() { this.entityResolver = createEntityResolver(getCatalogResolverInstance()); } protected EntityResolver createEntityResolver(CatalogResolver catalogResolver) { final EntityResolver entityResolver = new ReResolvingEntityResolverWrapper(catalogResolver); return entityResolver; } /** * Creates an instance of catalog resolver. * * @return Instance of the catalog resolver. * @throws MojoExecutionException * If catalog resolver cannot be instantiated. */ protected CatalogResolver createCatalogResolver() throws MojoExecutionException { final CatalogManager catalogManager = new CatalogManager(); catalogManager.setIgnoreMissingProperties(true); catalogManager.setUseStaticCatalog(false); // TODO Logging if (getLog().isDebugEnabled()) { catalogManager.setVerbosity(Integer.MAX_VALUE); } if (getCatalogResolver() == null) { return new MavenCatalogResolver(catalogManager, this, getLog()); } else { final String catalogResolverClassName = getCatalogResolver().trim(); return createCatalogResolverByClassName(catalogResolverClassName); } } private CatalogResolver createCatalogResolverByClassName(final String catalogResolverClassName) throws MojoExecutionException { try { final Class draftCatalogResolverClass = Thread.currentThread().getContextClassLoader() .loadClass(catalogResolverClassName); if (!CatalogResolver.class.isAssignableFrom(draftCatalogResolverClass)) { throw new MojoExecutionException( MessageFormat.format("Specified catalog resolver class [{0}] could not be casted to [{1}].", catalogResolver, CatalogResolver.class)); } else { @SuppressWarnings("unchecked") final Class catalogResolverClass = (Class) draftCatalogResolverClass; final CatalogResolver catalogResolverInstance = catalogResolverClass.newInstance(); return catalogResolverInstance; } } catch (ClassNotFoundException cnfex) { throw new MojoExecutionException( MessageFormat.format("Could not find specified catalog resolver class [{0}].", catalogResolver), cnfex); } catch (InstantiationException iex) { throw new MojoExecutionException( MessageFormat.format("Could not instantiate catalog resolver class [{0}].", catalogResolver), iex); } catch (IllegalAccessException iaex) { throw new MojoExecutionException( MessageFormat.format("Could not instantiate catalog resolver class [{0}].", catalogResolver), iaex); } } /** * @return true to indicate results are up-to-date, that is, when the latest * from input files is earlier than the younger from the output files * (meaning no re-execution required). */ protected boolean isUpToDate() { final List dependsURIs = getDependsURIs(); final List producesURIs = getProducesURIs(); getLog().debug(MessageFormat.format("Up-to-date check for source resources [{0}] and target resources [{1}].", dependsURIs, producesURIs)); boolean itIsKnownThatNoDependsURIsWereChanged = true; { for (URI dependsURI : dependsURIs) { if (FileURILastModifiedResolver.SCHEME.equalsIgnoreCase(dependsURI.getScheme())) { final File dependsFile = new File(dependsURI); if (getBuildContext().hasDelta(dependsFile)) { if (getVerbose()) { getLog().debug( MessageFormat.format("File [{0}] might have been changed since the last build.", dependsFile.getAbsolutePath())); } // It is known that something was changed. itIsKnownThatNoDependsURIsWereChanged = false; } } else { // If this is not a file URI, we can't be sure itIsKnownThatNoDependsURIsWereChanged = false; } } } if (itIsKnownThatNoDependsURIsWereChanged) { getLog().info("According to the build context, all of the [dependURIs] are up-to-date."); return true; } final Function LAST_MODIFIED = new Function() { public Long eval(URI uri) { return getURILastModifiedResolver().getLastModified(uri); } }; getLog().debug(MessageFormat.format("Checking the last modification timestamp of the source resources [{0}].", dependsURIs)); final Long dependsTimestamp = CollectionUtils.bestValue(dependsURIs, LAST_MODIFIED, CollectionUtils.gtWithNullAsGreatest()); getLog().debug(MessageFormat.format("Checking the last modification timestamp of the target resources [{0}].", producesURIs)); final Long producesTimestamp = CollectionUtils.bestValue(producesURIs, LAST_MODIFIED, CollectionUtils.ltWithNullAsSmallest()); if (dependsTimestamp == null) { getLog().debug("Latest timestamp of the source resources is unknown. Assuming that something was changed."); return false; } if (producesTimestamp == null) { getLog().debug(MessageFormat.format( "Latest Timestamp of the source resources is [{0,date,yyyy-MM-dd HH:mm:ss.SSS}], however the earliest timestamp of the target resources is unknown. Assuming that something was changed.", dependsTimestamp)); return false; } getLog().info(MessageFormat.format( "Latest timestamp of the source resources is [{0,date,yyyy-MM-dd HH:mm:ss.SSS}], earliest timestamp of the target resources is [{1,date,yyyy-MM-dd HH:mm:ss.SSS}].", dependsTimestamp, producesTimestamp)); final boolean upToDate = dependsTimestamp < producesTimestamp; return upToDate; } protected String getCustomHttpproxy() { final String proxyHost = getProxyHost(); final int proxyPort = getProxyPort(); final String proxyUsername = getProxyUsername(); final String proxyPassword = getProxyPassword(); return proxyHost != null ? createXJCProxyArgument(proxyHost, proxyPort, proxyUsername, proxyPassword) : null; } protected String getActiveProxyAsHttpproxy() { if (getSettings() == null) { return null; } final Settings settings = getSettings(); final Proxy activeProxy = settings.getActiveProxy(); if (activeProxy == null || activeProxy.getHost() == null) { return null; } return createXJCProxyArgument(activeProxy.getHost(), activeProxy.getPort(), activeProxy.getUsername(), activeProxy.getPassword()); } private String createXJCProxyArgument(String host, int port, String username, String password) { if (host == null) { if (port != -1) { getLog().warn( MessageFormat.format("Proxy port is configured to [{0,number,#}] but proxy host is missing. " + "Proxy port will be ignored.", port)); } if (username != null) { getLog().warn(MessageFormat.format("Proxy username is configured to [{0}] but proxy host is missing. " + "Proxy username will be ignored.", username)); } if (password != null) { getLog().warn(MessageFormat.format( "Proxy password is set but proxy host is missing. " + "Proxy password will be ignored.", password)); } return null; } else { // The XJC proxy argument should be on the form // [user[:password]@]proxyHost[:proxyPort] final StringBuilder proxyStringBuilder = new StringBuilder(); if (username != null) { // Start with the username. proxyStringBuilder.append(username); // Append the password if provided. if (password != null) { proxyStringBuilder.append(":").append(password); } proxyStringBuilder.append("@"); } else { if (password != null) { getLog().warn(MessageFormat.format( "Proxy password is set but proxy username is missing. " + "Proxy password will be ignored.", password)); } } // Append hostname and port. proxyStringBuilder.append(host); if (port != -1) { proxyStringBuilder.append(":").append(port); } return proxyStringBuilder.toString(); } } /** * Returns array of command line arguments for XJC. These arguments are based on * the configured arguments (see {@link #getArgs()}) but also include episode * arguments. * * @return String array of XJC command line options. */ protected List getArguments() { final List arguments = new ArrayList(getArgs()); final String httpproxy = getHttpproxy(); if (httpproxy != null) { arguments.add("-httpproxy"); arguments.add(httpproxy); } if (getEpisode() && getEpisodeFile() != null) { arguments.add("-episode"); arguments.add(getEpisodeFile().getAbsolutePath()); } if (getMarkGenerated()) { arguments.add("-mark-generated"); } for (final File episodeFile : getEpisodeFiles()) { if (episodeFile.isFile()) { arguments.add(episodeFile.getAbsolutePath()); } } return arguments; } protected String getHttpproxy() { final String httpproxy; final String activeHttpproxy = getActiveProxyAsHttpproxy(); final String customHttpproxy = getCustomHttpproxy(); if (isUseActiveProxyAsHttpproxy()) { if (customHttpproxy != null) { getLog().warn(MessageFormat.format( "Both [useActiveProxyAsHttpproxy=true] as well as custom proxy [{0}] are configured. " + "Please remove either [useActiveProxyAsHttpproxy=true] or custom proxy configuration.", customHttpproxy)); getLog().debug(MessageFormat.format("Using custom proxy [{0}].", customHttpproxy)); httpproxy = customHttpproxy; } else if (activeHttpproxy != null) { getLog().debug(MessageFormat.format("Using active proxy [{0}] from Maven settings.", activeHttpproxy)); httpproxy = activeHttpproxy; } else { getLog().warn(MessageFormat.format( "Configured [useActiveProxyAsHttpproxy=true] but no active proxy is configured in Maven settings. " + "Please configure an active proxy in Maven settings or remove [useActiveProxyAsHttpproxy=true].", customHttpproxy)); httpproxy = activeHttpproxy; } } else { if (customHttpproxy != null) { getLog().debug(MessageFormat.format("Using custom proxy [{0}].", customHttpproxy)); httpproxy = customHttpproxy; } else { httpproxy = null; } } return httpproxy; } public OptionsConfiguration createOptionsConfiguration() throws MojoExecutionException { final OptionsConfiguration optionsConfiguration = new OptionsConfiguration(getEncoding(), getSchemaLanguage(), getGrammars(), getBindFiles(), getEntityResolver(), getGeneratePackage(), getGenerateDirectory(), getReadOnly(), getPackageLevelAnnotations(), getNoFileHeader(), getEnableIntrospection(), getDisableXmlSecurity(), getAccessExternalSchema(), getAccessExternalDTD(), isEnableExternalEntityProcessing(), getContentForWildcard(), getExtension(), getStrict(), getVerbose(), getDebug(), getArguments(), getXjcPluginURLs(), getSpecVersion()); return optionsConfiguration; } private List resolveURIs(final List uris) { final List resolvedURIs = new ArrayList(uris.size()); for (URI uri : uris) { final String URI = getCatalogResolverInstance().getResolvedEntity(null, uri.toString()); if (URI != null) { try { uri = new URI(URI); } catch (URISyntaxException ignored) { } } resolvedURIs.add(uri); } return resolvedURIs; } private void parseResolvedCatalogURIs() throws MojoExecutionException { for (URI catalogURI : getResolvedCatalogURIs()) { if (catalogURI != null) { try { getCatalogResolverInstance().getCatalog().parseCatalog(catalogURI.toURL()); } catch (IOException ioex) { throw new MojoExecutionException( MessageFormat.format("Error parsing catalog [{0}].", catalogURI.toString()), ioex); } } } } private List getInputSources(final List uris) throws IOException, SAXException { final List inputSources = new ArrayList(uris.size()); for (final URI uri : uris) { InputSource inputSource = IOUtils.getInputSource(uri); final InputSource resolvedInputSource = getEntityResolver().resolveEntity(inputSource.getPublicId(), inputSource.getSystemId()); if (resolvedInputSource != null) { inputSource = resolvedInputSource; } inputSources.add(inputSource); } return inputSources; } } maven-jaxb2-plugin-0.15.1/plugin-core/src/main/java/org/jvnet/jaxb2/maven2/ResourceEntry.java000066400000000000000000000017201423155634000316560ustar00rootroot00000000000000package org.jvnet.jaxb2.maven2; import org.apache.maven.model.FileSet; public class ResourceEntry { private FileSet fileset; public FileSet getFileset() { return fileset; } public void setFileset(FileSet fileset) { this.fileset = fileset; } private String url; public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } private DependencyResource dependencyResource; public DependencyResource getDependencyResource() { return dependencyResource; } public void setDependencyResource(DependencyResource dependencyResource) { this.dependencyResource = dependencyResource; } @Override public String toString() { if (getFileset() != null) { return getFileset().toString(); } else if (getUrl() != null) { return "URL {" + getUrl().toString() + "}"; } else if (getDependencyResource() != null) { return getDependencyResource().toString(); } else { return "Empty resource entry {}"; } } } maven-jaxb2-plugin-0.15.1/plugin-core/src/main/java/org/jvnet/jaxb2/maven2/net/000077500000000000000000000000001423155634000267705ustar00rootroot00000000000000AbstractHTTPURILastModifiedResolver.java000066400000000000000000000050651423155634000364140ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/main/java/org/jvnet/jaxb2/maven2/netpackage org.jvnet.jaxb2.maven2.net; import java.io.IOException; import java.net.HttpURLConnection; import java.net.MalformedURLException; import java.net.URI; import java.net.URL; import java.net.URLConnection; import java.text.MessageFormat; import org.apache.maven.plugin.logging.Log; public abstract class AbstractHTTPURILastModifiedResolver extends AbstractSchemeAwareURILastModifiedResolver { public AbstractHTTPURILastModifiedResolver(String scheme, Log logger) { super(scheme, logger); } @Override protected Long getLastModifiedForScheme(URI uri) { getLogger() .warn(MessageFormat .format("The URI [{0}] seems to represent an absolute HTTP or HTTPS URL. " + "Getting the last modification timestamp is only possible " + "if the URL is accessible " + "and if the server returns the [Last-Modified] header correctly. " + "This method is not reliable and is likely to fail. " + "In this case the last modification timestamp will be assumed to be unknown.", uri)); try { final URL url = uri.toURL(); try { final URLConnection urlConnection = url.openConnection(); if (urlConnection instanceof HttpURLConnection) { final HttpURLConnection httpURLConnection = (HttpURLConnection) urlConnection; httpURLConnection.setInstanceFollowRedirects(true); final long lastModified = httpURLConnection .getLastModified(); if (lastModified == 0) { getLogger() .error(MessageFormat .format("Could not retrieve the last modification timestamp for the URI [{0}] from the HTTP URL connection. " + "The [Last-Modified] header was probably not set correctly.", uri)); } else { getLogger() .debug(MessageFormat .format("HTTP connection to the URI [{0}] returned the last modification timestamp [{1,date,yyyy-MM-dd HH:mm:ss.SSS}].", uri, lastModified)); return lastModified; } } else { getLogger() .error(MessageFormat .format("URL connection for the URI [{0}] is not a HTTP or HTTPS connection, can't read the [Last-Modified] header.", uri)); } } catch (IOException ioex) { getLogger() .error(MessageFormat.format( "Error opening the URL connection for the URI [{0}].", uri), ioex); } } catch (MalformedURLException murlex) { getLogger().error(MessageFormat.format("URI [{0}].", uri), murlex); } getLogger() .warn(MessageFormat .format("Last modification of the URI [{0}] is not known.", uri)); return null; } } AbstractSchemeAwareURILastModifiedResolver.java000066400000000000000000000017321423155634000400160ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/main/java/org/jvnet/jaxb2/maven2/netpackage org.jvnet.jaxb2.maven2.net; import java.net.URI; import java.text.MessageFormat; import org.apache.commons.lang3.Validate; import org.apache.maven.plugin.logging.Log; public abstract class AbstractSchemeAwareURILastModifiedResolver implements SchemeAwareURILastModifiedResolver { private final Log logger; private final String scheme; public AbstractSchemeAwareURILastModifiedResolver(String scheme, Log logger) { this.scheme = Validate.notNull(scheme); this.logger = Validate.notNull(logger); } @Override public String getScheme() { return scheme; } protected Log getLogger() { return logger; } @Override public Long getLastModified(URI uri) { final String scheme = getScheme(); Validate.isTrue(scheme.equalsIgnoreCase(uri.getScheme()), MessageFormat .format("Invalid scheme [{0}] expected [{1}].", uri.getScheme(), scheme)); return getLastModifiedForScheme(uri); } protected abstract Long getLastModifiedForScheme(URI uri); } CompositeURILastModifiedResolver.java000066400000000000000000000036761423155634000361210ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/main/java/org/jvnet/jaxb2/maven2/netpackage org.jvnet.jaxb2.maven2.net; import java.net.URI; import java.text.MessageFormat; import java.util.HashMap; import java.util.Map; import org.apache.commons.lang3.Validate; import org.apache.maven.plugin.logging.Log; import org.jvnet.jaxb2.maven2.plugin.logging.NullLog; public class CompositeURILastModifiedResolver implements URILastModifiedResolver { private final Map resolvers = new HashMap( 10); private final Log logger; public CompositeURILastModifiedResolver(Log logger) { this.logger = Validate.notNull(logger); addResolvers(new FileURILastModifiedResolver(logger), new JarURILastModifiedResolver(logger, this), new HttpURILastModifiedResolver(logger), new HttpsURILastModifiedResolver(logger)); } public CompositeURILastModifiedResolver() { this(NullLog.INSTANCE); } private Log getLogger() { return logger; } private void addResolvers(SchemeAwareURILastModifiedResolver... resolvers) { Validate.noNullElements(resolvers); for (final SchemeAwareURILastModifiedResolver resolver : resolvers) { this.resolvers.put(resolver.getScheme().toLowerCase(), resolver); } } private URILastModifiedResolver getResolver(String scheme) { return this.resolvers.get(scheme); } @Override public Long getLastModified(URI uri) { final String scheme = uri.getScheme(); if (scheme == null) { getLogger() .error(MessageFormat.format( "URI [{0}] does not provide the scheme part.", uri)); } final URILastModifiedResolver resolver = getResolver(scheme); if (resolver == null) { getLogger() .error(MessageFormat .format("Could not resolve the last modification of the URI [{0}] with the scheme [{1}].", uri, scheme)); } else { return resolver.getLastModified(uri); } getLogger() .warn(MessageFormat .format("Last modification of the URI [{0}] is not known.", uri)); return null; } } FileURILastModifiedResolver.java000066400000000000000000000026161423155634000350270ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/main/java/org/jvnet/jaxb2/maven2/netpackage org.jvnet.jaxb2.maven2.net; import java.io.File; import java.net.URI; import java.text.MessageFormat; import org.apache.maven.plugin.logging.Log; public class FileURILastModifiedResolver extends AbstractSchemeAwareURILastModifiedResolver { public static final String SCHEME = "file"; public FileURILastModifiedResolver(Log logger) { super(SCHEME, logger); } @Override protected Long getLastModifiedForScheme(final URI uri) { try { final File file = new File(uri); if (file.exists()) { long lastModified = file.lastModified(); if (lastModified != 0) { getLogger() .debug(MessageFormat .format("Last modification timestamp of the file URI [{0}] is [{1,date,yyyy-MM-dd HH:mm:ss.SSS}].", uri, lastModified)); return lastModified; } else { getLogger() .error(MessageFormat .format("Could not retrieve the last modification of the file [{0}] .", file.getAbsolutePath())); } } else { getLogger().error( MessageFormat.format("File [{0}] does not exist.", file.getAbsolutePath())); } } catch (Exception ex) { getLogger() .error(MessageFormat.format( "Could not retrieve the last modification of the URI [{0}] .", uri), ex); } getLogger() .warn(MessageFormat .format("Last modification of the URI [{0}] is not known.", uri)); return null; } } HttpURILastModifiedResolver.java000066400000000000000000000004511423155634000350620ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/main/java/org/jvnet/jaxb2/maven2/netpackage org.jvnet.jaxb2.maven2.net; import org.apache.maven.plugin.logging.Log; public class HttpURILastModifiedResolver extends AbstractHTTPURILastModifiedResolver{ public static final String SCHEME = "http"; public HttpURILastModifiedResolver(Log logger) { super(SCHEME, logger); } } HttpsURILastModifiedResolver.java000066400000000000000000000004541423155634000352500ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/main/java/org/jvnet/jaxb2/maven2/netpackage org.jvnet.jaxb2.maven2.net; import org.apache.maven.plugin.logging.Log; public class HttpsURILastModifiedResolver extends AbstractHTTPURILastModifiedResolver{ public static final String SCHEME = "https"; public HttpsURILastModifiedResolver(Log logger) { super(SCHEME, logger); } } JarURILastModifiedResolver.java000066400000000000000000000037321423155634000346640ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/main/java/org/jvnet/jaxb2/maven2/netpackage org.jvnet.jaxb2.maven2.net; import java.net.MalformedURLException; import java.net.URI; import java.net.URISyntaxException; import java.net.URL; import java.text.MessageFormat; import org.apache.commons.lang3.Validate; import org.apache.maven.plugin.logging.Log; public class JarURILastModifiedResolver extends AbstractSchemeAwareURILastModifiedResolver { public static final String SCHEME = "jar"; public static final String SEPARATOR = "!/"; private URILastModifiedResolver parent; public JarURILastModifiedResolver(Log logger, URILastModifiedResolver parent) { super(SCHEME, logger); this.parent = Validate.notNull(parent); } private URILastModifiedResolver getParent() { return parent; } @Override protected Long getLastModifiedForScheme(URI uri) { try { final URI mainURI = getMainURI(uri); getLogger() .debug(MessageFormat .format("Retrieving the last modification timestamp of the URI [{0}] via the main URI [{1}].", uri, mainURI)); return getParent().getLastModified(mainURI); } catch (Exception ex) { getLogger() .error(MessageFormat.format( "Could not retrieve the main URI from the Jar URI [{0}].", uri), ex); getLogger().warn( MessageFormat.format( "Last modification of the URI [{0}] is not known.", uri)); return null; } } public URI getMainURI(URI uri) throws MalformedURLException, URISyntaxException { final String uriString = uri.toString(); final URL url; if (uriString.indexOf(SEPARATOR) < 0) { url = new URI(uriString + SEPARATOR).toURL(); } else { url = uri.toURL(); } final String spec = url.getFile(); final int separatorPosition = spec.indexOf(SEPARATOR); if (separatorPosition == -1) { throw new MalformedURLException(MessageFormat.format( "No [!/] found in url spec [{0}].", spec)); } final String mainURIString = separatorPosition < 0 ? spec : spec .substring(0, separatorPosition); return new URI(mainURIString); } } SchemeAwareURILastModifiedResolver.java000066400000000000000000000002351423155634000363270ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/main/java/org/jvnet/jaxb2/maven2/netpackage org.jvnet.jaxb2.maven2.net; public interface SchemeAwareURILastModifiedResolver extends URILastModifiedResolver { public String getScheme(); } URILastModifiedResolver.java000066400000000000000000000005461423155634000342270ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/main/java/org/jvnet/jaxb2/maven2/netpackage org.jvnet.jaxb2.maven2.net; import java.net.URI; public interface URILastModifiedResolver { /** * Finds out the last modification date for an URI. * * @param uri * URI to find out the last modification date for. * @return Last modification date or null if unknown. */ public Long getLastModified(URI uri); } maven-jaxb2-plugin-0.15.1/plugin-core/src/main/java/org/jvnet/jaxb2/maven2/plugin/000077500000000000000000000000001423155634000275005ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/main/java/org/jvnet/jaxb2/maven2/plugin/logging/000077500000000000000000000000001423155634000311265ustar00rootroot00000000000000NullLog.java000066400000000000000000000022341423155634000332670ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/main/java/org/jvnet/jaxb2/maven2/plugin/loggingpackage org.jvnet.jaxb2.maven2.plugin.logging; import org.apache.maven.plugin.logging.Log; public class NullLog implements Log { @Override public boolean isDebugEnabled() { return false; } @Override public void debug(CharSequence content) { } @Override public void debug(CharSequence content, Throwable error) { } @Override public void debug(Throwable error) { } @Override public boolean isInfoEnabled() { return false; } @Override public void info(CharSequence content) { } @Override public void info(CharSequence content, Throwable error) { } @Override public void info(Throwable error) { } @Override public boolean isWarnEnabled() { return false; } @Override public void warn(CharSequence content) { } @Override public void warn(CharSequence content, Throwable error) { } @Override public void warn(Throwable error) { } @Override public boolean isErrorEnabled() { return false; } @Override public void error(CharSequence content) { } @Override public void error(CharSequence content, Throwable error) { } @Override public void error(Throwable error) { } public static Log INSTANCE = new NullLog(); } maven-jaxb2-plugin-0.15.1/plugin-core/src/main/java/org/jvnet/jaxb2/maven2/resolver/000077500000000000000000000000001423155634000300435ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/main/java/org/jvnet/jaxb2/maven2/resolver/tools/000077500000000000000000000000001423155634000312035ustar00rootroot00000000000000ClasspathCatalogResolver.java000066400000000000000000000030401423155634000367230ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/main/java/org/jvnet/jaxb2/maven2/resolver/toolspackage org.jvnet.jaxb2.maven2.resolver.tools; import java.net.URI; import java.net.URISyntaxException; import java.net.URL; public class ClasspathCatalogResolver extends com.sun.org.apache.xml.internal.resolver.tools.CatalogResolver { public static final String URI_SCHEME_CLASSPATH = "classpath"; @Override public String getResolvedEntity(String publicId, String systemId) { // System.out.println("Resolving [" + publicId + "], [" + systemId + "]."); final String result = super.getResolvedEntity(publicId, systemId); // System.out.println("Resolved to [" + result+ "]."); if (result == null) { // System.err.println(MessageFormat.format( // "Could not resolve publicId [{0}], systemId [{1}]", // publicId, systemId)); return null; } try { final URI uri = new URI(result); if (URI_SCHEME_CLASSPATH.equals(uri.getScheme())) { final String schemeSpecificPart = uri.getSchemeSpecificPart(); // System.out.println("Resolve [" + schemeSpecificPart + "]."); final URL resource = Thread.currentThread() .getContextClassLoader() .getResource(schemeSpecificPart); if (resource == null) { // System.out.println("Returning [" + null + "]."); return null; } else { // System.out.println("Returning to [" + resource.toString()+ "]."); return resource.toString(); } } else { // System.out.println("Returning to [" + result+ "]."); return result; } } catch (URISyntaxException urisex) { // System.out.println("Returning to [" + result+ "]."); return result; } } } MavenCatalogResolver.java000066400000000000000000000076711423155634000360650ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/main/java/org/jvnet/jaxb2/maven2/resolver/toolspackage org.jvnet.jaxb2.maven2.resolver.tools; import java.net.URI; import java.net.URISyntaxException; import java.net.URL; import java.text.MessageFormat; import org.apache.maven.plugin.logging.Log; import org.jvnet.jaxb2.maven2.DependencyResource; import org.jvnet.jaxb2.maven2.DependencyResourceResolver; import org.jvnet.jaxb2.maven2.plugin.logging.NullLog; import com.sun.org.apache.xml.internal.resolver.CatalogManager; public class MavenCatalogResolver extends com.sun.org.apache.xml.internal.resolver.tools.CatalogResolver { public static final String URI_SCHEME_MAVEN = "maven"; private final DependencyResourceResolver dependencyResourceResolver; private final CatalogManager catalogManager; private final Log log; public MavenCatalogResolver(CatalogManager catalogManager, DependencyResourceResolver dependencyResourceResolver) { this(catalogManager, dependencyResourceResolver, NullLog.INSTANCE); } public MavenCatalogResolver(CatalogManager catalogManager, DependencyResourceResolver dependencyResourceResolver, Log log) { super(catalogManager); this.catalogManager = catalogManager; if (dependencyResourceResolver == null) { throw new IllegalArgumentException( "Dependency resource resolver must not be null."); } this.dependencyResourceResolver = dependencyResourceResolver; this.log = log != null ? log : NullLog.INSTANCE; } protected CatalogManager getCatalogManager() { return catalogManager; } protected Log getLog() { return log; } @Override public String getResolvedEntity(String publicId, String systemId) { getLog().debug( MessageFormat.format( "Resolving publicId [{0}], systemId [{1}].", publicId, systemId)); final String superResolvedEntity = super.getResolvedEntity(publicId, systemId); getLog().debug( MessageFormat .format("Parent resolver has resolved publicId [{0}], systemId [{1}] to [{2}].", publicId, systemId, superResolvedEntity)); if (superResolvedEntity != null) { systemId = superResolvedEntity; } if (systemId == null) { return null; } try { final URI uri = new URI(systemId); if (URI_SCHEME_MAVEN.equals(uri.getScheme())) { getLog().debug( MessageFormat .format("Resolving systemId [{1}] as Maven dependency resource.", publicId, systemId)); final String schemeSpecificPart = uri.getSchemeSpecificPart(); try { final DependencyResource dependencyResource = DependencyResource .valueOf(schemeSpecificPart); try { final URL url = dependencyResourceResolver .resolveDependencyResource(dependencyResource); String resolved = url.toString(); getLog().debug( MessageFormat.format( "Resolved systemId [{1}] to [{2}].", publicId, systemId, resolved)); return resolved; } catch (Exception ex) { getLog().error( MessageFormat .format("Error resolving dependency resource [{0}].", dependencyResource)); } } catch (IllegalArgumentException iaex) { getLog().error( MessageFormat .format("Error parsing dependency descriptor [{0}].", schemeSpecificPart)); } getLog().error( MessageFormat .format("Failed to resolve systemId [{1}] as dependency resource. " + "Returning parent resolver result [{2}].", publicId, systemId, superResolvedEntity)); return superResolvedEntity; } else { getLog().debug( MessageFormat .format("SystemId [{1}] is not a Maven dependency resource URI. " + "Returning parent resolver result [{2}].", publicId, systemId, superResolvedEntity)); return superResolvedEntity; } } catch (URISyntaxException urisex) { getLog().debug( MessageFormat .format("Coul not parse the systemId [{1}] as URI. " + "Returning parent resolver result [{2}].", publicId, systemId, superResolvedEntity)); return superResolvedEntity; } } } ReResolvingEntityResolverWrapper.java000066400000000000000000000027101423155634000405060ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/main/java/org/jvnet/jaxb2/maven2/resolver/toolspackage org.jvnet.jaxb2.maven2.resolver.tools; import java.io.IOException; import org.xml.sax.EntityResolver; import org.xml.sax.InputSource; import org.xml.sax.SAXException; public class ReResolvingEntityResolverWrapper implements EntityResolver { private final EntityResolver entityResolver; public ReResolvingEntityResolverWrapper(EntityResolver entityResolver) { if (entityResolver == null) { throw new IllegalArgumentException( "Provided entity resolver must not be null."); } this.entityResolver = entityResolver; } @Override public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException { // System.out.println(MessageFormat.format("Resolving publicId [{0}], systemId [{1}].", // publicId, systemId)); final InputSource resolvedInputSource = this.entityResolver .resolveEntity(publicId, systemId); if (resolvedInputSource == null) { // System.out.println("Resolution result is null."); return null; } else { // System.out.println(MessageFormat.format( // "Resolved to publicId [{0}], systemId [{1}].", // resolvedInputSource.getPublicId(), // resolvedInputSource.getSystemId())); final String pId = publicId != null ? publicId : resolvedInputSource.getPublicId(); final String sId = systemId != null ? systemId : resolvedInputSource.getSystemId(); return new ReResolvingInputSourceWrapper(this.entityResolver, resolvedInputSource, pId, sId); } } } ReResolvingInputSourceWrapper.java000066400000000000000000000035751423155634000400020ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/main/java/org/jvnet/jaxb2/maven2/resolver/toolspackage org.jvnet.jaxb2.maven2.resolver.tools; import java.io.IOException; import java.io.InputStream; import java.io.Reader; import org.xml.sax.EntityResolver; import org.xml.sax.InputSource; import org.xml.sax.SAXException; public class ReResolvingInputSourceWrapper extends InputSource { private final EntityResolver entityResolver; private final InputSource inputSource; public ReResolvingInputSourceWrapper(EntityResolver entityResolver, InputSource inputSource, String publicId, String systemId) { this.entityResolver = entityResolver; this.inputSource = inputSource; this.setPublicId(publicId); this.setSystemId(systemId); } @Override public Reader getCharacterStream() { final Reader originalReader = inputSource.getCharacterStream(); if (originalReader == null) { return null; } else { try { InputSource resolvedEntity = this.entityResolver.resolveEntity( getPublicId(), getSystemId()); if (resolvedEntity != null) { return resolvedEntity.getCharacterStream(); } else { return originalReader; } } catch (IOException ioex) { return originalReader; } catch (SAXException saxex) { return originalReader; } } } @Override public void setCharacterStream(Reader characterStream) { } @Override public InputStream getByteStream() { final InputStream originalInputStream = inputSource.getByteStream(); if (originalInputStream == null) { return null; } else { try { InputSource resolvedEntity = this.entityResolver.resolveEntity( getPublicId(), getSystemId()); if (resolvedEntity != null) { return resolvedEntity.getByteStream(); } else { return originalInputStream; } } catch (IOException ioex) { return originalInputStream; } catch (SAXException saxex) { return originalInputStream; } } } @Override public void setByteStream(InputStream byteStream) { } } maven-jaxb2-plugin-0.15.1/plugin-core/src/main/java/org/jvnet/jaxb2/maven2/util/000077500000000000000000000000001423155634000271575ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/main/java/org/jvnet/jaxb2/maven2/util/ArtifactUtils.java000066400000000000000000000076641423155634000326150ustar00rootroot00000000000000package org.jvnet.jaxb2.maven2.util; import java.io.File; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.Set; import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.factory.ArtifactFactory; import org.apache.maven.artifact.metadata.ArtifactMetadataSource; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.resolver.ArtifactNotFoundException; import org.apache.maven.artifact.resolver.ArtifactResolutionException; import org.apache.maven.artifact.resolver.ArtifactResolutionResult; import org.apache.maven.artifact.resolver.ArtifactResolver; import org.apache.maven.model.Dependency; import org.apache.maven.project.MavenProject; import org.apache.maven.project.artifact.InvalidDependencyVersionException; import org.apache.maven.project.artifact.MavenMetadataSource; import org.jvnet.jaxb2.maven2.util.CollectionUtils.Function; public class ArtifactUtils { private ArtifactUtils() { } public static Collection resolveTransitively( final ArtifactFactory artifactFactory, final ArtifactResolver artifactResolver, final ArtifactRepository localRepository, final ArtifactMetadataSource artifactMetadataSource, final Dependency[] dependencies, final MavenProject project) throws InvalidDependencyVersionException, ArtifactResolutionException, ArtifactNotFoundException { if (dependencies == null) { return Collections.emptyList(); } @SuppressWarnings("unchecked") final Set artifacts = MavenMetadataSource.createArtifacts( artifactFactory, Arrays.asList(dependencies), "runtime", null, project); final ArtifactResolutionResult artifactResolutionResult = artifactResolver .resolveTransitively(artifacts, project.getArtifact(), project.getRemoteArtifactRepositories(), localRepository, artifactMetadataSource); @SuppressWarnings("unchecked") final Set resolvedArtifacts = artifactResolutionResult .getArtifacts(); return resolvedArtifacts; } public static Collection resolve( final ArtifactFactory artifactFactory, final ArtifactResolver artifactResolver, final ArtifactRepository localRepository, final ArtifactMetadataSource artifactMetadataSource, final Dependency[] dependencies, final MavenProject project) throws InvalidDependencyVersionException, ArtifactResolutionException, ArtifactNotFoundException { if (dependencies == null) { return Collections.emptyList(); } @SuppressWarnings("unchecked") final Set artifacts = MavenMetadataSource.createArtifacts( artifactFactory, Arrays.asList(dependencies), "runtime", null, project); for (Artifact artifact : artifacts) { artifactResolver.resolve(artifact, project.getRemoteArtifactRepositories(), localRepository); } final Set resolvedArtifacts = artifacts; return resolvedArtifacts; } public static final Function GET_FILE = new Function() { public File eval(Artifact argument) { return argument.getFile(); } }; public static final Collection getFiles(Collection artifacts) { return CollectionUtils.apply(artifacts, ArtifactUtils.GET_FILE); } public static void mergeDependencyWithDefaults(Dependency dep, Dependency def) { if (dep.getScope() == null && def.getScope() != null) { dep.setScope(def.getScope()); dep.setSystemPath(def.getSystemPath()); } if (dep.getVersion() == null && def.getVersion() != null) { dep.setVersion(def.getVersion()); } if (dep.getClassifier() == null && def.getClassifier() != null) { dep.setClassifier(def.getClassifier()); } if (dep.getType() == null && def.getType() != null) { dep.setType(def.getType()); } @SuppressWarnings("rawtypes") List exclusions = dep.getExclusions(); if (exclusions == null || exclusions.isEmpty()) { dep.setExclusions(def.getExclusions()); } } } maven-jaxb2-plugin-0.15.1/plugin-core/src/main/java/org/jvnet/jaxb2/maven2/util/CollectionUtils.java000066400000000000000000000045051423155634000331420ustar00rootroot00000000000000package org.jvnet.jaxb2.maven2.util; import java.util.ArrayList; import java.util.Collection; import java.util.Comparator; import java.util.Iterator; import java.util.List; public class CollectionUtils { public static class PositiveComparatorWithNullAsGreatest> implements Comparator { public int compare(V o1, V o2) { if (o1 == null && o2 == null) return 0; else if (o1 == null) return 1; else if (o2 == null) return -1; else return o1.compareTo(o2); } } public static class NegativeComparatorWithNullAsSmallest> implements Comparator { public int compare(V o1, V o2) { if (o1 == null && o2 == null) return 0; else if (o1 == null) return 1; else if (o2 == null) return -1; else return -o1.compareTo(o2); } } public interface Function { public V eval(T argument); } public static List apply(Collection collection, Function function) { final List list = new ArrayList(collection.size()); for (T t : collection) { list.add(function.eval(t)); } return list; } public static V bestValue(Collection collection, CollectionUtils.Function function, Comparator comparator) { if (collection == null || collection.isEmpty()) return null; final Iterator i = collection.iterator(); V candidateValue = function.eval(i.next()); while (i.hasNext()) { final V nextValue = function.eval(i.next()); if (comparator.compare(candidateValue, nextValue) < 0) { candidateValue = nextValue; } } return candidateValue; } @SuppressWarnings("rawtypes") private static Comparator LT_NULL_SMALLEST = new NegativeComparatorWithNullAsSmallest(); @SuppressWarnings("rawtypes") private static Comparator GT_NULL_GREATEST = new PositiveComparatorWithNullAsGreatest(); public static > Comparator ltWithNullAsSmallest() { @SuppressWarnings("unchecked") final Comparator comparator = (Comparator) LT_NULL_SMALLEST; return comparator; } public static > Comparator gtWithNullAsGreatest() { @SuppressWarnings("unchecked") final Comparator comparator = (Comparator) GT_NULL_GREATEST; return comparator; } } maven-jaxb2-plugin-0.15.1/plugin-core/src/main/java/org/jvnet/jaxb2/maven2/util/IOUtils.java000066400000000000000000000060271423155634000313570ustar00rootroot00000000000000package org.jvnet.jaxb2.maven2.util; import java.io.File; import java.io.IOException; import java.net.MalformedURLException; import java.net.URI; import java.net.URL; import java.util.ArrayList; import java.util.Collections; import java.util.List; import org.codehaus.plexus.util.DirectoryScanner; import org.codehaus.plexus.util.Scanner; import org.jvnet.jaxb2.maven2.util.CollectionUtils.Function; import org.sonatype.plexus.build.incremental.BuildContext; import org.xml.sax.InputSource; public class IOUtils { /** * Creates an input source for the given file. * * @param file * file to create input source for. * * @return Created input source object. */ public static InputSource getInputSource(File file) { try { final URL url = file.toURI().toURL(); return getInputSource(url); } catch (MalformedURLException e) { return new InputSource(file.getPath()); } } public static InputSource getInputSource(final URL url) { return new InputSource(StringUtils.escapeSpace(url.toExternalForm())); } public static InputSource getInputSource(final URI uri) { return new InputSource(StringUtils.escapeSpace(uri.toString())); } public static final Function GET_URL = new Function() { public URL eval(File file) { try { return file.toURI().toURL(); } catch (MalformedURLException muex) { throw new RuntimeException(muex); } } }; /** * Scans given directory for files satisfying given inclusion/exclusion * patterns. * * @param buildContext * Build context provided by the environment, used to scan for files. * @param directory * Directory to scan. * @param includes * inclusion pattern. * @param excludes * exclusion pattern. * @param defaultExcludes * default exclusion flag. * @return Files from the given directory which satisfy given patterns. The * files are {@link File#getCanonicalFile() canonical}. * @throws IOException * If an I/O error occurs, which is possible because the * construction of the canonical pathname may require filesystem * queries. */ public static List scanDirectoryForFiles(BuildContext buildContext, final File directory, final String[] includes, final String[] excludes, boolean defaultExcludes) throws IOException { if (!directory.exists()) { return Collections.emptyList(); } final Scanner scanner; if (buildContext != null) { scanner = buildContext.newScanner(directory, true); } else { final DirectoryScanner directoryScanner = new DirectoryScanner(); directoryScanner.setBasedir(directory.getAbsoluteFile()); scanner = directoryScanner; } scanner.setIncludes(includes); scanner.setExcludes(excludes); if (defaultExcludes) { scanner.addDefaultExcludes(); } scanner.scan(); final List files = new ArrayList(); for (final String name : scanner.getIncludedFiles()) { files.add(new File(directory, name).getCanonicalFile()); } return files; } } maven-jaxb2-plugin-0.15.1/plugin-core/src/main/java/org/jvnet/jaxb2/maven2/util/LocaleUtils.java000066400000000000000000000017641423155634000322520ustar00rootroot00000000000000package org.jvnet.jaxb2.maven2.util; import java.util.Locale; public class LocaleUtils { public static Locale valueOf(String lang) { if ((lang == null) || lang.equals("")) { return Locale.getDefault(); } String language = ""; String country = ""; String variant = ""; int i1 = lang.indexOf('-'); if (i1 < 0) { language = lang; } else { language = lang.substring(0, i1); ++i1; int i2 = lang.indexOf('-', i1); if (i2 < 0) { country = lang.substring(i1); } else { country = lang.substring(i1, i2); variant = lang.substring(i2 + 1); } } if (language.length() == 2) { language = language.toLowerCase(); } else { language = ""; } if (country.length() == 2) { country = country.toUpperCase(); } else { country = ""; } if ((variant.length() > 0) && ((language.length() == 2) || (country.length() == 2))) { variant = variant.toUpperCase(); } else { variant = ""; } return new Locale(language, country, variant); } } maven-jaxb2-plugin-0.15.1/plugin-core/src/main/java/org/jvnet/jaxb2/maven2/util/StringUtils.java000066400000000000000000000033621423155634000323150ustar00rootroot00000000000000package org.jvnet.jaxb2.maven2.util; import java.util.ArrayList; import java.util.List; public class StringUtils { /** * Checks if a (trimmed) String is null or empty. * * @param string * the String to check * @return true if the string is null, or length * zero once trimmed. */ public static boolean isEmpty(String string) { return (string == null || string.trim().length() == 0); } public static String escapeSpace(String url) { // URLEncoder didn't work. StringBuffer buf = new StringBuffer(); for (int i = 0; i < url.length(); i++) { // TODO: not sure if this is the only character that needs to be // escaped. if (url.charAt(i) == ' ') buf.append("%20"); else buf.append(url.charAt(i)); } return buf.toString(); } private static String[] EMPTY_STRING_ARRAY = new String[0]; public static String[] split(String str, char separatorChar, boolean preserveAllTokens) { // Performance tuned for 2.0 (JDK1.4) if (str == null) { return null; } int len = str.length(); if (len == 0) { return EMPTY_STRING_ARRAY; } List list = new ArrayList(); int i = 0, start = 0; boolean match = false; boolean lastMatch = false; while (i < len) { if (str.charAt(i) == separatorChar) { if (match || preserveAllTokens) { list.add(str.substring(start, i)); match = false; lastMatch = true; } start = ++i; continue; } lastMatch = false; match = true; i++; } if (match || (preserveAllTokens && lastMatch)) { list.add(str.substring(start, i)); } return (String[]) list.toArray(new String[list.size()]); } } maven-jaxb2-plugin-0.15.1/plugin-core/src/main/resources/000077500000000000000000000000001423155634000231605ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/main/resources/org/000077500000000000000000000000001423155634000237475ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/main/resources/org/jvnet/000077500000000000000000000000001423155634000250755ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/main/resources/org/jvnet/jaxb2/000077500000000000000000000000001423155634000261035ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/main/resources/org/jvnet/jaxb2/maven2/000077500000000000000000000000001423155634000272735ustar00rootroot00000000000000addIfExistsToEpisodeSchemaBindings.xslt000066400000000000000000000007531423155634000367570ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/main/resources/org/jvnet/jaxb2/maven2 true maven-jaxb2-plugin-0.15.1/plugin-core/src/test/000077500000000000000000000000001423155634000212015ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/test/java/000077500000000000000000000000001423155634000221225ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/test/java/org/000077500000000000000000000000001423155634000227115ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/test/java/org/jvnet/000077500000000000000000000000001423155634000240375ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/test/java/org/jvnet/jaxb2/000077500000000000000000000000001423155634000250455ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/test/java/org/jvnet/jaxb2/maven2/000077500000000000000000000000001423155634000262355ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/test/java/org/jvnet/jaxb2/maven2/RawXJC2MojoTest.java000066400000000000000000000053701423155634000317520ustar00rootroot00000000000000package org.jvnet.jaxb2.maven2; import org.apache.maven.plugin.MojoExecutionException; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.rules.TemporaryFolder; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.InputStream; import java.net.URI; import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.List; import java.util.jar.JarEntry; import java.util.jar.JarOutputStream; import static org.junit.Assert.assertEquals; public class RawXJC2MojoTest { @Rule public TemporaryFolder temporaryFolder = new TemporaryFolder(); private File testJarFile; @Before public void createJarFile() throws Exception { testJarFile = temporaryFolder.newFile("test.jar"); try (JarOutputStream out = new JarOutputStream(new FileOutputStream(testJarFile))) { out.putNextEntry(new JarEntry("dir/")); out.closeEntry(); out.putNextEntry(new JarEntry("dir/nested.xjb")); out.write("nested binding".getBytes(StandardCharsets.UTF_8)); out.closeEntry(); out.putNextEntry(new JarEntry("root.xjb")); out.write("root binding".getBytes(StandardCharsets.UTF_8)); out.closeEntry(); } } @Test public void collectsBindingUrisFromArtifact() throws Exception { List bindings = new ArrayList<>(); final RawXJC2Mojo mojo = new RawXJC2Mojo() { @Override protected OptionsFactory getOptionsFactory() { throw new UnsupportedOperationException(); } @Override public void doExecute(Void options) throws MojoExecutionException { throw new UnsupportedOperationException(); } }; mojo.collectBindingUrisFromArtifact(testJarFile, bindings); assertEquals(2, bindings.size()); assertEquals(URI.create("jar:" + testJarFile.toURI() + "!/dir/nested.xjb"), bindings.get(0)); assertEquals(URI.create("jar:" + testJarFile.toURI() + "!/root.xjb"), bindings.get(1)); assertEquals("nested binding", readContent(bindings.get(0))); assertEquals("root binding", readContent(bindings.get(1))); } private String readContent(URI uri) throws Exception { try (InputStream in = uri.toURL().openConnection().getInputStream()) { ByteArrayOutputStream out = new ByteArrayOutputStream(); byte[] buffer = new byte[1024]; int length; while ((length = in.read(buffer)) != -1) { out.write(buffer, 0, length); } return out.toString(StandardCharsets.UTF_8.name()); } } }maven-jaxb2-plugin-0.15.1/plugin-core/src/test/java/org/jvnet/jaxb2/maven2/net/000077500000000000000000000000001423155634000270235ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/test/java/org/jvnet/jaxb2/maven2/net/tests/000077500000000000000000000000001423155634000301655ustar00rootroot00000000000000URILastModifiedResolverTest.java000066400000000000000000000033131423155634000362570ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/test/java/org/jvnet/jaxb2/maven2/net/testspackage org.jvnet.jaxb2.maven2.net.tests; import java.io.IOException; import java.net.MalformedURLException; import java.net.URI; import java.net.URISyntaxException; import org.apache.maven.plugin.logging.SystemStreamLog; import org.junit.Assert; import org.junit.Test; import org.jvnet.jaxb2.maven2.net.CompositeURILastModifiedResolver; import org.jvnet.jaxb2.maven2.net.JarURILastModifiedResolver; import org.jvnet.jaxb2.maven2.net.URILastModifiedResolver; public class URILastModifiedResolverTest { @Test public void getsFileURIFromJarFileURICorrectly() throws URISyntaxException, MalformedURLException, IOException { final URI jarURI = Test.class.getResource("Test.class").toURI(); final String jarURIString = jarURI.toString(); System.out.println(jarURIString); final String partJarURIString = jarURIString.substring(0, jarURIString.indexOf(JarURILastModifiedResolver.SEPARATOR)); final URI partJarURI = new URI(partJarURIString); final URILastModifiedResolver resolver = new CompositeURILastModifiedResolver( new SystemStreamLog()); final URI fileURI = getClass().getResource( getClass().getSimpleName() + ".class").toURI(); Assert.assertNotNull(resolver.getLastModified(jarURI)); Assert.assertNotNull(resolver.getLastModified(partJarURI)); Assert.assertNotNull(resolver.getLastModified(fileURI)); // Switch to true to tests HTTP/HTTPs boolean online = false; if (online) { final URI httpsURI = new URI("https://ya.ru/"); final URI httpURI = new URI("http://schemas.opengis.net/ogc_schema_updates.rss"); Assert.assertNotNull(resolver.getLastModified(httpsURI)); Assert.assertNotNull(resolver.getLastModified(httpURI)); } } } maven-jaxb2-plugin-0.15.1/plugin-core/src/test/java/org/jvnet/jaxb2/maven2/resolver/000077500000000000000000000000001423155634000300765ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/test/java/org/jvnet/jaxb2/maven2/resolver/tools/000077500000000000000000000000001423155634000312365ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/test/java/org/jvnet/jaxb2/maven2/resolver/tools/tests/000077500000000000000000000000001423155634000324005ustar00rootroot00000000000000MavenCatalogResolverTest.java000066400000000000000000000022471423155634000401140ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/test/java/org/jvnet/jaxb2/maven2/resolver/tools/testspackage org.jvnet.jaxb2.maven2.resolver.tools.tests; import java.io.IOException; import java.net.URL; import org.junit.Assert; import org.junit.Test; import org.xml.sax.InputSource; import com.sun.org.apache.xml.internal.resolver.CatalogManager; import com.sun.org.apache.xml.internal.resolver.tools.CatalogResolver; public class MavenCatalogResolverTest { @Test public void checkReenterability() throws IOException { CatalogManager cma = new CatalogManager(); cma.setIgnoreMissingProperties(true); cma.setUseStaticCatalog(false); final CatalogResolver cra = new CatalogResolver(cma); URL a = getClass().getResource("a/catalog.cat"); cra.getCatalog().parseCatalog(a); InputSource ea = cra.resolveEntity(null, "http://www.w3.org/1999/xlink.xsd"); Assert.assertNotNull(ea); CatalogManager cmb = new CatalogManager(); cmb.setIgnoreMissingProperties(true); cmb.setUseStaticCatalog(false); final CatalogResolver crb = new CatalogResolver(cmb); URL b = getClass().getResource("b/catalog.cat"); crb.getCatalog().parseCatalog(b); InputSource eb = crb.resolveEntity(null, "http://www.w3.org/2005/atom-author-link.xsd"); Assert.assertNotNull(eb); } } maven-jaxb2-plugin-0.15.1/plugin-core/src/test/java/org/jvnet/jaxb2/maven2/tests/000077500000000000000000000000001423155634000273775ustar00rootroot00000000000000AddIfExistsToEpisodeSchemaBindingsTest.java000066400000000000000000000010011423155634000375750ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/test/java/org/jvnet/jaxb2/maven2/testspackage org.jvnet.jaxb2.maven2.tests; import java.io.InputStream; import org.codehaus.plexus.util.IOUtil; import org.junit.Assert; import org.junit.Test; import org.jvnet.jaxb2.maven2.RawXJC2Mojo; public class AddIfExistsToEpisodeSchemaBindingsTest { @Test public void transformationResourceIsAccessible() { InputStream is = RawXJC2Mojo.class .getResourceAsStream(RawXJC2Mojo.ADD_IF_EXISTS_TO_EPISODE_SCHEMA_BINDINGS_TRANSFORMATION_RESOURCE_NAME); Assert.assertNotNull(is); IOUtil.close(is); } } DependencyResourceTest.java000066400000000000000000000041251423155634000346130ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/test/java/org/jvnet/jaxb2/maven2/testspackage org.jvnet.jaxb2.maven2.tests; import org.junit.Test; import org.jvnet.jaxb2.maven2.DependencyResource; public class DependencyResourceTest { @Test public void correctlyParsesDepenencyResource() { { @SuppressWarnings("unused") DependencyResource dependencyResource = DependencyResource .valueOf("a:b"); } { @SuppressWarnings("unused") DependencyResource dependencyResource = DependencyResource .valueOf("a:b:"); } { @SuppressWarnings("unused") DependencyResource dependencyResource = DependencyResource .valueOf("a:b:c"); } { @SuppressWarnings("unused") DependencyResource dependencyResource = DependencyResource .valueOf("a:b:c:"); } { @SuppressWarnings("unused") DependencyResource dependencyResource = DependencyResource .valueOf("a:b:c:d"); } { @SuppressWarnings("unused") DependencyResource dependencyResource = DependencyResource .valueOf("a:b:c:d:"); } { @SuppressWarnings("unused") DependencyResource dependencyResource = DependencyResource .valueOf("a:b:c:d:e"); } { @SuppressWarnings("unused") DependencyResource dependencyResource = DependencyResource .valueOf("a:b!/c"); } { @SuppressWarnings("unused") DependencyResource dependencyResource = DependencyResource .valueOf("a:b:!/c"); } { @SuppressWarnings("unused") DependencyResource dependencyResource = DependencyResource .valueOf("a:b:c!/d"); } { @SuppressWarnings("unused") DependencyResource dependencyResource = DependencyResource .valueOf("a:b:c:!/d"); } { @SuppressWarnings("unused") DependencyResource dependencyResource = DependencyResource .valueOf("a:b:c:d!/e"); } { @SuppressWarnings("unused") DependencyResource dependencyResource = DependencyResource .valueOf("a:b::d!/e"); } { @SuppressWarnings("unused") DependencyResource dependencyResource = DependencyResource .valueOf("a:b:c:d:!/e"); } { @SuppressWarnings("unused") DependencyResource dependencyResource = DependencyResource .valueOf("a:b:c:d:e!/f"); } } } maven-jaxb2-plugin-0.15.1/plugin-core/src/test/java/org/jvnet/jaxb2/maven2/util/000077500000000000000000000000001423155634000272125ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/test/java/org/jvnet/jaxb2/maven2/util/tests/000077500000000000000000000000001423155634000303545ustar00rootroot00000000000000CollectionsUtilsTests.java000066400000000000000000000022041423155634000354600ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/test/java/org/jvnet/jaxb2/maven2/util/testspackage org.jvnet.jaxb2.maven2.util.tests; import java.util.Arrays; import java.util.Comparator; import junit.framework.Assert; import org.junit.Test; import org.jvnet.jaxb2.maven2.util.CollectionUtils; import org.jvnet.jaxb2.maven2.util.CollectionUtils.Function; public class CollectionsUtilsTests { @Test public void correctlyCompares() { final Function identity = new Function() { @Override public String eval(String argument) { return argument; } }; final Comparator gt = CollectionUtils . gtWithNullAsGreatest(); final Comparator lt = CollectionUtils . ltWithNullAsSmallest(); Assert.assertEquals("b", CollectionUtils.bestValue( Arrays. asList("a", "b"), identity, gt)); Assert.assertEquals("a", CollectionUtils.bestValue( Arrays. asList("a", "b"), identity, lt)); Assert.assertEquals( null, CollectionUtils.bestValue( Arrays. asList("a", null, "b"), identity, gt)); Assert.assertEquals( null, CollectionUtils.bestValue( Arrays. asList("a", null, "b"), identity, lt)); } } maven-jaxb2-plugin-0.15.1/plugin-core/src/test/resources/000077500000000000000000000000001423155634000232135ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/test/resources/org/000077500000000000000000000000001423155634000240025ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/test/resources/org/jvnet/000077500000000000000000000000001423155634000251305ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/test/resources/org/jvnet/jaxb2/000077500000000000000000000000001423155634000261365ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/test/resources/org/jvnet/jaxb2/maven2/000077500000000000000000000000001423155634000273265ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/test/resources/org/jvnet/jaxb2/maven2/resolver/000077500000000000000000000000001423155634000311675ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/test/resources/org/jvnet/jaxb2/maven2/resolver/tools/000077500000000000000000000000001423155634000323275ustar00rootroot00000000000000tests/000077500000000000000000000000001423155634000334125ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/test/resources/org/jvnet/jaxb2/maven2/resolver/toolsa/000077500000000000000000000000001423155634000336325ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/test/resources/org/jvnet/jaxb2/maven2/resolver/tools/testscatalog.cat000066400000000000000000000002761423155634000357420ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/test/resources/org/jvnet/jaxb2/maven2/resolver/tools/tests/a-- If the parameter isn't working, this link to schema A is not recognized and the test will fail because of a missing schema. -- REWRITE_SYSTEM "http://www.w3.org" "w3c" w3c/000077500000000000000000000000001423155634000343265ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/test/resources/org/jvnet/jaxb2/maven2/resolver/tools/tests/a1999/000077500000000000000000000000001423155634000347415ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/test/resources/org/jvnet/jaxb2/maven2/resolver/tools/tests/a/w3cxlink.xsd000066400000000000000000000175641423155634000366230ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/test/resources/org/jvnet/jaxb2/maven2/resolver/tools/tests/a/w3c/1999 This schema document provides attribute declarations and attribute group, complex type and simple type definitions which can be used in the construction of user schemas to define the structure of particular linking constructs, e.g. ... ... ... ]]> Intended for use as the type of user-declared elements to make them simple links. Intended for use as the type of user-declared elements to make them extended links. Note that the elements referenced in the content model are all abstract. The intention is that by simply declaring elements with these as their substitutionGroup, all the right things will happen. xml:lang is not required, but provides much of the motivation for title elements in addition to attributes, and so is provided here for convenience. label is not required, but locators have no particular XLink function if they are not labeled. from and to have default behavior when values are missing b/000077500000000000000000000000001423155634000336335ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/test/resources/org/jvnet/jaxb2/maven2/resolver/tools/testscatalog.cat000066400000000000000000000002761423155634000357430ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/test/resources/org/jvnet/jaxb2/maven2/resolver/tools/tests/b-- If the parameter isn't working, this link to schema A is not recognized and the test will fail because of a missing schema. -- REWRITE_SYSTEM "http://www.w3.org" "w3c" w3c/000077500000000000000000000000001423155634000343275ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/test/resources/org/jvnet/jaxb2/maven2/resolver/tools/tests/b2005/000077500000000000000000000000001423155634000347155ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/test/resources/org/jvnet/jaxb2/maven2/resolver/tools/tests/b/w3catom-author-link.xsd000066400000000000000000000036651423155634000406420ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin-core/src/test/resources/org/jvnet/jaxb2/maven2/resolver/tools/tests/b/w3c/2005 atom-author-link.xsd 2008-01-23 There is no official atom XSD. This XSD is created based on: http://atompub.org/2005/08/17/atom.rnc. A subset of Atom as used in the ogckml22.xsd is defined here. maven-jaxb2-plugin-0.15.1/plugin/000077500000000000000000000000001423155634000165055ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin/.gitignore000066400000000000000000000000111423155634000204650ustar00rootroot00000000000000/target/ maven-jaxb2-plugin-0.15.1/plugin/pom.xml000066400000000000000000000057211423155634000200270ustar00rootroot00000000000000 4.0.0 maven-jaxb2-plugin maven-plugin Maven JAXB 2.x Plugin https://github.com/highsource/maven-jaxb2-plugin org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-project 0.15.1 ${maven.version} org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-core org.codehaus.plexus plexus-utils org.jvnet.jaxb2.maven2 maven-jaxb23-plugin org.apache.maven.plugin-tools maven-plugin-annotations org.apache.maven.plugin-testing maven-plugin-testing-harness test org.apache.maven.plugins maven-plugin-plugin src/main/resources true ${project.build.directory}/generated-resources/jaxb-xjc-runtime false org.apache.maven.plugins maven-plugin-plugin org.apache.maven.plugins maven-dependency-plugin unpack generate-resources unpack org.glassfish.jaxb jaxb-xjc ${jaxb23.version} sources jar false ${project.build.directory}/generated-resources/jaxb-xjc-runtime com/sun/tools/xjc/runtime/*.java maven-compiler-plugin 1.8 1.8 maven-jaxb2-plugin-0.15.1/plugin/src/000077500000000000000000000000001423155634000172745ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin/src/main/000077500000000000000000000000001423155634000202205ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin/src/main/java/000077500000000000000000000000001423155634000211415ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin/src/main/java/org/000077500000000000000000000000001423155634000217305ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin/src/main/java/org/jvnet/000077500000000000000000000000001423155634000230565ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin/src/main/java/org/jvnet/mjiip/000077500000000000000000000000001423155634000241665ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin/src/main/java/org/jvnet/mjiip/v_2/000077500000000000000000000000001423155634000246545ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin/src/main/java/org/jvnet/mjiip/v_2/OptionsFactory.java000066400000000000000000000107441423155634000305100ustar00rootroot00000000000000package org.jvnet.mjiip.v_2; import java.nio.charset.Charset; import java.nio.charset.IllegalCharsetNameException; import java.text.MessageFormat; import java.util.List; import org.apache.maven.plugin.MojoExecutionException; import org.jvnet.jaxb2.maven2.OptionsConfiguration; import org.jvnet.jaxb2.maven2.util.StringUtils; import org.xml.sax.InputSource; import com.sun.tools.xjc.BadCommandLineException; import com.sun.tools.xjc.Language; import com.sun.tools.xjc.Options; import com.sun.tools.xjc.api.SpecVersion; public class OptionsFactory implements org.jvnet.jaxb2.maven2.OptionsFactory { /** * Creates and initializes an instance of XJC options. * */ public Options createOptions(OptionsConfiguration optionsConfiguration) throws MojoExecutionException { final Options options = new Options(); options.verbose = optionsConfiguration.isVerbose(); options.debugMode = optionsConfiguration.isDebugMode(); options.classpaths.addAll(optionsConfiguration.getPlugins()); options.target = createSpecVersion(optionsConfiguration .getSpecVersion()); final String encoding = optionsConfiguration.getEncoding(); if (encoding != null) { options.encoding = createEncoding(encoding); } options.setSchemaLanguage(createLanguage(optionsConfiguration .getSchemaLanguage())); options.entityResolver = optionsConfiguration.getEntityResolver(); for (InputSource grammar : optionsConfiguration.getGrammars()) { options.addGrammar(grammar); } for (InputSource bindFile : optionsConfiguration.getBindFiles()) { options.addBindFile(bindFile); } // Setup Other Options options.defaultPackage = optionsConfiguration.getGeneratePackage(); options.targetDir = optionsConfiguration.getGenerateDirectory(); options.strictCheck = optionsConfiguration.isStrict(); options.readOnly = optionsConfiguration.isReadOnly(); options.packageLevelAnnotations = optionsConfiguration .isPackageLevelAnnotations(); options.noFileHeader = optionsConfiguration.isNoFileHeader(); options.enableIntrospection = optionsConfiguration .isEnableIntrospection(); options.disableXmlSecurity = optionsConfiguration .isDisableXmlSecurity(); if (optionsConfiguration.getAccessExternalSchema() != null) { System.setProperty("javax.xml.accessExternalSchema", optionsConfiguration.getAccessExternalSchema()); } if (optionsConfiguration.getAccessExternalDTD() != null) { System.setProperty("javax.xml.accessExternalDTD", optionsConfiguration.getAccessExternalDTD()); } if (optionsConfiguration.isEnableExternalEntityProcessing()) { System.setProperty("enableExternalEntityProcessing", Boolean.TRUE.toString()); } options.contentForWildcard = optionsConfiguration .isContentForWildcard(); if (optionsConfiguration.isExtension()) { options.compatibilityMode = Options.EXTENSION; } final List arguments = optionsConfiguration.getArguments(); try { options.parseArguments(arguments.toArray(new String[arguments .size()])); } catch (BadCommandLineException bclex) { throw new MojoExecutionException("Error parsing the command line [" + arguments + "]", bclex); } return options; } private SpecVersion createSpecVersion(String specVersion) { if (specVersion == null) { return SpecVersion.LATEST; } else { final SpecVersion sv = SpecVersion.parse(specVersion); return sv == null ? SpecVersion.LATEST : sv; } } private String createEncoding(String encoding) throws MojoExecutionException { if (encoding == null) { return null; } try { if (!Charset.isSupported(encoding)) { throw new MojoExecutionException( MessageFormat.format("Unsupported encoding [{0}].", encoding)); } return encoding; } catch (IllegalCharsetNameException icne) { throw new MojoExecutionException( MessageFormat.format("Unsupported encoding [{0}].", encoding)); } } private Language createLanguage(String schemaLanguage) throws MojoExecutionException { if (StringUtils.isEmpty(schemaLanguage)) { return null; } else if ("AUTODETECT".equalsIgnoreCase(schemaLanguage)) return null; // nothing, it is AUTDETECT by default. else if ("XMLSCHEMA".equalsIgnoreCase(schemaLanguage)) return Language.XMLSCHEMA; else if ("DTD".equalsIgnoreCase(schemaLanguage)) return Language.DTD; else if ("WSDL".equalsIgnoreCase(schemaLanguage)) return Language.WSDL; else { throw new MojoExecutionException(MessageFormat.format( "Unknown schemaLanguage [{0}].", schemaLanguage)); } } } maven-jaxb2-plugin-0.15.1/plugin/src/main/java/org/jvnet/mjiip/v_2/XJC2Mojo.java000066400000000000000000000014661423155634000270610ustar00rootroot00000000000000package org.jvnet.mjiip.v_2; import org.apache.maven.plugins.annotations.LifecyclePhase; import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.ResolutionScope; import org.jvnet.mjiip.v_2_3.XJC23Mojo; import com.sun.tools.xjc.Options; /** * JAXB 2.x Mojo. * * @author Aleksei Valikov (valikov@gmx.net) */ @Mojo(name = "generate", defaultPhase = LifecyclePhase.GENERATE_SOURCES, requiresDependencyResolution = ResolutionScope.COMPILE, requiresDependencyCollection = ResolutionScope.COMPILE, threadSafe = true) public class XJC2Mojo extends XJC23Mojo { private final org.jvnet.jaxb2.maven2.OptionsFactory optionsFactory = new OptionsFactory(); @Override protected org.jvnet.jaxb2.maven2.OptionsFactory getOptionsFactory() { return optionsFactory; } } maven-jaxb2-plugin-0.15.1/plugin/src/main/resources/000077500000000000000000000000001423155634000222325ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin/src/main/resources/META-INF/000077500000000000000000000000001423155634000233725ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin/src/main/resources/META-INF/m2e/000077500000000000000000000000001423155634000240555ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml000066400000000000000000000007031423155634000317450ustar00rootroot00000000000000 generate true true maven-jaxb2-plugin-0.15.1/plugin/src/site/000077500000000000000000000000001423155634000202405ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin/src/site/site.xml000066400000000000000000000001451423155634000217260ustar00rootroot00000000000000 ${reports} maven-jaxb2-plugin-0.15.1/plugin/src/test/000077500000000000000000000000001423155634000202535ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin/src/test/java/000077500000000000000000000000001423155634000211745ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin/src/test/java/org/000077500000000000000000000000001423155634000217635ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin/src/test/java/org/jvnet/000077500000000000000000000000001423155634000231115ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin/src/test/java/org/jvnet/jaxb2/000077500000000000000000000000001423155634000241175ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin/src/test/java/org/jvnet/jaxb2/maven2/000077500000000000000000000000001423155634000253075ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin/src/test/java/org/jvnet/jaxb2/maven2/JAXBGenerateTest.java000066400000000000000000000060671423155634000312220ustar00rootroot00000000000000/* * Copyright [2006] java.net * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.jvnet.jaxb2.maven2; import java.io.File; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.repository.DefaultArtifactRepository; import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.testing.AbstractMojoTestCase; import org.apache.maven.project.MavenProject; import org.apache.maven.project.MavenProjectBuilder; import org.jvnet.mjiip.v_2.XJC2Mojo; public abstract class JAXBGenerateTest extends AbstractMojoTestCase { static { System.setProperty("basedir", getBaseDir().getAbsolutePath()); } protected MavenProjectBuilder mavenProjectBuilder; protected void setUp() throws Exception { super.setUp(); mavenProjectBuilder = (MavenProjectBuilder) getContainer().lookup( MavenProjectBuilder.ROLE); } protected static File getBaseDir() { try { return (new File(JAXBGenerateTest.class.getProtectionDomain() .getCodeSource().getLocation().getFile())).getParentFile() .getParentFile().getAbsoluteFile(); } catch (Exception ex) { throw new AssertionError(ex); } } /** * Validate the generation of a java files from purchaseorder.xsd. * * @throws MojoExecutionException */ public void testExecute() throws Exception { final File pom = new File(getBaseDir(), "src/test/resources/test-pom.xml"); final ArtifactRepository localRepository = new DefaultArtifactRepository( "local", new File(getBaseDir(), "target/test-repository").toURI().toURL().toString() , new DefaultRepositoryLayout()); final MavenProject mavenProject = mavenProjectBuilder.build(pom, localRepository, null); final XJC2Mojo generator = (XJC2Mojo) lookupMojo("generate", pom); generator.setProject(mavenProject); generator.setLocalRepository(localRepository); generator.setSchemaDirectory(new File(getBaseDir(),"src/test/resources/")); generator.setSchemaIncludes(new String[] { "*.xsd" }); generator.setBindingIncludes(new String[] { "*.xjb" }); generator.setGenerateDirectory(new File(getBaseDir(), "target/test/generated-sources")); generator.setVerbose(true); generator.setGeneratePackage("unittest"); generator.setRemoveOldOutput(false); generator.execute(); } public static void main(String[] args) throws Exception { // new JAXBGenerateTest().testExecute(); } } maven-jaxb2-plugin-0.15.1/plugin/src/test/java/org/jvnet/jaxb2/maven2/JAXBGenerateTestSuite.java000066400000000000000000000023741423155634000322310ustar00rootroot00000000000000/* * Copyright [2006] java.net * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.jvnet.jaxb2.maven2; import junit.framework.Test; import junit.framework.TestSuite; /** * Created by IntelliJ IDEA. User: Owner Date: Feb 8, 2006 Time: 12:20:24 AM To * change this template use File | Settings | File Templates. */ public class JAXBGenerateTestSuite { public static Test suite() { TestSuite suite = new TestSuite(); // Test all methods // suite.addTestSuite(JAXBGenerateTest.class); return suite; } /** Runs the test suite using the textual runner. */ public static void main(String[] args) { junit.textui.TestRunner.run(suite()); } } maven-jaxb2-plugin-0.15.1/plugin/src/test/resources/000077500000000000000000000000001423155634000222655ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/plugin/src/test/resources/purchaseorder.xsd000066400000000000000000000045051423155634000256570ustar00rootroot00000000000000 Purchase order schema for Example.com. Copyright 2000 Example.com. All rights reserved. maven-jaxb2-plugin-0.15.1/plugin/src/test/resources/test-pom.xml000066400000000000000000000031641423155634000245630ustar00rootroot00000000000000 4.0.0 org.jvnet.jaxb2_commons samples-basic-maven 1.0 jar JAXB2 Commons Samples - Basic Maven org.jvnet.jaxb2_commons jaxb2-basics 0.6.0 org.jvnet.jaxb2_commons jaxb2-basics-testing 0.6.0 test test org.jvnet.jaxb2.maven2 maven-jaxb2-plugin generate -XtoString -Xequals -XhashCode -Xcopyable org.jvnet.jaxb2_commons basic 0.6.0 maven-compiler-plugin 1.7 1.7 maven-jaxb2-plugin-0.15.1/pom.xml000066400000000000000000000375411423155634000165360ustar00rootroot00000000000000 4.0.0 org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-project 0.15.1 pom Maven JAXB 2.x Plugin Project Maven2 plugin for JAXB 2.x XJC compiler to generate Java sources from XML Schemas. https://github.com/highsource/maven-jaxb2-plugin BSD-Style License https://github.com/highsource/maven-jaxb2-plugin/blob/master/LICENSE repo Maven JAXB2 Plugin license is the 3-clause BSD license which is compatible with GPL. Maven JAXB2 Plugin license does not require you to include any acknowledgments for Maven JAXB2 Plugin in advertising materials for your software. 2006 scm:git:https://github.com/highsource/maven-jaxb2-plugin.git https://github.com/highsource/maven-jaxb2-plugin 0.15.1 lexi Aleksei Valikov valikov@gmx.net project creator mattrpav Matt Pavlovich mattrpav@gmail.com maintainer plugin-core plugin-2.0 plugin-2.1 plugin-2.2 plugin-2.3 plugin testing UTF-8 2.0.9 2.0.5 2.1.13 2.2.11 2.3.6 2.3.1 ${jaxb23.version} 1.8.3 1.2.18 20140925 1.4.5 3.0.12 1.2.2 0.12.0 2.1 3.5 1.6.8 1.7.25 samples samples samples dist tests tests tests all all dist samples tests sonatype-oss-release org.apache.maven.plugins maven-source-plugin attach-sources jar-no-fork org.apache.maven.plugins maven-javadoc-plugin attach-javadocs jar org.apache.maven.plugins maven-gpg-plugin 1.6 sign-artifacts verify sign org.apache.maven.plugins maven-release-plugin 2.5.3 true true @{project.version} true clean package deploy org.sonatype.plugins nexus-staging-maven-plugin ${maven-nexus-staging-maven-plugin.version} true oss-sonatype-staging https://oss.sonatype.org/ false 30 ossrh https://oss.sonatype.org/content/repositories/snapshots ossrh https://oss.sonatype.org/service/local/staging/deploy/maven2/ junit junit test org.glassfish.jaxb jaxb-runtime ${jaxb.version} org.glassfish.jaxb jaxb-core 2.3.0.1 javax.xml.bind jaxb-api ${jaxb-api.version} org.glassfish.jaxb txw2 ${jaxb.version} com.sun.istack istack-commons-runtime ${istack.version} org.jvnet.staxex stax-ex ${stax-ex.version} com.sun.xml.fastinfoset FastInfoset ${fastinfoset.version} org.glassfish.jaxb jaxb-xjc ${jaxb.version} com.sun.xsom xsom ${xsom.version} org.glassfish.jaxb codemodel ${jaxb.version} com.sun.xml.bind.external rngom ${jaxb.version} com.sun.xml.dtd-parser dtd-parser ${dtd-parser.version} com.sun.istack istack-commons-tools ${istack.version} org.apache.ant ant com.sun tools com.sun.activation jakarta.activation ${activation.version} com.sun.xml.bind jaxb-extra-osgi ${jaxb.version} org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-core ${project.version} org.jvnet.jaxb2.maven2 maven-jaxb2-plugin ${project.version} org.jvnet.jaxb2.maven2 maven-jaxb20-plugin ${project.version} org.jvnet.jaxb2.maven2 maven-jaxb21-plugin ${project.version} org.jvnet.jaxb2.maven2 maven-jaxb22-plugin ${project.version} org.jvnet.jaxb2.maven2 maven-jaxb23-plugin ${project.version} org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-testing ${project.version} org.apache.maven maven-artifact ${maven.version} org.apache.maven maven-plugin-api ${maven.version} org.apache.maven maven-project ${maven.version} org.apache.maven maven-model ${maven.version} org.apache.maven maven-core ${maven.version} org.apache.maven maven-artifact-manager ${maven.version} org.apache.maven maven-repository-metadata ${maven.version} org.apache.maven.plugin-tools maven-plugin-annotations ${maven.plugin.plugin.version} junit junit 4.13.2 org.apache.maven.plugin-testing maven-plugin-testing-tools ${maven.plugin.testing.version} test org.apache.maven.plugin-testing maven-plugin-testing-harness ${maven.plugin.testing.version} test org.codehaus.plexus plexus-interpolation 1.9 test org.sonatype.plexus plexus-build-api 0.0.7 org.codehaus.plexus plexus-utils 1.5.15 org.apache.commons commons-lang3 3.12.0 org.slf4j slf4j-api ${slf4j.version} org.jvnet.jaxb2_commons jaxb2-basics-runtime ${jaxb2-basics.version} install org.apache.maven.plugins maven-plugin-plugin ${maven.plugin.plugin.version} true mojo-descriptor process-classes descriptor help-goal helpmojo maven-compiler-plugin 3.7.0 1.8 1.8 org.apache.maven.plugins maven-deploy-plugin 2.8.2 org.apache.maven.plugins maven-dependency-plugin 3.1.0 org.apache.maven.plugins maven-javadoc-plugin 3.3.2 org.apache.maven.plugins maven-source-plugin 3.0.1 org.codehaus.mojo build-helper-maven-plugin 3.0.0 org.eclipse.m2e lifecycle-mapping 1.0.0 org.apache.maven.plugins maven-plugin-plugin [3.2,) helpmojo descriptor maven-jaxb2-plugin-0.15.1/qrelease.bat000066400000000000000000000032171423155634000175030ustar00rootroot00000000000000setlocal echo Setting JAVA_HOME to %JAVA9_HOME%. set JAVA_HOME=%JAVA9_HOME% echo Performing a full clean build. rem pause call mvn clean install -Pall,sonatype-oss-release -DperformRelease echo Full clean build completed. rem pause echo Setting new version to %1. rem pause call mvn versions:set -Pall -DnewVersion=%1 echo Version was set to %1. rem pause call mvn versions:commit -Pall echo Version %1 committed. rem pause echo Performing a full clean build. rem pause call mvn clean install -Pall,sonatype-oss-release -DperformRelease echo Full clean build completed. rem pause echo Checking in version %1. rem pause git commit -a -m "Version %1" echo Version %1 was checked in. rem pause echo Tagging version %1. rem pause git tag -a %1 -m "Version %1" echo Version %1 was tagged. rem pause echo Pushing version %1. rem pause git push origin master git push --tags origin master echo Version %1 was pushed. rem pause echo Performing full clean deploy. rem pause call mvn -DperformRelease -Pall,sonatype-oss-release clean deploy echo Full clean deploy done. rem pause echo Setting new version to %2. rem pause call mvn versions:set -Pall -DnewVersion=%2 echo Version was set to %2. rem pause call mvn versions:commit -Pall echo Version %2 was committed. rem pause echo Performing a full clean build. rem pause call mvn clean install -DperformRelease -Pall,sonatype-oss-release echo Full clean build completed. rem pause echo Checking in version %2. rem pause git commit -a -m "Version %2" echo Version %2 was checked in. rem pause echo Pushing version %2. rem pause git push origin master git push --tags origin master echo Version %2 was pushed. rem pause endlocalmaven-jaxb2-plugin-0.15.1/samples/000077500000000000000000000000001423155634000166535ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/samples/catalog/000077500000000000000000000000001423155634000202655ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/samples/catalog/.gitignore000066400000000000000000000000111423155634000222450ustar00rootroot00000000000000/target/ maven-jaxb2-plugin-0.15.1/samples/catalog/pom.xml000066400000000000000000000024351423155634000216060ustar00rootroot00000000000000 4.0.0 org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-sample-catalog pom Maven JAXB 2.x Plugin Sample [catalog] org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-samples 0.15.1-SNAPSHOT install maven-assembly-plugin maven-assembly package maven-antrun-plugin maven-unpack pre-integration-test maven-invoker-plugin maven-integration-test integration-test maven-jaxb2-plugin-0.15.1/samples/catalog/project-pom.xml000066400000000000000000000026651423155634000232570ustar00rootroot00000000000000 4.0.0 org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-sample-catalog-maven ${project.version} jar Maven JAXB 2.x Plugin Sample [catalog|maven] org.glassfish.jaxb jaxb-runtime ${jaxb.version} install org.jvnet.jaxb2.maven2 maven-jaxb2-plugin ${project.version} generate src/main/resources/catalog.cat schema_b.xsd org.apache.maven.plugins maven-compiler-plugin 1.7 1.7 maven-jaxb2-plugin-0.15.1/samples/catalog/src/000077500000000000000000000000001423155634000210545ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/samples/catalog/src/main/000077500000000000000000000000001423155634000220005ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/samples/catalog/src/main/assembly/000077500000000000000000000000001423155634000236175ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/samples/catalog/src/main/assembly/maven-src.xml000066400000000000000000000007501423155634000262360ustar00rootroot00000000000000 maven-src zip README* LICENSE* NOTICE* src ${basedir}/project-pom.xml pom.xml true maven-jaxb2-plugin-0.15.1/samples/catalog/src/main/resources/000077500000000000000000000000001423155634000240125ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/samples/catalog/src/main/resources/catalog.cat000066400000000000000000000003141423155634000261130ustar00rootroot00000000000000-- If the parameter isn't working, this link to schema A is not recognized and the test will fail because of a missing schema. -- REWRITE_SYSTEM "http://example.org/schemas" "." maven-jaxb2-plugin-0.15.1/samples/catalog/src/main/resources/schema_a.xsd000066400000000000000000000003071423155634000262720ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/samples/catalog/src/main/resources/schema_b.xsd000066400000000000000000000005371423155634000263000ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/samples/dtd/000077500000000000000000000000001423155634000174265ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/samples/dtd/.gitignore000066400000000000000000000000111423155634000214060ustar00rootroot00000000000000/target/ maven-jaxb2-plugin-0.15.1/samples/dtd/pom.xml000066400000000000000000000024251423155634000207460ustar00rootroot00000000000000 4.0.0 org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-sample-dtd pom Maven JAXB 2.x Plugin Sample [dtd] org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-samples 0.15.1-SNAPSHOT install maven-assembly-plugin maven-assembly package maven-antrun-plugin maven-unpack pre-integration-test maven-invoker-plugin maven-integration-test integration-test maven-jaxb2-plugin-0.15.1/samples/dtd/project-pom.xml000066400000000000000000000026111423155634000224070ustar00rootroot00000000000000 4.0.0 org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-sample-dtd-maven ${project.version} jar Maven JAXB 2.x Plugin Sample [dtd|maven] org.glassfish.jaxb jaxb-runtime ${jaxb.version} install org.jvnet.jaxb2.maven2 maven-jaxb2-plugin ${project.version} generate dtd *.dtd org.apache.maven.plugins maven-compiler-plugin 1.7 1.7 maven-jaxb2-plugin-0.15.1/samples/dtd/src/000077500000000000000000000000001423155634000202155ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/samples/dtd/src/main/000077500000000000000000000000001423155634000211415ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/samples/dtd/src/main/assembly/000077500000000000000000000000001423155634000227605ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/samples/dtd/src/main/assembly/maven-src.xml000066400000000000000000000007501423155634000253770ustar00rootroot00000000000000 maven-src zip README* LICENSE* NOTICE* src ${basedir}/project-pom.xml pom.xml true maven-jaxb2-plugin-0.15.1/samples/dtd/src/main/resources/000077500000000000000000000000001423155634000231535ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/samples/dtd/src/main/resources/binding.xjb000066400000000000000000000123431423155634000252750ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/samples/dtd/src/main/resources/hibernate-mapping.dtd000066400000000000000000001273261423155634000272550ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/samples/episode/000077500000000000000000000000001423155634000203035ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/samples/episode/.gitignore000066400000000000000000000000111423155634000222630ustar00rootroot00000000000000/target/ maven-jaxb2-plugin-0.15.1/samples/episode/a/000077500000000000000000000000001423155634000205235ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/samples/episode/a/project-pom.xml000066400000000000000000000020341423155634000235030ustar00rootroot00000000000000 4.0.0 org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-sample-episode-maven ${project.version} maven-jaxb2-plugin-sample-episode-a-maven jar Maven JAXB 2.x Plugin Sample [episode-a|maven] org.glassfish.jaxb jaxb-runtime test org.jvnet.jaxb2.maven2 maven-jaxb2-plugin generate maven-jaxb2-plugin-0.15.1/samples/episode/a/src/000077500000000000000000000000001423155634000213125ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/samples/episode/a/src/main/000077500000000000000000000000001423155634000222365ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/samples/episode/a/src/main/resources/000077500000000000000000000000001423155634000242505ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/samples/episode/a/src/main/resources/a.xsd000066400000000000000000000015511423155634000252120ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/samples/episode/b/000077500000000000000000000000001423155634000205245ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/samples/episode/b/project-pom.xml000066400000000000000000000026601423155634000235110ustar00rootroot00000000000000 4.0.0 maven-jaxb2-plugin-sample-episode-b-maven Maven JAXB 2.x Plugin Sample [episode-b|maven] jar org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-sample-episode-maven ${project.version} org.glassfish.jaxb jaxb-runtime org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-sample-episode-a-maven ${project.version} provided test org.jvnet.jaxb2.maven2 maven-jaxb2-plugin true org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-sample-episode-a-maven src/main/resources/catalog.cat maven-jaxb2-plugin-0.15.1/samples/episode/b/src/000077500000000000000000000000001423155634000213135ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/samples/episode/b/src/main/000077500000000000000000000000001423155634000222375ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/samples/episode/b/src/main/resources/000077500000000000000000000000001423155634000242515ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/samples/episode/b/src/main/resources/b.xsd000066400000000000000000000020231423155634000252070ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/samples/episode/b/src/main/resources/catalog.cat000066400000000000000000000005511423155634000263550ustar00rootroot00000000000000-- If the parameter isn't working, this link to schema A is not recognized and the test will fail because of a missing schema. -- REWRITE_SYSTEM "https://maven-jaxb2-plugin.dev.java.net/svn/maven-jaxb2-plugin/trunk/samples/episode/a/src/main/resources/a.xsd" "maven:org.jvnet.jaxb2.maven2:maven-jaxb2-plugin-sample-episode-a-maven!/a.xsd"maven-jaxb2-plugin-0.15.1/samples/episode/c/000077500000000000000000000000001423155634000205255ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/samples/episode/c/project-pom.xml000066400000000000000000000032101423155634000235020ustar00rootroot00000000000000 4.0.0 maven-jaxb2-plugin-sample-episode-c-maven Maven JAXB 2.x Plugin Sample [episode-c|maven] jar org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-sample-episode-maven ${project.version} org.glassfish.jaxb jaxb-runtime org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-sample-episode-a-maven ${project.version} provided test org.jvnet.jaxb2.maven2 maven-jaxb2-plugin true org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-sample-episode-b-maven ${project.version} catalog.cat true maven-jaxb2-plugin-0.15.1/samples/episode/c/src/000077500000000000000000000000001423155634000213145ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/samples/episode/c/src/main/000077500000000000000000000000001423155634000222405ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/samples/episode/c/src/main/resources/000077500000000000000000000000001423155634000242525ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/samples/episode/c/src/main/resources/c.xsd000066400000000000000000000020231423155634000252110ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/samples/episode/pom.xml000066400000000000000000000024351423155634000216240ustar00rootroot00000000000000 4.0.0 org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-sample-episode pom Maven JAXB 2.x Plugin Sample [episode] org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-samples 0.15.1-SNAPSHOT install maven-assembly-plugin maven-assembly package maven-antrun-plugin maven-unpack pre-integration-test maven-invoker-plugin maven-integration-test integration-test maven-jaxb2-plugin-0.15.1/samples/episode/project-pom.xml000066400000000000000000000026101423155634000232630ustar00rootroot00000000000000 4.0.0 org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-sample-episode-maven ${project.version} pom Maven JAXB 2.x Plugin Sample [episode|maven] org.glassfish.jaxb jaxb-runtime ${jaxb.version} a b c install org.jvnet.jaxb2.maven2 maven-jaxb2-plugin ${project.version} generate maven-compiler-plugin 1.7 1.7 maven-jaxb2-plugin-0.15.1/samples/episode/src/000077500000000000000000000000001423155634000210725ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/samples/episode/src/main/000077500000000000000000000000001423155634000220165ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/samples/episode/src/main/assembly/000077500000000000000000000000001423155634000236355ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/samples/episode/src/main/assembly/maven-src.xml000066400000000000000000000020641423155634000262540ustar00rootroot00000000000000 maven-src zip README* LICENSE* NOTICE* src a/src b/src c/src ${basedir}/project-pom.xml pom.xml true ${basedir}/a/project-pom.xml a/pom.xml true ${basedir}/b/project-pom.xml b/pom.xml true ${basedir}/c/project-pom.xml c/pom.xml true maven-jaxb2-plugin-0.15.1/samples/jaxbplugins/000077500000000000000000000000001423155634000212015ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/samples/jaxbplugins/.gitignore000066400000000000000000000000111423155634000231610ustar00rootroot00000000000000/target/ maven-jaxb2-plugin-0.15.1/samples/jaxbplugins/pom.xml000066400000000000000000000024451423155634000225230ustar00rootroot00000000000000 4.0.0 org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-sample-jaxbplugins pom Maven JAXB 2.x Plugin Sample [jaxbplugins] org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-samples 0.15.1-SNAPSHOT install maven-assembly-plugin maven-assembly package maven-antrun-plugin maven-unpack pre-integration-test maven-invoker-plugin maven-integration-test integration-test maven-jaxb2-plugin-0.15.1/samples/jaxbplugins/project-pom.xml000066400000000000000000000034731423155634000241710ustar00rootroot00000000000000 4.0.0 org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-sample-jaxbplugins-maven ${project.version} jar Maven JAXB 2.x Plugin Sample [jaxbplugins|maven] org.glassfish.jaxb jaxb-runtime ${jaxb.version} org.jvnet.jaxb2_commons jaxb2-basics-runtime ${jaxb2-basics.version} install org.jvnet.jaxb2.maven2 maven-jaxb2-plugin ${project.version} generate -XtoString -Xequals -XhashCode -Xcopyable org.jvnet.jaxb2_commons jaxb2-basics ${jaxb2-basics.version} org.apache.maven.plugins maven-compiler-plugin 1.7 1.7 maven-jaxb2-plugin-0.15.1/samples/jaxbplugins/src/000077500000000000000000000000001423155634000217705ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/samples/jaxbplugins/src/main/000077500000000000000000000000001423155634000227145ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/samples/jaxbplugins/src/main/assembly/000077500000000000000000000000001423155634000245335ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/samples/jaxbplugins/src/main/assembly/maven-src.xml000066400000000000000000000007501423155634000271520ustar00rootroot00000000000000 maven-src zip README* LICENSE* NOTICE* src ${basedir}/project-pom.xml pom.xml true maven-jaxb2-plugin-0.15.1/samples/jaxbplugins/src/main/resources/000077500000000000000000000000001423155634000247265ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/samples/jaxbplugins/src/main/resources/purchaseorder.xsd000066400000000000000000000045051423155634000303200ustar00rootroot00000000000000 Purchase order schema for Example.com. Copyright 2000 Example.com. All rights reserved. maven-jaxb2-plugin-0.15.1/samples/po/000077500000000000000000000000001423155634000172715ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/samples/po/.gitignore000066400000000000000000000000111423155634000212510ustar00rootroot00000000000000/target/ maven-jaxb2-plugin-0.15.1/samples/po/pom.xml000066400000000000000000000024231423155634000206070ustar00rootroot00000000000000 4.0.0 org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-sample-po pom Maven JAXB 2.x Plugin Sample [po] org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-samples 0.15.1-SNAPSHOT install maven-assembly-plugin maven-assembly package maven-antrun-plugin maven-unpack pre-integration-test maven-invoker-plugin maven-integration-test integration-test maven-jaxb2-plugin-0.15.1/samples/po/project-pom.xml000066400000000000000000000023401423155634000222510ustar00rootroot00000000000000 4.0.0 org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-sample-po-maven ${project.version} jar Maven JAXB 2.x Plugin Sample [po|maven] org.glassfish.jaxb jaxb-runtime ${jaxb.version} install org.jvnet.jaxb2.maven2 maven-jaxb2-plugin ${project.version} generate org.apache.maven.plugins maven-compiler-plugin 1.7 1.7 maven-jaxb2-plugin-0.15.1/samples/po/src/000077500000000000000000000000001423155634000200605ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/samples/po/src/main/000077500000000000000000000000001423155634000210045ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/samples/po/src/main/assembly/000077500000000000000000000000001423155634000226235ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/samples/po/src/main/assembly/maven-src.xml000066400000000000000000000007501423155634000252420ustar00rootroot00000000000000 maven-src zip README* LICENSE* NOTICE* src ${basedir}/project-pom.xml pom.xml true maven-jaxb2-plugin-0.15.1/samples/po/src/main/resources/000077500000000000000000000000001423155634000230165ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/samples/po/src/main/resources/purchaseorder.xsd000066400000000000000000000045051423155634000264100ustar00rootroot00000000000000 Purchase order schema for Example.com. Copyright 2000 Example.com. All rights reserved. maven-jaxb2-plugin-0.15.1/samples/pom.xml000066400000000000000000000051041423155634000201700ustar00rootroot00000000000000 4.0.0 org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-samples pom Maven JAXB 2.X Plugin Samples org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-project 0.15.1-SNAPSHOT catalog dtd episode jaxbplugins po maven-assembly-plugin src/main/assembly/maven-src.xml maven-assembly none attached maven-antrun-plugin maven-unpack none run maven-invoker-plugin 2.0.0 maven-integration-test none run true ${basedir}/target/test-maven-assembly org.apache.maven.plugins maven-deploy-plugin true org.apache.maven.plugins maven-javadoc-plugin true maven-jaxb2-plugin-0.15.1/src/000077500000000000000000000000001423155634000157765ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/src/site/000077500000000000000000000000001423155634000167425ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/src/site/site.xml000066400000000000000000000004251423155634000204310ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/testing/000077500000000000000000000000001423155634000166645ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/testing/.gitignore000066400000000000000000000000111423155634000206440ustar00rootroot00000000000000/target/ maven-jaxb2-plugin-0.15.1/testing/pom.xml000066400000000000000000000017221423155634000202030ustar00rootroot00000000000000 4.0.0 maven-jaxb2-plugin-testing jar Maven JAXB 2.x Plugin Testing org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-project 0.15.1 junit junit compile org.jvnet.jaxb2.maven2 maven-jaxb2-plugin compile org.slf4j slf4j-api install maven-jaxb2-plugin-0.15.1/testing/src/000077500000000000000000000000001423155634000174535ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/testing/src/main/000077500000000000000000000000001423155634000203775ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/testing/src/main/java/000077500000000000000000000000001423155634000213205ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/testing/src/main/java/org/000077500000000000000000000000001423155634000221075ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/testing/src/main/java/org/jvnet/000077500000000000000000000000001423155634000232355ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/testing/src/main/java/org/jvnet/jaxb2/000077500000000000000000000000001423155634000242435ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/testing/src/main/java/org/jvnet/jaxb2/maven2/000077500000000000000000000000001423155634000254335ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/testing/src/main/java/org/jvnet/jaxb2/maven2/test/000077500000000000000000000000001423155634000264125ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/testing/src/main/java/org/jvnet/jaxb2/maven2/test/RunXJC2Mojo.java000066400000000000000000000036171423155634000313040ustar00rootroot00000000000000package org.jvnet.jaxb2.maven2.test; import java.io.File; import java.util.Collections; import java.util.List; import junit.framework.TestCase; import org.apache.maven.plugin.Mojo; import org.apache.maven.project.MavenProject; import org.jvnet.jaxb2.maven2.AbstractXJC2Mojo; import org.jvnet.mjiip.v_2.XJC2Mojo; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * Abstract test for plugins. * * @author Aleksei Valikov */ public class RunXJC2Mojo extends TestCase { /** * Logger. */ protected Logger log = LoggerFactory.getLogger(RunXJC2Mojo.class); public void testExecute() throws Exception { final Mojo mojo = initMojo(); mojo.execute(); } public void check() throws Exception { } protected File getBaseDir() { try { return (new File(getClass().getProtectionDomain().getCodeSource() .getLocation().toURI())).getParentFile().getParentFile() .getAbsoluteFile(); } catch (Exception ex) { throw new AssertionError(ex); } } public File getSchemaDirectory() { return new File(getBaseDir(), "src/main/resources"); } protected File getGeneratedDirectory() { return new File(getBaseDir(), "target/generated-sources/xjc"); } public List getArgs() { return Collections.emptyList(); } public String getGeneratePackage() { return null; } public boolean isWriteCode() { return true; } public AbstractXJC2Mojo initMojo() { final AbstractXJC2Mojo mojo = createMojo(); configureMojo(mojo); return mojo; } protected AbstractXJC2Mojo createMojo() { return new XJC2Mojo(); } protected void configureMojo(final AbstractXJC2Mojo mojo) { mojo.setProject(new MavenProject()); mojo.setSchemaDirectory(getSchemaDirectory()); mojo.setGenerateDirectory(getGeneratedDirectory()); mojo.setGeneratePackage(getGeneratePackage()); mojo.setArgs(getArgs()); mojo.setVerbose(true); mojo.setDebug(true); mojo.setWriteCode(isWriteCode()); } }maven-jaxb2-plugin-0.15.1/testing/src/main/java/org/jvnet/jaxb2/maven2/test/plugin/000077500000000000000000000000001423155634000277105ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/testing/src/main/java/org/jvnet/jaxb2/maven2/test/plugin/foo/000077500000000000000000000000001423155634000304735ustar00rootroot00000000000000FooPlugin.java000066400000000000000000000034571423155634000331720ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/testing/src/main/java/org/jvnet/jaxb2/maven2/test/plugin/foopackage org.jvnet.jaxb2.maven2.test.plugin.foo; import java.util.Collections; import java.util.List; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.xml.sax.ErrorHandler; import com.sun.tools.xjc.Options; import com.sun.tools.xjc.Plugin; import com.sun.tools.xjc.model.CClassInfo; import com.sun.tools.xjc.model.CPluginCustomization; import com.sun.tools.xjc.model.CPropertyInfo; import com.sun.tools.xjc.outline.ClassOutline; import com.sun.tools.xjc.outline.FieldOutline; import com.sun.tools.xjc.outline.Outline; public class FooPlugin extends Plugin { private Logger logger = LoggerFactory.getLogger(getClass()); @Override public String getOptionName() { return "Xfoo"; } @Override public String getUsage() { return " -Xfoo : does nothing"; } @Override public boolean run(Outline outline, Options opt, ErrorHandler errorHandler) { for (final ClassOutline classOutline : outline.getClasses()) { for (final CPluginCustomization pluginCustomization : classOutline.target .getCustomizations()) { pluginCustomization.markAsAcknowledged(); } final CClassInfo classInfo = classOutline.target; logger.debug("Class:" + classInfo.getName()); for (final FieldOutline fieldOutline : classOutline .getDeclaredFields()) { final CPropertyInfo propertyInfo = fieldOutline .getPropertyInfo(); logger.debug("Property:" + propertyInfo.getName(true)); for (final CPluginCustomization pluginCustomization : fieldOutline .getPropertyInfo().getCustomizations()) { pluginCustomization.markAsAcknowledged(); } } } return true; } @Override public List getCustomizationURIs() { return Collections.emptyList(); } @Override public boolean isCustomizationTagName(String nsUri, String localName) { return true; } } maven-jaxb2-plugin-0.15.1/testing/src/main/resources/000077500000000000000000000000001423155634000224115ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/testing/src/main/resources/META-INF/000077500000000000000000000000001423155634000235515ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/testing/src/main/resources/META-INF/services/000077500000000000000000000000001423155634000253745ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/testing/src/main/resources/META-INF/services/com.sun.tools.xjc.Plugin000066400000000000000000000000621423155634000320560ustar00rootroot00000000000000org.jvnet.jaxb2.maven2.test.plugin.foo.FooPlugin maven-jaxb2-plugin-0.15.1/testing/src/site/000077500000000000000000000000001423155634000204175ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/testing/src/site/site.xml000066400000000000000000000001651423155634000221070ustar00rootroot00000000000000 ${reports} maven-jaxb2-plugin-0.15.1/testing/src/test/000077500000000000000000000000001423155634000204325ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/testing/src/test/java/000077500000000000000000000000001423155634000213535ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/testing/src/test/java/org/000077500000000000000000000000001423155634000221425ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/testing/src/test/java/org/jvnet/000077500000000000000000000000001423155634000232705ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/testing/src/test/java/org/jvnet/jaxb2/000077500000000000000000000000001423155634000242765ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/testing/src/test/java/org/jvnet/jaxb2/maven2/000077500000000000000000000000001423155634000254665ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/testing/src/test/java/org/jvnet/jaxb2/maven2/test/000077500000000000000000000000001423155634000264455ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/testing/src/test/java/org/jvnet/jaxb2/maven2/test/plugin/000077500000000000000000000000001423155634000277435ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/testing/src/test/java/org/jvnet/jaxb2/maven2/test/plugin/foo/000077500000000000000000000000001423155634000305265ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/testing/src/test/java/org/jvnet/jaxb2/maven2/test/plugin/foo/tests/000077500000000000000000000000001423155634000316705ustar00rootroot00000000000000RunFooPlugin.java000066400000000000000000000007021423155634000350420ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/testing/src/test/java/org/jvnet/jaxb2/maven2/test/plugin/foo/testspackage org.jvnet.jaxb2.maven2.test.plugin.foo.tests; import java.io.File; import java.util.Collections; import java.util.List; import org.jvnet.jaxb2.maven2.test.RunXJC2Mojo; public class RunFooPlugin extends RunXJC2Mojo { @Override public File getSchemaDirectory() { return new File(getBaseDir(), "src/test/resources"); } @Override public List getArgs() { return Collections.singletonList("-Xfoo"); } } maven-jaxb2-plugin-0.15.1/testing/src/test/resources/000077500000000000000000000000001423155634000224445ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/testing/src/test/resources/log4j.properties000066400000000000000000000004021423155634000255750ustar00rootroot00000000000000log4j.rootCategory=DEBUG, stdout log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.target=system.out log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - <%m>%nmaven-jaxb2-plugin-0.15.1/testing/src/test/resources/purchaseorder.xsd000066400000000000000000000045051423155634000260360ustar00rootroot00000000000000 Purchase order schema for Example.com. Copyright 2000 Example.com. All rights reserved. maven-jaxb2-plugin-0.15.1/tests/000077500000000000000000000000001423155634000163515ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/JAXB-1044/000077500000000000000000000000001423155634000174635ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/JAXB-1044/.gitignore000066400000000000000000000000111423155634000214430ustar00rootroot00000000000000/target/ maven-jaxb2-plugin-0.15.1/tests/JAXB-1044/pom.xml000066400000000000000000000026201423155634000210000ustar00rootroot00000000000000 4.0.0 maven-jaxb2-plugin-tests-JAXB-1044 org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests 0.15.1-SNAPSHOT jar Maven JAXB 2.x Plugin Tests [MAVEN_JAXB2_PLUGIN-JAXB-1044] org.glassfish.jaxb jaxb-runtime org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-testing test org.jvnet.jaxb2.maven2 maven-jaxb2-plugin generate generate src/main/resources/catalog.cat http://www.ab.org/a.xsd maven-jaxb2-plugin-0.15.1/tests/JAXB-1044/src/000077500000000000000000000000001423155634000202525ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/JAXB-1044/src/main/000077500000000000000000000000001423155634000211765ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/JAXB-1044/src/main/resources/000077500000000000000000000000001423155634000232105ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/JAXB-1044/src/main/resources/a.xjb000066400000000000000000000005001423155634000241300ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/tests/JAXB-1044/src/main/resources/a.xsd000066400000000000000000000006761423155634000241610ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/tests/JAXB-1044/src/main/resources/b.xsd000066400000000000000000000004771423155634000241610ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/tests/JAXB-1044/src/main/resources/catalog.cat000066400000000000000000000000501423155634000253060ustar00rootroot00000000000000REWRITE_SYSTEM "http://www.ab.org" "." maven-jaxb2-plugin-0.15.1/tests/JAXB-1044/src/test/000077500000000000000000000000001423155634000212315ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/JAXB-1044/src/test/java/000077500000000000000000000000001423155634000221525ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/JAXB-1044/src/test/java/org/000077500000000000000000000000001423155634000227415ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/JAXB-1044/src/test/java/org/jvnet/000077500000000000000000000000001423155634000240675ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/JAXB-1044/src/test/java/org/jvnet/jaxb2/000077500000000000000000000000001423155634000250755ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/JAXB-1044/src/test/java/org/jvnet/jaxb2/maven2/000077500000000000000000000000001423155634000262655ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/JAXB-1044/src/test/java/org/jvnet/jaxb2/maven2/tests/000077500000000000000000000000001423155634000274275ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/JAXB-1044/src/test/java/org/jvnet/jaxb2/maven2/tests/JAXB_1044/000077500000000000000000000000001423155634000306235ustar00rootroot00000000000000RunJAXB_1044Mojo.java000066400000000000000000000012621423155634000341160ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/JAXB-1044/src/test/java/org/jvnet/jaxb2/maven2/tests/JAXB_1044package org.jvnet.jaxb2.maven2.tests.JAXB_1044; import java.io.File; import org.jvnet.jaxb2.maven2.AbstractXJC2Mojo; import org.jvnet.jaxb2.maven2.ResourceEntry; import org.jvnet.jaxb2.maven2.test.RunXJC2Mojo; public class RunJAXB_1044Mojo extends RunXJC2Mojo { @Override protected void configureMojo(AbstractXJC2Mojo mojo) { super.configureMojo(mojo); final ResourceEntry a_xsd = new ResourceEntry(); a_xsd.setUrl("http://www.ab.org/a.xsd"); mojo.setStrict(false); mojo.setSchemaIncludes(new String[] {}); mojo.setSchemas(new ResourceEntry[] { a_xsd }); mojo.setCatalog(new File(getBaseDir(), "src/main/resources/catalog.cat")); mojo.setForceRegenerate(true); } } maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-49/000077500000000000000000000000001423155634000214155ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-49/.gitignore000066400000000000000000000000111423155634000233750ustar00rootroot00000000000000/target/ maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-49/pom.xml000066400000000000000000000024631423155634000227370ustar00rootroot00000000000000 4.0.0 maven-jaxb2-plugin-tests-MAVEN_JAXB2_PLUGIN-49 org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests 0.15.1-SNAPSHOT jar Maven JAXB 2.x Plugin Tests [MAVEN_JAXB2_PLUGIN-49] org.glassfish.jaxb jaxb-runtime org.jvnet.jaxb2.maven2 maven-jaxb2-plugin generate generate true src/main/resources/catalog.cat http://schemas.opengis.net/wms/1.3.0/exceptions_1_3_0.xsd maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-49/src/000077500000000000000000000000001423155634000222045ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-49/src/main/000077500000000000000000000000001423155634000231305ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-49/src/main/resources/000077500000000000000000000000001423155634000251425ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-49/src/main/resources/catalog.cat000066400000000000000000000000731423155634000272450ustar00rootroot00000000000000REWRITE_SYSTEM "http://schemas.opengis.net" "../schema/ogc"maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-49/src/main/schema/000077500000000000000000000000001423155634000243705ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-49/src/main/schema/ogc/000077500000000000000000000000001423155634000251405ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-49/src/main/schema/ogc/wms/000077500000000000000000000000001423155634000257465ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-49/src/main/schema/ogc/wms/1.3.0/000077500000000000000000000000001423155634000264055ustar00rootroot00000000000000exceptions_1_3_0.xsd000066400000000000000000000022551423155634000321140ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-49/src/main/schema/ogc/wms/1.3.0 maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-53/000077500000000000000000000000001423155634000214105ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-53/a/000077500000000000000000000000001423155634000216305ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-53/a/.gitignore000066400000000000000000000000111423155634000236100ustar00rootroot00000000000000/target/ maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-53/a/pom.xml000066400000000000000000000014361423155634000231510ustar00rootroot00000000000000 4.0.0 org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests-MAVEN_JAXB2_PLUGIN-53 0.15.1-SNAPSHOT maven-jaxb2-plugin-tests-MAVEN_JAXB2_PLUGIN-53-a jar Maven JAXB 2.x Plugin Tests [MAVEN_JAXB2_PLUGIN-53:a] test org.jvnet.jaxb2.maven2 maven-jaxb23-plugin maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-53/a/src/000077500000000000000000000000001423155634000224175ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-53/a/src/main/000077500000000000000000000000001423155634000233435ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-53/a/src/main/resources/000077500000000000000000000000001423155634000253555ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-53/a/src/main/resources/a.xsd000066400000000000000000000022231423155634000263140ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-53/b/000077500000000000000000000000001423155634000216315ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-53/b/.gitignore000066400000000000000000000000111423155634000236110ustar00rootroot00000000000000/target/ maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-53/b/pom.xml000066400000000000000000000027731423155634000231570ustar00rootroot00000000000000 4.0.0 org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests-MAVEN_JAXB2_PLUGIN-53 0.15.1-SNAPSHOT maven-jaxb2-plugin-tests-MAVEN_JAXB2_PLUGIN-53-b jar Maven JAXB 2.x Plugin Tests [MAVEN_JAXB2_PLUGIN-53:b] org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-testing test org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests-MAVEN_JAXB2_PLUGIN-53-a ${project.version} provided test org.jvnet.jaxb2.maven2 maven-jaxb23-plugin true org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests-MAVEN_JAXB2_PLUGIN-53-a src/main/resources/catalog.cat maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-53/b/src/000077500000000000000000000000001423155634000224205ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-53/b/src/main/000077500000000000000000000000001423155634000233445ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-53/b/src/main/resources/000077500000000000000000000000001423155634000253565ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-53/b/src/main/resources/b.xsd000066400000000000000000000026671423155634000263320ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-53/b/src/main/resources/catalog.cat000066400000000000000000000005461423155634000274660ustar00rootroot00000000000000-- If the parameter isn't working, this link to schema A is not recognized and the test will fail because of a missing schema. PUBLIC "http://maven-jaxb2-plugin/samples/episode/a" "a/a.xsd" -- PUBLIC "http://maven-jaxb2-plugin/samples/episode/a" "maven:org.jvnet.jaxb2.maven2:maven-jaxb2-plugin-tests-MAVEN_JAXB2_PLUGIN-53-a:jar::!/a.xsd" maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-53/b/src/test/000077500000000000000000000000001423155634000233775ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-53/b/src/test/java/000077500000000000000000000000001423155634000243205ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-53/b/src/test/java/org/000077500000000000000000000000001423155634000251075ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-53/b/src/test/java/org/jvnet/000077500000000000000000000000001423155634000262355ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-53/b/src/test/java/org/jvnet/jaxb2/000077500000000000000000000000001423155634000272435ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-53/b/src/test/java/org/jvnet/jaxb2/maven2/000077500000000000000000000000001423155634000304335ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-53/b/src/test/java/org/jvnet/jaxb2/maven2/tests/000077500000000000000000000000001423155634000315755ustar00rootroot00000000000000MAVEN_JAXB2_PLUGIN_53/000077500000000000000000000000001423155634000346375ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-53/b/src/test/java/org/jvnet/jaxb2/maven2/testsb/000077500000000000000000000000001423155634000350605ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-53/b/src/test/java/org/jvnet/jaxb2/maven2/tests/MAVEN_JAXB2_PLUGIN_53RunMAVEN_JAXB2_PLUGIN_53Mojo.java000066400000000000000000000007661423155634000423670ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-53/b/src/test/java/org/jvnet/jaxb2/maven2/tests/MAVEN_JAXB2_PLUGIN_53/bpackage org.jvnet.jaxb2.maven2.tests.MAVEN_JAXB2_PLUGIN_53.b; import java.io.File; import org.jvnet.jaxb2.maven2.AbstractXJC2Mojo; import org.jvnet.jaxb2.maven2.test.RunXJC2Mojo; public class RunMAVEN_JAXB2_PLUGIN_53Mojo extends RunXJC2Mojo { @Override protected void configureMojo(AbstractXJC2Mojo mojo) { super.configureMojo(mojo); mojo.setCatalog(new File(getBaseDir(), "src/main/resources/catalog.cat")); mojo.setUseDependenciesAsEpisodes(true); mojo.setForceRegenerate(true); } } maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-53/pom.xml000066400000000000000000000015051423155634000227260ustar00rootroot00000000000000 4.0.0 org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests 0.15.1-SNAPSHOT maven-jaxb2-plugin-tests-MAVEN_JAXB2_PLUGIN-53 pom Maven JAXB 2.x Plugin Tests [MAVEN_JAXB2_PLUGIN-53] a b org.glassfish.jaxb jaxb-runtime test maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-69/000077500000000000000000000000001423155634000214175ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-69/.gitignore000066400000000000000000000000111423155634000233770ustar00rootroot00000000000000/target/ maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-69/pom.xml000066400000000000000000000021551423155634000227370ustar00rootroot00000000000000 4.0.0 maven-jaxb2-plugin-tests-MAVEN_JAXB2_PLUGIN-69 org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests 0.15.1-SNAPSHOT jar Maven JAXB 2.x Plugin Tests [MAVEN_JAXB2_PLUGIN-69] org.glassfish.jaxb jaxb-runtime org.jvnet.jaxb2.maven2 maven-jaxb2-plugin generate generate maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-69/src/000077500000000000000000000000001423155634000222065ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-69/src/main/000077500000000000000000000000001423155634000231325ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-69/src/main/resources/000077500000000000000000000000001423155634000251445ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-69/src/main/resources/simple.xsd000066400000000000000000000012131423155634000271520ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-70/000077500000000000000000000000001423155634000214075ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-70/.gitignore000066400000000000000000000000111423155634000233670ustar00rootroot00000000000000/target/ maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-70/pom.xml000066400000000000000000000026161423155634000227310ustar00rootroot00000000000000 4.0.0 maven-jaxb2-plugin-tests-MAVEN_JAXB2_PLUGIN-70 org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests 0.15.1-SNAPSHOT jar Maven JAXB 2.x Plugin Tests [MAVEN_JAXB2_PLUGIN-70] org.glassfish.jaxb jaxb-runtime org.jvnet.jaxb2.maven2 maven-jaxb2-plugin generate generate org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests-po ${project.version} purchaseorder.xsd maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-70/src/000077500000000000000000000000001423155634000221765ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-70/src/main/000077500000000000000000000000001423155634000231225ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-70/src/main/resources/000077500000000000000000000000001423155634000251345ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-70/src/main/resources/bindings.xjb000066400000000000000000000004041423155634000274340ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-77/000077500000000000000000000000001423155634000214165ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-77/common-types/000077500000000000000000000000001423155634000240505ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-77/common-types/.gitignore000066400000000000000000000000111423155634000260300ustar00rootroot00000000000000/target/ maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-77/common-types/pom.xml000066400000000000000000000020741423155634000253700ustar00rootroot00000000000000 4.0.0 org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests-MAVEN_JAXB2_PLUGIN-77 0.14.1-SNAPSHOT maven-jaxb2-plugin-tests-MAVEN_JAXB2_PLUGIN-77-common-types Maven JAXB 2.x Plugin Tests [MAVEN_JAXB2_PLUGIN-77:common-types] org.jvnet.jaxb2.maven2 maven-jaxb23-plugin src/main/resources/META-INF/project/schemas com.company.project.common.types generate maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-77/common-types/src/000077500000000000000000000000001423155634000246375ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-77/common-types/src/main/000077500000000000000000000000001423155634000255635ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-77/common-types/src/main/resources/000077500000000000000000000000001423155634000275755ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-77/common-types/src/main/resources/META-INF/000077500000000000000000000000001423155634000307355ustar00rootroot00000000000000project/000077500000000000000000000000001423155634000323245ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-77/common-types/src/main/resources/META-INFschemas/000077500000000000000000000000001423155634000337475ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-77/common-types/src/main/resources/META-INF/projectCommonTypes.xsd000066400000000000000000000012351423155634000367450ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-77/common-types/src/main/resources/META-INF/project/schemas ISOCurrencyCodeType-V2008.xsd000066400000000000000000000714601423155634000410160ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-77/common-types/src/main/resources/META-INF/project/schemas ISO 4217:2008 standard 3-letter currency codes Dirham Afghani Lek Dram Netherlands Antillian Guilder Kwanza Argentine Peso Australian Dollar Aruban Guilder Azerbaijanian Manat Convertible Mark Barbados Dollar Taka Bulgarian Lev Bahraini Dinar Burundi Franc Bermudian Dollar (customarily: Bermuda Dollar) Brunei Dollar Boliviano Brazilian Real Bahamian Dollar Ngultrum Pula Belarussian Ruble Belize Dollar Canadian Dollar Franc Congolais Swiss Franc Chilean Peso Yuan Renminbi Colombian Peso Costa Rican Colon Cuban Peso Cape Verde Escudo Czech Koruna Djibouti Franc Danish Krone Dominican Peso Algerian Dinar Kroon Egyptian Pound Nakfa Ethopian Birr Euro Fiji Dollar Falkland Islands Pound Pound Sterling Lari Cedi Gibraltar Pound Dalasi Guinea Franc Quetzal Guyana Dollar Guinea-Bisau Peso Honk Kong Dollar Lempira Kuna Gourde Forint Rupiah New Israeli Sheqel Indian Rupee Iraqi Dinar Iranian Rial Iceland Krona Jamaican Dollar Jordanian Dinar Yen Kenyan Shilling Som Riel Comoro Franc North Korean Won Won Kuwaiti Dinar Cayman Islands Dollar Tenge Kip Lebanese Pound Sri Lanka Rupee Liberian Dollar Loti Lithuanian Litas Latvian Lats Libyan Dinar Morrocan Dirham Moldovan Leu Malagasy Ariary Denar Kyat Tugrik Pataca Ouguiya Mauritius Rupee Rufiyaa Kwacha Mexican Peso Malaysian Ringgit Metical Namibia Dollar Naira Cordoba Oro Norwegian Krone Nepalese Rupee New Zealand Dollar Rial Omani Balboa Nuevo Sol Kina Philippine Peso Pakistan Rupee Zloty Guarani Qatari Rial New Leu Serbian Dinar Russian Ruble Rwanda Franc Saudi Riyal Solomon Islands Dollar Seychelles Rupee Sudanese Pound Swedish Krona Singapore Dollar St. Helena Pound Slovak Koruna Leone Somali Shilling Suriname Dollar Dobra El Salvador Colon Syrian Pound Lilangeni Baht Somoni Manat Tunisian Dinar Pa'anga New Turkish Lira Trinidad and Tobago Dollar New Taiwan Dollar Tanzanian Shilling Hryvnia Uganda Shilling US Dollar Peso Uruguayo Uzbekistan Sum Bolivar Fuerte Dong Vatu Tala CFA Franc Silver Gold East Carribean Dollar SDR CFA Franc Palladium CFP Franc Platinum Yemeni Rial Rand Kwacha Zimbabwe Dollar maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-77/pom.xml000066400000000000000000000015261423155634000227370ustar00rootroot00000000000000 4.0.0 org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests 0.14.1-SNAPSHOT maven-jaxb2-plugin-tests-MAVEN_JAXB2_PLUGIN-77 pom Maven JAXB 2.x Plugin Tests [MAVEN_JAXB2_PLUGIN-77] common-types service org.glassfish.jaxb jaxb-runtime test maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-77/service/000077500000000000000000000000001423155634000230565ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-77/service/.gitignore000066400000000000000000000000111423155634000250360ustar00rootroot00000000000000/target/ maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-77/service/pom.xml000066400000000000000000000035341423155634000244000ustar00rootroot00000000000000 4.0.0 org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests-MAVEN_JAXB2_PLUGIN-77 0.14.1-SNAPSHOT maven-jaxb2-plugin-tests-MAVEN_JAXB2_PLUGIN-77-service Maven JAXB 2.x Plugin Tests [MAVEN_JAXB2_PLUGIN-77:service] org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests-MAVEN_JAXB2_PLUGIN-77-common-types ${project.version} org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-testing test org.jvnet.jaxb2.maven2 maven-jaxb23-plugin src/main/resources/META-INF/project/schemas com.company.project.service.types src/main/jaxb/catalog.cat org.jvnet.jaxb2.maven2.resolver.tools.ClasspathCatalogResolver true false org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests-MAVEN_JAXB2_PLUGIN-77-common-types generate maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-77/service/src/000077500000000000000000000000001423155634000236455ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-77/service/src/main/000077500000000000000000000000001423155634000245715ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-77/service/src/main/jaxb/000077500000000000000000000000001423155634000255155ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-77/service/src/main/jaxb/catalog.cat000066400000000000000000000003521423155634000276200ustar00rootroot00000000000000PUBLIC "http://company.com/project/schemas/common-types" "classpath:META-INF/project/schemas/CommonTypes.xsd" PUBLIC "http://company.com/project/schemas/iso/currency" "classpath:META-INF/project/schemas/ISOCurrencyCodeType-V2008.xsd" maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-77/service/src/main/resources/000077500000000000000000000000001423155634000266035ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-77/service/src/main/resources/META-INF/000077500000000000000000000000001423155634000277435ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-77/service/src/main/resources/META-INF/project/000077500000000000000000000000001423155634000314115ustar00rootroot00000000000000schemas/000077500000000000000000000000001423155634000327555ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-77/service/src/main/resources/META-INF/projectService.xsd000066400000000000000000000013701423155634000350760ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-77/service/src/main/resources/META-INF/project/schemas maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-77/service/src/test/000077500000000000000000000000001423155634000246245ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-77/service/src/test/java/000077500000000000000000000000001423155634000255455ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-77/service/src/test/java/org/000077500000000000000000000000001423155634000263345ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-77/service/src/test/java/org/jvnet/000077500000000000000000000000001423155634000274625ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-77/service/src/test/java/org/jvnet/jaxb2/000077500000000000000000000000001423155634000304705ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-77/service/src/test/java/org/jvnet/jaxb2/maven2/000077500000000000000000000000001423155634000316605ustar00rootroot00000000000000tests/000077500000000000000000000000001423155634000327435ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-77/service/src/test/java/org/jvnet/jaxb2/maven2MAVEN_JAXB2_PLUGIN_77/000077500000000000000000000000001423155634000360725ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-77/service/src/test/java/org/jvnet/jaxb2/maven2/testsRunMAVEN_JAXB2_PLUGIN_77Mojo.java000066400000000000000000000020311423155634000433720ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-77/service/src/test/java/org/jvnet/jaxb2/maven2/tests/MAVEN_JAXB2_PLUGIN_77package org.jvnet.jaxb2.maven2.tests.MAVEN_JAXB2_PLUGIN_77; import java.io.File; import org.jvnet.jaxb2.maven2.AbstractXJC2Mojo; import org.jvnet.jaxb2.maven2.test.RunXJC2Mojo; public class RunMAVEN_JAXB2_PLUGIN_77Mojo extends RunXJC2Mojo { @Override protected void configureMojo(AbstractXJC2Mojo mojo) { super.configureMojo(mojo); mojo.setSchemaDirectory(new File(getBaseDir(), "src/main/resources/META-INF/project/schemas")); mojo.setGeneratePackage("com.company.project.service.types"); mojo.setCatalog(new File(getBaseDir(),"src/main/jaxb/catalog.cat")); mojo.setCatalogResolver("org.jvnet.jaxb2.maven2.resolver.tools.ClasspathCatalogResolver"); mojo.setExtension(true); // mojo. // // final ResourceEntry a_xsd = new ResourceEntry(); // a_xsd.setUrl("http://www.ab.org/a.xsd"); // mojo.setStrict(false); // mojo.setSchemaIncludes(new String[] {}); // mojo.setSchemas(new ResourceEntry[] { a_xsd }); // mojo.setCatalog(new File(getBaseDir(), "src/main/resources/catalog.cat")); mojo.setForceRegenerate(true); } } maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-79/000077500000000000000000000000001423155634000214205ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-79/a/000077500000000000000000000000001423155634000216405ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-79/a/.gitignore000066400000000000000000000000111423155634000236200ustar00rootroot00000000000000/target/ maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-79/a/pom.xml000066400000000000000000000014341423155634000231570ustar00rootroot00000000000000 4.0.0 org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests-MAVEN_JAXB2_PLUGIN-79 0.15.1-SNAPSHOT maven-jaxb2-plugin-tests-MAVEN_JAXB2_PLUGIN-79-a jar Maven JAXB 2.x Plugin Tests [MAVEN_JAXB2_PLUGIN-79:a] test org.jvnet.jaxb2.maven2 maven-jaxb2-plugin maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-79/a/src/000077500000000000000000000000001423155634000224275ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-79/a/src/main/000077500000000000000000000000001423155634000233535ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-79/a/src/main/resources/000077500000000000000000000000001423155634000253655ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-79/a/src/main/resources/a.xjb000066400000000000000000000005401423155634000263110ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-79/a/src/main/resources/a.xsd000066400000000000000000000012701423155634000263250ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-79/b/000077500000000000000000000000001423155634000216415ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-79/b/.gitignore000066400000000000000000000000111423155634000236210ustar00rootroot00000000000000/target/ maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-79/b/pom.xml000066400000000000000000000025371423155634000231650ustar00rootroot00000000000000 4.0.0 org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests-MAVEN_JAXB2_PLUGIN-79 0.15.1-SNAPSHOT maven-jaxb2-plugin-tests-MAVEN_JAXB2_PLUGIN-79-b jar Maven JAXB 2.x Plugin Tests [MAVEN_JAXB2_PLUGIN-79:b] org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests-MAVEN_JAXB2_PLUGIN-79-a ${project.version} provided test org.jvnet.jaxb2.maven2 maven-jaxb2-plugin true org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests-MAVEN_JAXB2_PLUGIN-79-a src/main/resources/catalog.cat maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-79/b/src/000077500000000000000000000000001423155634000224305ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-79/b/src/main/000077500000000000000000000000001423155634000233545ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-79/b/src/main/resources/000077500000000000000000000000001423155634000253665ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-79/b/src/main/resources/b.xsd000066400000000000000000000020371423155634000263310ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-79/b/src/main/resources/catalog.cat000066400000000000000000000006061423155634000274730ustar00rootroot00000000000000-- If the parameter isn't working, this link to schema A is not recognized and the test will fail because of a missing schema. -- REWRITE_SYSTEM "https://maven-jaxb2-plugin.dev.java.net/svn/maven-jaxb2-plugin/trunk/tests/MAVEN_JAXB2_PLUGIN-79/a/src/main/resources/a.xsd" "maven:org.jvnet.jaxb2.maven2:maven-jaxb2-plugin-tests-MAVEN_JAXB2_PLUGIN-79-a:jar::!/a.xsd" maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-79/pom.xml000066400000000000000000000015051423155634000227360ustar00rootroot00000000000000 4.0.0 org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests 0.15.1-SNAPSHOT maven-jaxb2-plugin-tests-MAVEN_JAXB2_PLUGIN-79 pom Maven JAXB 2.x Plugin Tests [MAVEN_JAXB2_PLUGIN-79] a b org.glassfish.jaxb jaxb-runtime test maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-82/000077500000000000000000000000001423155634000214125ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-82/a/000077500000000000000000000000001423155634000216325ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-82/a/.gitignore000066400000000000000000000000111423155634000236120ustar00rootroot00000000000000/target/ maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-82/a/pom.xml000066400000000000000000000016251423155634000231530ustar00rootroot00000000000000 4.0.0 org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests-MAVEN_JAXB2_PLUGIN-82 0.15.1-SNAPSHOT maven-jaxb2-plugin-tests-MAVEN_JAXB2_PLUGIN-82-a jar Maven JAXB 2.x Plugin Tests [MAVEN_JAXB2_PLUGIN-82:a] org.glassfish.jaxb jaxb-runtime org.jvnet.jaxb2.maven2 maven-jaxb23-plugin maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-82/a/src/000077500000000000000000000000001423155634000224215ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-82/a/src/main/000077500000000000000000000000001423155634000233455ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-82/a/src/main/resources/000077500000000000000000000000001423155634000253575ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-82/a/src/main/resources/a.xsd000066400000000000000000000004761423155634000263260ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-82/b/000077500000000000000000000000001423155634000216335ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-82/b/.gitignore000066400000000000000000000000111423155634000236130ustar00rootroot00000000000000/target/ maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-82/b/pom.xml000066400000000000000000000024361423155634000231550ustar00rootroot00000000000000 4.0.0 org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests-MAVEN_JAXB2_PLUGIN-82 0.15.1-SNAPSHOT maven-jaxb2-plugin-tests-MAVEN_JAXB2_PLUGIN-82-b jar Maven JAXB 2.x Plugin Tests [MAVEN_JAXB2_PLUGIN-82:b] org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests-MAVEN_JAXB2_PLUGIN-82-a ${project.version} provided org.jvnet.jaxb2.maven2 maven-jaxb23-plugin src/main/resources/catalog.cat org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests-MAVEN_JAXB2_PLUGIN-82-a maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-82/b/src/000077500000000000000000000000001423155634000224225ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-82/b/src/main/000077500000000000000000000000001423155634000233465ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-82/b/src/main/resources/000077500000000000000000000000001423155634000253605ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-82/b/src/main/resources/b.xjb000066400000000000000000000004561423155634000263130ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-82/b/src/main/resources/b.xsd000066400000000000000000000006741423155634000263300ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-82/b/src/main/resources/catalog.cat000066400000000000000000000004201423155634000274570ustar00rootroot00000000000000-- If the parameter isn't working, this link to schema A is not recognized and the test will fail because of a missing schema. -- REWRITE_SYSTEM "http://www.ab.org" "maven:org.jvnet.jaxb2.maven2:maven-jaxb2-plugin-tests-MAVEN_JAXB2_PLUGIN-82-a:jar::!" maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-82/pom.xml000066400000000000000000000012631423155634000227310ustar00rootroot00000000000000 4.0.0 org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests 0.15.1-SNAPSHOT maven-jaxb2-plugin-tests-MAVEN_JAXB2_PLUGIN-82 pom Maven JAXB 2.x Plugin Tests [MAVEN_JAXB2_PLUGIN-82] a b test maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-86/000077500000000000000000000000001423155634000214165ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-86/.gitignore000066400000000000000000000000111423155634000233760ustar00rootroot00000000000000/target/ maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-86/pom.xml000066400000000000000000000034431423155634000227370ustar00rootroot00000000000000 4.0.0 maven-jaxb2-plugin-tests-MAVEN_JAXB2_PLUGIN-86 org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests 0.15.1-SNAPSHOT jar Maven JAXB 2.x Plugin Tests [MAVEN_JAXB2_PLUGIN-86] org.glassfish.jaxb jaxb-runtime org.jvnet.jaxb2.maven2 maven-jaxb2-plugin a generate-sources generate src/main/resources/a a ${project.build.directory}/generated-sources/xjc-a b generate-sources generate src/main/resources/b b ${project.build.directory}/generated-sources/xjc-b maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-86/src/000077500000000000000000000000001423155634000222055ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-86/src/main/000077500000000000000000000000001423155634000231315ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-86/src/main/resources/000077500000000000000000000000001423155634000251435ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-86/src/main/resources/a/000077500000000000000000000000001423155634000253635ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-86/src/main/resources/a/a.xsd000066400000000000000000000004761423155634000263320ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-86/src/main/resources/b/000077500000000000000000000000001423155634000253645ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-86/src/main/resources/b/b.xsd000066400000000000000000000004771423155634000263350ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-87/000077500000000000000000000000001423155634000214175ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-87/.gitignore000066400000000000000000000000111423155634000233770ustar00rootroot00000000000000/target/ maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-87/pom.xml000066400000000000000000000016641423155634000227430ustar00rootroot00000000000000 4.0.0 maven-jaxb2-plugin-tests-MAVEN_JAXB2_PLUGIN-87 org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests 0.15.1-SNAPSHOT jar Maven JAXB 2.x Plugin Tests [MAVEN_JAXB2_PLUGIN-87] org.glassfish.jaxb jaxb-runtime org.jvnet.jaxb2.maven2 maven-jaxb2-plugin es maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-87/src/000077500000000000000000000000001423155634000222065ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-87/src/main/000077500000000000000000000000001423155634000231325ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-87/src/main/resources/000077500000000000000000000000001423155634000251445ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/MAVEN_JAXB2_PLUGIN-87/src/main/resources/purchaseorder.xsd000066400000000000000000000044041423155634000305340ustar00rootroot00000000000000 Purchase order schema for Example.com. Copyright 2000 Example.com. All rights reserved. maven-jaxb2-plugin-0.15.1/tests/catalog-xml/000077500000000000000000000000001423155634000205615ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/catalog-xml/.gitignore000066400000000000000000000000111423155634000225410ustar00rootroot00000000000000/target/ maven-jaxb2-plugin-0.15.1/tests/catalog-xml/pom.xml000066400000000000000000000025751423155634000221070ustar00rootroot00000000000000 4.0.0 org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests 0.15.1-SNAPSHOT maven-jaxb2-plugin-tests-catalog-xml jar Maven JAXB 2.x Plugin Tests [catalog-xml] org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-testing test org.glassfish.jaxb jaxb-runtime test org.jvnet.jaxb2.maven2 maven-jaxb2-plugin generate generate schema_b.xsd src/main/resources/catalog.xml maven-jaxb2-plugin-0.15.1/tests/catalog-xml/src/000077500000000000000000000000001423155634000213505ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/catalog-xml/src/main/000077500000000000000000000000001423155634000222745ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/catalog-xml/src/main/resources/000077500000000000000000000000001423155634000243065ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/catalog-xml/src/main/resources/catalog.xml000066400000000000000000000002671423155634000264470ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/tests/catalog-xml/src/main/resources/schema_a.xsd000066400000000000000000000003071423155634000265660ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/tests/catalog-xml/src/main/resources/schema_b.xsd000066400000000000000000000005371423155634000265740ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/tests/catalog-xml/src/test/000077500000000000000000000000001423155634000223275ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/catalog-xml/src/test/java/000077500000000000000000000000001423155634000232505ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/catalog-xml/src/test/java/org/000077500000000000000000000000001423155634000240375ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/catalog-xml/src/test/java/org/jvnet/000077500000000000000000000000001423155634000251655ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/catalog-xml/src/test/java/org/jvnet/jaxb2/000077500000000000000000000000001423155634000261735ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/catalog-xml/src/test/java/org/jvnet/jaxb2/maven2/000077500000000000000000000000001423155634000273635ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/catalog-xml/src/test/java/org/jvnet/jaxb2/maven2/tests/000077500000000000000000000000001423155634000305255ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/catalog-xml/src/test/java/org/jvnet/jaxb2/maven2/tests/catalog/000077500000000000000000000000001423155634000321375ustar00rootroot00000000000000RunCatalogMojo.java000066400000000000000000000011341423155634000356060ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/catalog-xml/src/test/java/org/jvnet/jaxb2/maven2/tests/catalogpackage org.jvnet.jaxb2.maven2.tests.catalog; import java.io.File; import org.jvnet.jaxb2.maven2.resolver.tools.ClasspathCatalogResolver; import org.jvnet.jaxb2.maven2.test.RunXJC2Mojo; import org.jvnet.jaxb2.maven2.AbstractXJC2Mojo; public class RunCatalogMojo extends RunXJC2Mojo { @Override protected void configureMojo(AbstractXJC2Mojo mojo) { super.configureMojo(mojo); mojo .setCatalog(new File(getBaseDir(), "src/main/resources/catalog.cat")); mojo.setCatalogResolver(ClasspathCatalogResolver.class.getName()); mojo.setForceRegenerate(true); } } RunPlainCatalogMojo.java000066400000000000000000000007231423155634000365750ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/catalog-xml/src/test/java/org/jvnet/jaxb2/maven2/tests/catalogpackage org.jvnet.jaxb2.maven2.tests.catalog; import java.io.File; import org.jvnet.jaxb2.maven2.AbstractXJC2Mojo; import org.jvnet.jaxb2.maven2.test.RunXJC2Mojo; public class RunPlainCatalogMojo extends RunXJC2Mojo { @Override protected void configureMojo(AbstractXJC2Mojo mojo) { super.configureMojo(mojo); mojo .setCatalog(new File(getBaseDir(), "src/main/resources/catalog.cat")); mojo.setForceRegenerate(true); } } maven-jaxb2-plugin-0.15.1/tests/catalog/000077500000000000000000000000001423155634000177635ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/catalog/.gitignore000066400000000000000000000000111423155634000217430ustar00rootroot00000000000000/target/ maven-jaxb2-plugin-0.15.1/tests/catalog/pom.xml000066400000000000000000000025651423155634000213100ustar00rootroot00000000000000 4.0.0 org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests 0.15.1-SNAPSHOT maven-jaxb2-plugin-tests-catalog jar Maven JAXB 2.x Plugin Tests [catalog] org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-testing test org.glassfish.jaxb jaxb-runtime test org.jvnet.jaxb2.maven2 maven-jaxb2-plugin generate generate schema_b.xsd src/main/resources/catalog.cat maven-jaxb2-plugin-0.15.1/tests/catalog/src/000077500000000000000000000000001423155634000205525ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/catalog/src/main/000077500000000000000000000000001423155634000214765ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/catalog/src/main/resources/000077500000000000000000000000001423155634000235105ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/catalog/src/main/resources/catalog.cat000066400000000000000000000003141423155634000256110ustar00rootroot00000000000000-- If the parameter isn't working, this link to schema A is not recognized and the test will fail because of a missing schema. -- REWRITE_SYSTEM "http://example.org/schemas" "." maven-jaxb2-plugin-0.15.1/tests/catalog/src/main/resources/schema_a.xsd000066400000000000000000000003071423155634000257700ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/tests/catalog/src/main/resources/schema_b.xsd000066400000000000000000000005371423155634000257760ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/tests/catalog/src/test/000077500000000000000000000000001423155634000215315ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/catalog/src/test/java/000077500000000000000000000000001423155634000224525ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/catalog/src/test/java/org/000077500000000000000000000000001423155634000232415ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/catalog/src/test/java/org/jvnet/000077500000000000000000000000001423155634000243675ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/catalog/src/test/java/org/jvnet/jaxb2/000077500000000000000000000000001423155634000253755ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/catalog/src/test/java/org/jvnet/jaxb2/maven2/000077500000000000000000000000001423155634000265655ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/catalog/src/test/java/org/jvnet/jaxb2/maven2/tests/000077500000000000000000000000001423155634000277275ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/catalog/src/test/java/org/jvnet/jaxb2/maven2/tests/catalog/000077500000000000000000000000001423155634000313415ustar00rootroot00000000000000RunCatalogMojo.java000066400000000000000000000011341423155634000350100ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/catalog/src/test/java/org/jvnet/jaxb2/maven2/tests/catalogpackage org.jvnet.jaxb2.maven2.tests.catalog; import java.io.File; import org.jvnet.jaxb2.maven2.resolver.tools.ClasspathCatalogResolver; import org.jvnet.jaxb2.maven2.test.RunXJC2Mojo; import org.jvnet.jaxb2.maven2.AbstractXJC2Mojo; public class RunCatalogMojo extends RunXJC2Mojo { @Override protected void configureMojo(AbstractXJC2Mojo mojo) { super.configureMojo(mojo); mojo .setCatalog(new File(getBaseDir(), "src/main/resources/catalog.cat")); mojo.setCatalogResolver(ClasspathCatalogResolver.class.getName()); mojo.setForceRegenerate(true); } } RunPlainCatalogMojo.java000066400000000000000000000007231423155634000357770ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/catalog/src/test/java/org/jvnet/jaxb2/maven2/tests/catalogpackage org.jvnet.jaxb2.maven2.tests.catalog; import java.io.File; import org.jvnet.jaxb2.maven2.AbstractXJC2Mojo; import org.jvnet.jaxb2.maven2.test.RunXJC2Mojo; public class RunPlainCatalogMojo extends RunXJC2Mojo { @Override protected void configureMojo(AbstractXJC2Mojo mojo) { super.configureMojo(mojo); mojo .setCatalog(new File(getBaseDir(), "src/main/resources/catalog.cat")); mojo.setForceRegenerate(true); } } maven-jaxb2-plugin-0.15.1/tests/episodes/000077500000000000000000000000001423155634000201645ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/episodes/a/000077500000000000000000000000001423155634000204045ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/episodes/a/.gitignore000066400000000000000000000000111423155634000223640ustar00rootroot00000000000000/target/ maven-jaxb2-plugin-0.15.1/tests/episodes/a/pom.xml000066400000000000000000000013661423155634000217270ustar00rootroot00000000000000 4.0.0 org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests-episodes 0.15.1-SNAPSHOT maven-jaxb2-plugin-tests-episodes-a jar Maven JAXB 2.x Plugin Tests [episodes:a] test org.jvnet.jaxb2.maven2 maven-jaxb23-plugin maven-jaxb2-plugin-0.15.1/tests/episodes/a/src/000077500000000000000000000000001423155634000211735ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/episodes/a/src/main/000077500000000000000000000000001423155634000221175ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/episodes/a/src/main/resources/000077500000000000000000000000001423155634000241315ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/episodes/a/src/main/resources/a.xjb000066400000000000000000000004231423155634000250550ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/tests/episodes/a/src/main/resources/a.xsd000066400000000000000000000012331423155634000250700ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/tests/episodes/b/000077500000000000000000000000001423155634000204055ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/episodes/b/.gitignore000066400000000000000000000000111423155634000223650ustar00rootroot00000000000000/target/ maven-jaxb2-plugin-0.15.1/tests/episodes/b/pom.xml000066400000000000000000000024371423155634000217300ustar00rootroot00000000000000 4.0.0 org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests-episodes 0.15.1-SNAPSHOT maven-jaxb2-plugin-tests-episodes-b jar Maven JAXB 2.x Plugin Tests [episodes:b] org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests-episodes-a ${project.version} provided test org.jvnet.jaxb2.maven2 maven-jaxb23-plugin true org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests-episodes-a src/main/resources/catalog.cat maven-jaxb2-plugin-0.15.1/tests/episodes/b/src/000077500000000000000000000000001423155634000211745ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/episodes/b/src/main/000077500000000000000000000000001423155634000221205ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/episodes/b/src/main/resources/000077500000000000000000000000001423155634000241325ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/episodes/b/src/main/resources/b.xsd000066400000000000000000000017551423155634000251030ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/tests/episodes/b/src/main/resources/catalog.cat000066400000000000000000000005461423155634000262420ustar00rootroot00000000000000-- If the parameter isn't working, this link to schema A is not recognized and the test will fail because of a missing schema. -- REWRITE_SYSTEM "https://maven-jaxb2-plugin.dev.java.net/svn/maven-jaxb2-plugin/trunk/tests/episodes/a/src/main/resources/a.xsd" "maven:org.jvnet.jaxb2.maven2:maven-jaxb2-plugin-tests-episodes-a:jar::!/a.xsd" maven-jaxb2-plugin-0.15.1/tests/episodes/c/000077500000000000000000000000001423155634000204065ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/episodes/c/.gitignore000066400000000000000000000000111423155634000223660ustar00rootroot00000000000000/target/ maven-jaxb2-plugin-0.15.1/tests/episodes/c/pom.xml000066400000000000000000000027671423155634000217370ustar00rootroot00000000000000 4.0.0 org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests-episodes 0.15.1-SNAPSHOT maven-jaxb2-plugin-tests-episodes-c jar Maven JAXB 2.x Plugin Tests [episodes:c] org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests-episodes-a ${project.version} provided test org.jvnet.jaxb2.maven2 maven-jaxb23-plugin true org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests-episodes-b ${project.version} catalog.cat true maven-jaxb2-plugin-0.15.1/tests/episodes/c/src/000077500000000000000000000000001423155634000211755ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/episodes/c/src/main/000077500000000000000000000000001423155634000221215ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/episodes/c/src/main/resources/000077500000000000000000000000001423155634000241335ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/episodes/c/src/main/resources/c.xsd000066400000000000000000000017551423155634000251050ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/tests/episodes/d/000077500000000000000000000000001423155634000204075ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/episodes/d/.gitignore000066400000000000000000000000111423155634000223670ustar00rootroot00000000000000/target/ maven-jaxb2-plugin-0.15.1/tests/episodes/d/pom.xml000066400000000000000000000027271423155634000217340ustar00rootroot00000000000000 4.0.0 org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests-episodes 0.15.1-SNAPSHOT maven-jaxb2-plugin-tests-episodes-d jar Maven JAXB 2.x Plugin Tests [episodes:d] org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests-episodes-a ${project.version} provided test org.jvnet.jaxb2.maven2 maven-jaxb23-plugin true org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests-episodes-a src/main/resources/catalog.cat maven-jaxb2-plugin-0.15.1/tests/episodes/d/src/000077500000000000000000000000001423155634000211765ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/episodes/d/src/main/000077500000000000000000000000001423155634000221225ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/episodes/d/src/main/resources/000077500000000000000000000000001423155634000241345ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/episodes/d/src/main/resources/catalog.cat000066400000000000000000000003601423155634000262360ustar00rootroot00000000000000-- If the parameter isn't working, this link to schema A is not recognized and the test will fail because of a missing schema. -- PUBLIC "a" "maven:org.jvnet.jaxb2.maven2:maven-jaxb2-plugin-tests-episodes-a:jar::!/a.xsd" maven-jaxb2-plugin-0.15.1/tests/episodes/d/src/main/resources/d.xsd000066400000000000000000000016461423155634000251060ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/tests/episodes/e/000077500000000000000000000000001423155634000204105ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/episodes/e/.gitignore000066400000000000000000000000111423155634000223700ustar00rootroot00000000000000/target/ maven-jaxb2-plugin-0.15.1/tests/episodes/e/pom.xml000066400000000000000000000030351423155634000217260ustar00rootroot00000000000000 4.0.0 org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests-episodes 0.15.1-SNAPSHOT maven-jaxb2-plugin-tests-episodes-e jar Maven JAXB 2.x Plugin Tests [episodes:e] org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests-episodes-a ${project.version} provided test org.jvnet.jaxb2.maven2 maven-jaxb23-plugin true src/main/resources/catalog.cat true maven-jaxb2-plugin-0.15.1/tests/episodes/e/src/000077500000000000000000000000001423155634000211775ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/episodes/e/src/main/000077500000000000000000000000001423155634000221235ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/episodes/e/src/main/resources/000077500000000000000000000000001423155634000241355ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/episodes/e/src/main/resources/catalog.cat000066400000000000000000000003601423155634000262370ustar00rootroot00000000000000-- If the parameter isn't working, this link to schema A is not recognized and the test will fail because of a missing schema. -- PUBLIC "a" "maven:org.jvnet.jaxb2.maven2:maven-jaxb2-plugin-tests-episodes-a:jar::!/a.xsd" maven-jaxb2-plugin-0.15.1/tests/episodes/e/src/main/resources/d.xsd000066400000000000000000000016461423155634000251070ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/tests/episodes/pom.xml000066400000000000000000000015521423155634000215040ustar00rootroot00000000000000 4.0.0 org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests 0.15.1-SNAPSHOT maven-jaxb2-plugin-tests-episodes pom Maven JAXB 2.x Plugin Tests [episodes] a b c d e org.glassfish.jaxb jaxb-runtime test maven-jaxb2-plugin-0.15.1/tests/full-build-1.7.bat000066400000000000000000000002451423155634000214040ustar00rootroot00000000000000setlocal echo Setting JAVA_HOME to %JAVA7_HOME%. set JAVA_HOME=%JAVA7_HOME% call mvn clean install -Pall,sonatype-oss-release -DperformRelease --fail-at-end endlocalmaven-jaxb2-plugin-0.15.1/tests/full-build-1.8.bat000066400000000000000000000002451423155634000214050ustar00rootroot00000000000000setlocal echo Setting JAVA_HOME to %JAVA8_HOME%. set JAVA_HOME=%JAVA8_HOME% call mvn clean install -Pall,sonatype-oss-release -DperformRelease --fail-at-end endlocalmaven-jaxb2-plugin-0.15.1/tests/full-build-9.bat000066400000000000000000000002451423155634000212470ustar00rootroot00000000000000setlocal echo Setting JAVA_HOME to %JAVA9_HOME%. set JAVA_HOME=%JAVA9_HOME% call mvn clean install -Pall,sonatype-oss-release -DperformRelease --fail-at-end endlocalmaven-jaxb2-plugin-0.15.1/tests/gh-issue-16/000077500000000000000000000000001423155634000203215ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/gh-issue-16/.gitignore000066400000000000000000000000111423155634000223010ustar00rootroot00000000000000/target/ maven-jaxb2-plugin-0.15.1/tests/gh-issue-16/pom.xml000066400000000000000000000026101423155634000216350ustar00rootroot00000000000000 4.0.0 maven-jaxb2-plugin-tests-gh-issue-16 org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests 0.15.1-SNAPSHOT jar Maven JAXB 2.x Plugin Tests [GitHub Issue #16] org.glassfish.jaxb jaxb-runtime org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-testing test org.jvnet.jaxb2.maven2 maven-jaxb2-plugin generate generate src/main/resources/ab/catalog.cat **/a.xsd maven-jaxb2-plugin-0.15.1/tests/gh-issue-16/src/000077500000000000000000000000001423155634000211105ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/gh-issue-16/src/main/000077500000000000000000000000001423155634000220345ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/gh-issue-16/src/main/resources/000077500000000000000000000000001423155634000240465ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/gh-issue-16/src/main/resources/ab/000077500000000000000000000000001423155634000244305ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/gh-issue-16/src/main/resources/ab/a.xjb000066400000000000000000000005001423155634000253500ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/tests/gh-issue-16/src/main/resources/ab/a.xsd000066400000000000000000000006761423155634000254010ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/tests/gh-issue-16/src/main/resources/ab/b.xsd000066400000000000000000000004771423155634000254010ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/tests/gh-issue-16/src/main/resources/ab/catalog.cat000066400000000000000000000000541423155634000265320ustar00rootroot00000000000000REWRITE_SYSTEM "http://www.ab.org" "../ab" maven-jaxb2-plugin-0.15.1/tests/gh-issue-19/000077500000000000000000000000001423155634000203245ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/gh-issue-19/a/000077500000000000000000000000001423155634000205445ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/gh-issue-19/a/.gitignore000066400000000000000000000000111423155634000225240ustar00rootroot00000000000000/target/ maven-jaxb2-plugin-0.15.1/tests/gh-issue-19/a/pom.xml000066400000000000000000000015721423155634000220660ustar00rootroot00000000000000 4.0.0 org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests-gh-issue-19 0.12.1-SNAPSHOT maven-jaxb2-plugin-tests-gh-issue-19-a jar Maven JAXB 2.x Plugin Tests [GitHub Issue #19:a] test org.jvnet.jaxb2.maven2 maven-jaxb2-plugin a/a.xsd maven-jaxb2-plugin-0.15.1/tests/gh-issue-19/a/src/000077500000000000000000000000001423155634000213335ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/gh-issue-19/a/src/main/000077500000000000000000000000001423155634000222575ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/gh-issue-19/a/src/main/resources/000077500000000000000000000000001423155634000242715ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/gh-issue-19/a/src/main/resources/a/000077500000000000000000000000001423155634000245115ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/gh-issue-19/a/src/main/resources/a/a.xsd000066400000000000000000000004771423155634000254610ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/tests/gh-issue-19/b/000077500000000000000000000000001423155634000205455ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/gh-issue-19/b/.gitignore000066400000000000000000000000111423155634000225250ustar00rootroot00000000000000/target/ maven-jaxb2-plugin-0.15.1/tests/gh-issue-19/b/pom.xml000066400000000000000000000025351423155634000220670ustar00rootroot00000000000000 4.0.0 org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests-gh-issue-19 0.12.1-SNAPSHOT maven-jaxb2-plugin-tests-gh-issue-19-b jar Maven JAXB 2.x Plugin Tests [GitHub Issue #19:b] ${project.groupId} maven-jaxb2-plugin-tests-gh-issue-19-a ${project.version} org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-testing test test org.jvnet.jaxb2.maven2 maven-jaxb2-plugin true b/b.xsd src/main/resources/b/b.cat maven-jaxb2-plugin-0.15.1/tests/gh-issue-19/b/src/000077500000000000000000000000001423155634000213345ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/gh-issue-19/b/src/main/000077500000000000000000000000001423155634000222605ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/gh-issue-19/b/src/main/resources/000077500000000000000000000000001423155634000242725ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/gh-issue-19/b/src/main/resources/b/000077500000000000000000000000001423155634000245135ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/gh-issue-19/b/src/main/resources/b/b.cat000066400000000000000000000004521423155634000254260ustar00rootroot00000000000000REWRITE_SYSTEM "../a" "maven:org.jvnet.jaxb2.maven2:maven-jaxb2-plugin-tests-gh-issue-19-a:jar::!/a" 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"maven-jaxb2-plugin-0.15.1/tests/gh-issue-19/b/src/main/resources/b/b.xsd000066400000000000000000000006611423155634000254570ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/tests/gh-issue-19/pom.xml000066400000000000000000000015341423155634000216440ustar00rootroot00000000000000 4.0.0 org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests 0.12.1-SNAPSHOT maven-jaxb2-plugin-tests-gh-issue-19 pom Maven JAXB 2.x Plugin Tests [GitHub Issue #19] a b org.glassfish.jaxb jaxb-runtime ${jaxb.version} test maven-jaxb2-plugin-0.15.1/tests/gh-issue-22/000077500000000000000000000000001423155634000203165ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/gh-issue-22/a/000077500000000000000000000000001423155634000205365ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/gh-issue-22/a/.gitignore000066400000000000000000000000111423155634000225160ustar00rootroot00000000000000/target/ maven-jaxb2-plugin-0.15.1/tests/gh-issue-22/a/pom.xml000066400000000000000000000014031423155634000220510ustar00rootroot00000000000000 4.0.0 org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests-gh-issue-22 0.15.1-SNAPSHOT maven-jaxb2-plugin-tests-gh-issue-22-a jar Maven JAXB 2.x Plugin Tests [GitHub Issue #22:a] test org.jvnet.jaxb2.maven2 maven-jaxb2-plugin maven-jaxb2-plugin-0.15.1/tests/gh-issue-22/a/src/000077500000000000000000000000001423155634000213255ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/gh-issue-22/a/src/main/000077500000000000000000000000001423155634000222515ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/gh-issue-22/a/src/main/resources/000077500000000000000000000000001423155634000242635ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/gh-issue-22/a/src/main/resources/a.xsd000066400000000000000000000017721423155634000252320ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/tests/gh-issue-22/b/000077500000000000000000000000001423155634000205375ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/gh-issue-22/b/.gitignore000066400000000000000000000000111423155634000225170ustar00rootroot00000000000000/target/ maven-jaxb2-plugin-0.15.1/tests/gh-issue-22/b/pom.xml000066400000000000000000000024451423155634000220610ustar00rootroot00000000000000 4.0.0 org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests-gh-issue-22 0.15.1-SNAPSHOT maven-jaxb2-plugin-tests-gh-issue-22-b jar Maven JAXB 2.x Plugin Tests [GitHub Issue #22:b] org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-testing test test org.jvnet.jaxb2.maven2 maven-jaxb2-plugin ${project.groupId} maven-jaxb2-plugin-tests-gh-issue-22-a ${project.version} a.xsd maven-jaxb2-plugin-0.15.1/tests/gh-issue-22/pom.xml000066400000000000000000000014661423155634000216420ustar00rootroot00000000000000 4.0.0 org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests 0.15.1-SNAPSHOT maven-jaxb2-plugin-tests-gh-issue-22 pom Maven JAXB 2.x Plugin Tests [GitHub Issue #22] a b org.glassfish.jaxb jaxb-runtime test maven-jaxb2-plugin-0.15.1/tests/gh-issue-23/000077500000000000000000000000001423155634000203175ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/gh-issue-23/one-non-strict/000077500000000000000000000000001423155634000231765ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/gh-issue-23/one-non-strict/.gitignore000066400000000000000000000000111423155634000251560ustar00rootroot00000000000000/target/ maven-jaxb2-plugin-0.15.1/tests/gh-issue-23/one-non-strict/pom.xml000066400000000000000000000030611423155634000245130ustar00rootroot00000000000000 4.0.0 org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests-gh-issue-23 0.15.1-SNAPSHOT maven-jaxb2-plugin-tests-gh-issue-23-one-non-strict jar Maven JAXB 2.x Plugin Tests [GitHub Issue #23:one-non-strict] org.glassfish.jaxb jaxb-runtime org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-testing test org.jvnet.jaxb2.maven2 maven-jaxb2-plugin generate generate http://www.ab.org/one/a.xsd src/main/resources/META-INF/one/catalog.xml false maven-jaxb2-plugin-0.15.1/tests/gh-issue-23/one-non-strict/src/000077500000000000000000000000001423155634000237655ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/gh-issue-23/one-non-strict/src/main/000077500000000000000000000000001423155634000247115ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/gh-issue-23/one-non-strict/src/main/resources/000077500000000000000000000000001423155634000267235ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/gh-issue-23/one-non-strict/src/main/resources/META-INF/000077500000000000000000000000001423155634000300635ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/gh-issue-23/one-non-strict/src/main/resources/META-INF/one/000077500000000000000000000000001423155634000306445ustar00rootroot00000000000000catalog.xml000066400000000000000000000005011423155634000327150ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/gh-issue-23/one-non-strict/src/main/resources/META-INF/one maven-jaxb2-plugin-0.15.1/tests/gh-issue-23/one-non-strict/src/main/resources/one/000077500000000000000000000000001423155634000275045ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/gh-issue-23/one-non-strict/src/main/resources/one/a.xsd000066400000000000000000000010071423155634000304420ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/tests/gh-issue-23/one-non-strict/src/main/resources/one/b.xsd000066400000000000000000000006351423155634000304510ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/tests/gh-issue-23/one-non-strict/src/main/resources/one/b1.xsd000066400000000000000000000005021423155634000305230ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/tests/gh-issue-23/one-non-strict/src/main/resources/two/000077500000000000000000000000001423155634000275345ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/gh-issue-23/one-non-strict/src/main/resources/two/p.xsd000066400000000000000000000006351423155634000305170ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/tests/gh-issue-23/pom.xml000066400000000000000000000012761423155634000216420ustar00rootroot00000000000000 4.0.0 org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests 0.15.1-SNAPSHOT maven-jaxb2-plugin-tests-gh-issue-23 pom Maven JAXB 2.x Plugin Tests [GitHub Issue #23] one-non-strict two-non-strict test maven-jaxb2-plugin-0.15.1/tests/gh-issue-23/two-non-strict/000077500000000000000000000000001423155634000232265ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/gh-issue-23/two-non-strict/.gitignore000066400000000000000000000000111423155634000252060ustar00rootroot00000000000000/target/ maven-jaxb2-plugin-0.15.1/tests/gh-issue-23/two-non-strict/pom.xml000066400000000000000000000033201423155634000245410ustar00rootroot00000000000000 4.0.0 org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests-gh-issue-23 0.15.1-SNAPSHOT maven-jaxb2-plugin-tests-gh-issue-23-two-non-strict jar Maven JAXB 2.x Plugin Tests [GitHub Issue #23:two-non-strict] org.glassfish.jaxb jaxb-runtime ${project.groupId} maven-jaxb2-plugin-tests-gh-issue-23-one-non-strict ${project.version} org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-testing test org.jvnet.jaxb2.maven2 maven-jaxb2-plugin generate generate http://www.ab.org/two/p.xsd src/main/resources/META-INF/two/catalog.xml false true maven-jaxb2-plugin-0.15.1/tests/gh-issue-23/two-non-strict/src/000077500000000000000000000000001423155634000240155ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/gh-issue-23/two-non-strict/src/main/000077500000000000000000000000001423155634000247415ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/gh-issue-23/two-non-strict/src/main/resources/000077500000000000000000000000001423155634000267535ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/gh-issue-23/two-non-strict/src/main/resources/META-INF/000077500000000000000000000000001423155634000301135ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/gh-issue-23/two-non-strict/src/main/resources/META-INF/two/000077500000000000000000000000001423155634000307245ustar00rootroot00000000000000catalog.xml000066400000000000000000000003401423155634000327760ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/gh-issue-23/two-non-strict/src/main/resources/META-INF/two maven-jaxb2-plugin-0.15.1/tests/gh-issue-23/two-non-strict/src/main/resources/one/000077500000000000000000000000001423155634000275345ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/gh-issue-23/two-non-strict/src/main/resources/one/a.xsd000066400000000000000000000010071423155634000304720ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/tests/gh-issue-23/two-non-strict/src/main/resources/one/b.xsd000066400000000000000000000006351423155634000305010ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/tests/gh-issue-23/two-non-strict/src/main/resources/one/b1.xsd000066400000000000000000000005021423155634000305530ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/tests/gh-issue-23/two-non-strict/src/main/resources/two/000077500000000000000000000000001423155634000275645ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/gh-issue-23/two-non-strict/src/main/resources/two/p.xsd000066400000000000000000000006351423155634000305470ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/tests/gh-issue-58/000077500000000000000000000000001423155634000203275ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/gh-issue-58/.gitignore000066400000000000000000000000471423155634000223200ustar00rootroot00000000000000.settings .classpath .project /target/ maven-jaxb2-plugin-0.15.1/tests/gh-issue-58/pom.xml000066400000000000000000000017561423155634000216550ustar00rootroot00000000000000 4.0.0 maven-jaxb2-plugin-tests-gh-issue-58 org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests 0.15.1-SNAPSHOT jar Maven JAXB 2.x Plugin Tests [GitHub Issue #58] com.sun.xml.bind jaxb-impl ${jaxb.version} org.jvnet.jaxb2.maven2 maven-jaxb2-plugin true maven-jaxb2-plugin-0.15.1/tests/gh-issue-58/src/000077500000000000000000000000001423155634000211165ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/gh-issue-58/src/main/000077500000000000000000000000001423155634000220425ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/gh-issue-58/src/main/resources/000077500000000000000000000000001423155634000240545ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/gh-issue-58/src/main/resources/purchaseorder.xsd000066400000000000000000000044041423155634000274440ustar00rootroot00000000000000 Purchase order schema for Example.com. Copyright 2000 Example.com. All rights reserved. maven-jaxb2-plugin-0.15.1/tests/issues/000077500000000000000000000000001423155634000176645ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/issues/.gitignore000066400000000000000000000000111423155634000216440ustar00rootroot00000000000000/target/ maven-jaxb2-plugin-0.15.1/tests/issues/pom.xml000066400000000000000000000035131423155634000212030ustar00rootroot00000000000000 4.0.0 maven-jaxb2-plugin-tests-issues org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests 0.14.1-SNAPSHOT jar Maven JAXB 2.x Plugin Tests [issues] org.glassfish.jaxb jaxb-runtime org.jvnet.jaxb2.maven2 maven-jaxb23-plugin org.glassfish.jaxb jaxb-runtime ${jaxb.version} generate generate generate-test-sources false true true false true file src/main/resources/depends.txt src/main/resources/*.dep maven-jaxb2-plugin-0.15.1/tests/issues/src/000077500000000000000000000000001423155634000204535ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/issues/src/main/000077500000000000000000000000001423155634000213775ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/issues/src/main/java/000077500000000000000000000000001423155634000223205ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/issues/src/main/java/org/000077500000000000000000000000001423155634000231075ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/issues/src/main/java/org/jvnet/000077500000000000000000000000001423155634000242355ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/issues/src/main/java/org/jvnet/jaxb2/000077500000000000000000000000001423155634000252435ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/issues/src/main/java/org/jvnet/jaxb2/maven2/000077500000000000000000000000001423155634000264335ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/issues/src/main/java/org/jvnet/jaxb2/maven2/tests/000077500000000000000000000000001423155634000275755ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/issues/src/main/java/org/jvnet/jaxb2/maven2/tests/issues/000077500000000000000000000000001423155634000311105ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/issues/src/main/java/org/jvnet/jaxb2/maven2/tests/issues/common/000077500000000000000000000000001423155634000324005ustar00rootroot00000000000000Generated.java000066400000000000000000000001201423155634000350530ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/issues/src/main/java/org/jvnet/jaxb2/maven2/tests/issues/commonpackage org.jvnet.jaxb2.maven2.tests.issues.common; public class Generated { } maven-jaxb2-plugin-0.15.1/tests/issues/src/main/resources/000077500000000000000000000000001423155634000234115ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/issues/src/main/resources/binding.xjb000066400000000000000000000007751423155634000255410ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/tests/issues/src/main/resources/depends.dep000066400000000000000000000001031423155634000255170ustar00rootroot00000000000000See issue #99. If this file is changed, compilation will be forced.maven-jaxb2-plugin-0.15.1/tests/issues/src/main/resources/depends.txt000066400000000000000000000000161423155634000255710ustar00rootroot00000000000000See issue #99.maven-jaxb2-plugin-0.15.1/tests/issues/src/main/resources/schema.xsd000066400000000000000000000017301423155634000253720ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/tests/issues/src/test/000077500000000000000000000000001423155634000214325ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/issues/src/test/resources/000077500000000000000000000000001423155634000234445ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/issues/src/test/resources/log4j.properties000066400000000000000000000005541423155634000266050ustar00rootroot00000000000000log4j.rootCategory=DEBUG, stdout log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.target=system.out log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%m%n %c%n%n log4j.logger.org.apache.commons.digester=INFO log4j.logger.org.jvnet.hyperjaxb3=DEBUG log4j.logger.org.hibernate=WARNmaven-jaxb2-plugin-0.15.1/tests/java-9/000077500000000000000000000000001423155634000174405ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/java-9/.gitignore000066400000000000000000000000111423155634000214200ustar00rootroot00000000000000/target/ maven-jaxb2-plugin-0.15.1/tests/java-9/install-10.bat000066400000000000000000000001041423155634000220070ustar00rootroot00000000000000setlocal set JAVA_HOME=%JAVA10_HOME% call mvn clean install endlocalmaven-jaxb2-plugin-0.15.1/tests/java-9/install-8.bat000066400000000000000000000001031423155634000217350ustar00rootroot00000000000000setlocal set JAVA_HOME=%JAVA8_HOME% call mvn clean install endlocalmaven-jaxb2-plugin-0.15.1/tests/java-9/install-9.bat000066400000000000000000000001031423155634000217360ustar00rootroot00000000000000setlocal set JAVA_HOME=%JAVA9_HOME% call mvn clean install endlocalmaven-jaxb2-plugin-0.15.1/tests/java-9/pom.xml000066400000000000000000000017631423155634000207640ustar00rootroot00000000000000 4.0.0 maven-jaxb2-plugin-tests-java-9 org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests 0.15.1-SNAPSHOT jar Maven JAXB 2.x Plugin Tests [Java 9] org.glassfish.jaxb jaxb-runtime org.jvnet.jaxb2.maven2 maven-jaxb23-plugin generate generate maven-jaxb2-plugin-0.15.1/tests/java-9/src/000077500000000000000000000000001423155634000202275ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/java-9/src/main/000077500000000000000000000000001423155634000211535ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/java-9/src/main/resources/000077500000000000000000000000001423155634000231655ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/java-9/src/main/resources/SimpleClass.xsd000066400000000000000000000006241423155634000261260ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/tests/java-9/src/main/resources/SimpleClassWithOtherName.xsd000066400000000000000000000012201423155634000305560ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/tests/java-9/src/main/resources/SimpleClassWithPackage.xsd000066400000000000000000000016631423155634000302420ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/tests/java-9/src/test/000077500000000000000000000000001423155634000212065ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/java-9/src/test/java/000077500000000000000000000000001423155634000221275ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/java-9/src/test/java/org/000077500000000000000000000000001423155634000227165ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/java-9/src/test/java/org/jvnet/000077500000000000000000000000001423155634000240445ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/java-9/src/test/java/org/jvnet/jaxb2/000077500000000000000000000000001423155634000250525ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/java-9/src/test/java/org/jvnet/jaxb2/maven2/000077500000000000000000000000001423155634000262425ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/java-9/src/test/java/org/jvnet/jaxb2/maven2/java9/000077500000000000000000000000001423155634000272545ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/java-9/src/test/java/org/jvnet/jaxb2/maven2/java9/Java9Test.java000066400000000000000000000010621423155634000317300ustar00rootroot00000000000000//Copyright (c) 2017 by Disy Informationssysteme GmbH package org.jvnet.jaxb2.maven2.java9; import static org.junit.Assert.assertNotNull; import org.junit.Test; // NOT_PUBLISHED public class Java9Test { @Test public void packageBindingRespected() throws Exception { Object o = Class.forName("with_pack.SimpleClassWithPackage").newInstance(); assertNotNull(o); } @Test public void classNameBindingRespected() throws Exception { Object o = Class.forName("class_name.SimpleClassWithRightName").newInstance(); assertNotNull(o); } } maven-jaxb2-plugin-0.15.1/tests/p o/000077500000000000000000000000001423155634000170275ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/p o/.gitignore000066400000000000000000000000111423155634000210070ustar00rootroot00000000000000/target/ maven-jaxb2-plugin-0.15.1/tests/p o/pom.xml000066400000000000000000000017501423155634000203470ustar00rootroot00000000000000 4.0.0 maven-jaxb2-plugin-tests-p_o org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests 0.15.1-SNAPSHOT jar Maven JAXB 2.x Plugin Tests [p o] org.glassfish.jaxb jaxb-runtime org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-testing test org.jvnet.jaxb2.maven2 maven-jaxb2-plugin maven-jaxb2-plugin-0.15.1/tests/p o/src/000077500000000000000000000000001423155634000176165ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/p o/src/main/000077500000000000000000000000001423155634000205425ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/p o/src/main/resources/000077500000000000000000000000001423155634000225545ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/p o/src/main/resources/binding.xjb000066400000000000000000000004661423155634000247010ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/tests/p o/src/main/resources/purchaseorder.xsd000066400000000000000000000045051423155634000261460ustar00rootroot00000000000000 Purchase order schema for Example.com. Copyright 2000 Example.com. All rights reserved. maven-jaxb2-plugin-0.15.1/tests/p o/src/test/000077500000000000000000000000001423155634000205755ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/p o/src/test/java/000077500000000000000000000000001423155634000215165ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/p o/src/test/java/org/000077500000000000000000000000001423155634000223055ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/p o/src/test/java/org/jvnet/000077500000000000000000000000001423155634000234335ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/p o/src/test/java/org/jvnet/mjiip/000077500000000000000000000000001423155634000245435ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/p o/src/test/java/org/jvnet/mjiip/v_2/000077500000000000000000000000001423155634000252315ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/p o/src/test/java/org/jvnet/mjiip/v_2/tests/000077500000000000000000000000001423155634000263735ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/p o/src/test/java/org/jvnet/mjiip/v_2/tests/p_o/000077500000000000000000000000001423155634000271505ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/p o/src/test/java/org/jvnet/mjiip/v_2/tests/p_o/RunP_OPlugin.java000066400000000000000000000005541423155634000323400ustar00rootroot00000000000000package org.jvnet.mjiip.v_2.tests.p_o; import org.jvnet.jaxb2.maven2.AbstractXJC2Mojo; import org.jvnet.jaxb2.maven2.test.RunXJC2Mojo; public class RunP_OPlugin extends RunXJC2Mojo { @Override protected void configureMojo(AbstractXJC2Mojo mojo) { super.configureMojo(mojo); // mojo.setExtension(true); // mojo.setForceRegenerate(true); } } maven-jaxb2-plugin-0.15.1/tests/p o/src/test/java/org/jvnet/mjiip/v_2/tests/p_o/RunXJC.java000066400000000000000000000005231423155634000311240ustar00rootroot00000000000000package org.jvnet.mjiip.v_2.tests.p_o; import com.sun.tools.xjc.Driver; public class RunXJC { public static void main(String args[]) throws Exception { Driver.main(new String[] { "src\\main\\resources\\purchaseorder.xsd", "-b", "src\\main\\resources\\binding.xjb", "-d", "target/generated-sources/xjc" }); } } maven-jaxb2-plugin-0.15.1/tests/po-2.0/000077500000000000000000000000001423155634000172645ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/po-2.0/.gitignore000066400000000000000000000000111423155634000212440ustar00rootroot00000000000000/target/ maven-jaxb2-plugin-0.15.1/tests/po-2.0/build-1.5.bat000066400000000000000000000001531423155634000213530ustar00rootroot00000000000000setlocal set JAVA_HOME=%JAVA5_HOME% call mvn -X -Dmaven.test.skip=true clean install >std 2>err endlocalmaven-jaxb2-plugin-0.15.1/tests/po-2.0/build-1.6.bat000066400000000000000000000001531423155634000213540ustar00rootroot00000000000000setlocal set JAVA_HOME=%JAVA6_HOME% call mvn -X -Dmaven.test.skip=true clean install >std 2>err endlocalmaven-jaxb2-plugin-0.15.1/tests/po-2.0/pom.xml000066400000000000000000000015701423155634000206040ustar00rootroot00000000000000 4.0.0 maven-jaxb2-plugin-tests-po-2.0 org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests 0.15.1-SNAPSHOT jar Maven JAXB 2.x Plugin Tests [po-2.0] com.sun.xml.bind jaxb-impl ${jaxb20.version} org.jvnet.jaxb2.maven2 maven-jaxb20-plugin maven-jaxb2-plugin-0.15.1/tests/po-2.0/src/000077500000000000000000000000001423155634000200535ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/po-2.0/src/main/000077500000000000000000000000001423155634000207775ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/po-2.0/src/main/resources/000077500000000000000000000000001423155634000230115ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/po-2.0/src/main/resources/purchaseorder.xsd000066400000000000000000000045051423155634000264030ustar00rootroot00000000000000 Purchase order schema for Example.com. Copyright 2000 Example.com. All rights reserved. maven-jaxb2-plugin-0.15.1/tests/po-2.1/000077500000000000000000000000001423155634000172655ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/po-2.1/.gitignore000066400000000000000000000000111423155634000212450ustar00rootroot00000000000000/target/ maven-jaxb2-plugin-0.15.1/tests/po-2.1/build-1.5.bat000066400000000000000000000001531423155634000213540ustar00rootroot00000000000000setlocal set JAVA_HOME=%JAVA5_HOME% call mvn -X -Dmaven.test.skip=true clean install >std 2>err endlocalmaven-jaxb2-plugin-0.15.1/tests/po-2.1/pom.xml000066400000000000000000000015701423155634000206050ustar00rootroot00000000000000 4.0.0 maven-jaxb2-plugin-tests-po-raw org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests 0.15.1-SNAPSHOT jar Maven JAXB 2.x Plugin Tests [po-raw] com.sun.xml.bind jaxb-impl ${jaxb21.version} org.jvnet.jaxb2.maven2 maven-jaxb21-plugin maven-jaxb2-plugin-0.15.1/tests/po-2.1/src/000077500000000000000000000000001423155634000200545ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/po-2.1/src/main/000077500000000000000000000000001423155634000210005ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/po-2.1/src/main/resources/000077500000000000000000000000001423155634000230125ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/po-2.1/src/main/resources/purchaseorder.xsd000066400000000000000000000045051423155634000264040ustar00rootroot00000000000000 Purchase order schema for Example.com. Copyright 2000 Example.com. All rights reserved. maven-jaxb2-plugin-0.15.1/tests/po-2.2/000077500000000000000000000000001423155634000172665ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/po-2.2/.gitignore000066400000000000000000000000111423155634000212460ustar00rootroot00000000000000/target/ maven-jaxb2-plugin-0.15.1/tests/po-2.2/build-1.5.bat000066400000000000000000000001531423155634000213550ustar00rootroot00000000000000setlocal set JAVA_HOME=%JAVA5_HOME% call mvn -X -Dmaven.test.skip=true clean install >std 2>err endlocalmaven-jaxb2-plugin-0.15.1/tests/po-2.2/build-1.6.bat000066400000000000000000000001661423155634000213620ustar00rootroot00000000000000setlocal set JAVA_HOME=%JAVA6_HOME% java -version call mvn -X -Dmaven.test.skip=true clean install >std 2>err endlocalmaven-jaxb2-plugin-0.15.1/tests/po-2.2/pom.xml000066400000000000000000000015251423155634000206060ustar00rootroot00000000000000 4.0.0 maven-jaxb2-plugin-tests-po-2.2 org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests 0.14.1-SNAPSHOT jar Maven JAXB 2.x Plugin Tests [po-2.2] org.glassfish.jaxb jaxb-runtime org.jvnet.jaxb2.maven2 maven-jaxb22-plugin maven-jaxb2-plugin-0.15.1/tests/po-2.2/src/000077500000000000000000000000001423155634000200555ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/po-2.2/src/main/000077500000000000000000000000001423155634000210015ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/po-2.2/src/main/resources/000077500000000000000000000000001423155634000230135ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/po-2.2/src/main/resources/purchaseorder.xsd000066400000000000000000000045051423155634000264050ustar00rootroot00000000000000 Purchase order schema for Example.com. Copyright 2000 Example.com. All rights reserved. maven-jaxb2-plugin-0.15.1/tests/po-2.3/000077500000000000000000000000001423155634000172675ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/po-2.3/.gitignore000066400000000000000000000000111423155634000212470ustar00rootroot00000000000000/target/ maven-jaxb2-plugin-0.15.1/tests/po-2.3/pom.xml000066400000000000000000000015251423155634000206070ustar00rootroot00000000000000 4.0.0 maven-jaxb2-plugin-tests-po-2.3 org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests 0.15.1-SNAPSHOT jar Maven JAXB 2.x Plugin Tests [po-2.3] org.glassfish.jaxb jaxb-runtime org.jvnet.jaxb2.maven2 maven-jaxb23-plugin maven-jaxb2-plugin-0.15.1/tests/po-2.3/src/000077500000000000000000000000001423155634000200565ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/po-2.3/src/main/000077500000000000000000000000001423155634000210025ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/po-2.3/src/main/resources/000077500000000000000000000000001423155634000230145ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/po-2.3/src/main/resources/purchaseorder.xsd000066400000000000000000000044041423155634000264040ustar00rootroot00000000000000 Purchase order schema for Example.com. Copyright 2000 Example.com. All rights reserved. maven-jaxb2-plugin-0.15.1/tests/po-scd/000077500000000000000000000000001423155634000175365ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/po-scd/.gitignore000066400000000000000000000000111423155634000215160ustar00rootroot00000000000000/target/ maven-jaxb2-plugin-0.15.1/tests/po-scd/build-1.5.bat000066400000000000000000000001531423155634000216250ustar00rootroot00000000000000setlocal set JAVA_HOME=%JAVA5_HOME% call mvn -X -Dmaven.test.skip=true clean install >std 2>err endlocalmaven-jaxb2-plugin-0.15.1/tests/po-scd/build-1.6.bat000066400000000000000000000001531423155634000216260ustar00rootroot00000000000000setlocal set JAVA_HOME=%JAVA6_HOME% call mvn -X -Dmaven.test.skip=true clean install >std 2>err endlocalmaven-jaxb2-plugin-0.15.1/tests/po-scd/pom.xml000066400000000000000000000016361423155634000210610ustar00rootroot00000000000000 4.0.0 maven-jaxb2-plugin-tests-po-scd org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests 0.15.1-SNAPSHOT jar Maven JAXB 2.x Plugin Tests [po-scd] org.glassfish.jaxb jaxb-runtime org.jvnet.jaxb2.maven2 maven-jaxb2-plugin true maven-jaxb2-plugin-0.15.1/tests/po-scd/src/000077500000000000000000000000001423155634000203255ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/po-scd/src/main/000077500000000000000000000000001423155634000212515ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/po-scd/src/main/resources/000077500000000000000000000000001423155634000232635ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/po-scd/src/main/resources/bindings.xjb000066400000000000000000000006101423155634000255620ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/tests/po-scd/src/main/resources/purchaseorder.xsd000066400000000000000000000046711423155634000266610ustar00rootroot00000000000000 Purchase order schema for Example.com. Copyright 2000 Example.com. All rights reserved. maven-jaxb2-plugin-0.15.1/tests/po/000077500000000000000000000000001423155634000167675ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/po/.gitignore000066400000000000000000000000211423155634000207500ustar00rootroot00000000000000/target/ std err maven-jaxb2-plugin-0.15.1/tests/po/build-1.5.bat000066400000000000000000000001561423155634000210610ustar00rootroot00000000000000setlocal set JAVA_HOME=%JAVA5_HOME% call mvn -X -e -Dmaven.test.skip=true clean install >std 2>err endlocalmaven-jaxb2-plugin-0.15.1/tests/po/build-1.6.bat000066400000000000000000000001531423155634000210570ustar00rootroot00000000000000setlocal set JAVA_HOME=%JAVA6_HOME% call mvn -X -Dmaven.test.skip=true clean install >std 2>err endlocalmaven-jaxb2-plugin-0.15.1/tests/po/build-1.8.bat000066400000000000000000000001501423155634000210560ustar00rootroot00000000000000setlocal set JAVA_HOME=%JAVA8_HOME% call mvn -X -Dmaven.test.skip=true clean install >std 2>err endlocalmaven-jaxb2-plugin-0.15.1/tests/po/pom.xml000066400000000000000000000015561423155634000203130ustar00rootroot00000000000000 4.0.0 maven-jaxb2-plugin-tests-po org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests 0.15.1-SNAPSHOT jar Maven JAXB 2.x Plugin Tests [po] com.sun.xml.bind jaxb-impl ${jaxb.version} org.jvnet.jaxb2.maven2 maven-jaxb21-plugin maven-jaxb2-plugin-0.15.1/tests/po/src/000077500000000000000000000000001423155634000175565ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/po/src/main/000077500000000000000000000000001423155634000205025ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/po/src/main/resources/000077500000000000000000000000001423155634000225145ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/po/src/main/resources/purchaseorder.xsd000066400000000000000000000045051423155634000261060ustar00rootroot00000000000000 Purchase order schema for Example.com. Copyright 2000 Example.com. All rights reserved. maven-jaxb2-plugin-0.15.1/tests/pom.xml000066400000000000000000000071251423155634000176730ustar00rootroot00000000000000 4.0.0 maven-jaxb2-plugin-tests pom Maven JAXB 2.x Plugin Tests org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-project 0.15.1-SNAPSHOT catalog catalog-xml episodes po p o po-2.0 po-2.1 po-2.3 po-scd res tse two xjc-simple JAXB-1044 MAVEN_JAXB2_PLUGIN-49 MAVEN_JAXB2_PLUGIN-53 MAVEN_JAXB2_PLUGIN-69 MAVEN_JAXB2_PLUGIN-70 MAVEN_JAXB2_PLUGIN-79 MAVEN_JAXB2_PLUGIN-82 MAVEN_JAXB2_PLUGIN-86 MAVEN_JAXB2_PLUGIN-87 gh-issue-16 gh-issue-22 gh-issue-23 gh-issue-58 java-9 org.jvnet.jaxb2.maven2 maven-jaxb2-plugin ${project.version} generate generate generate-sources org.jvnet.jaxb2.maven2 maven-jaxb20-plugin ${project.version} generate generate org.jvnet.jaxb2.maven2 maven-jaxb21-plugin ${project.version} generate generate org.jvnet.jaxb2.maven2 maven-jaxb22-plugin ${project.version} generate generate org.jvnet.jaxb2.maven2 maven-jaxb23-plugin ${project.version} generate generate org.apache.maven.plugins maven-deploy-plugin true org.apache.maven.plugins maven-javadoc-plugin true maven-jaxb2-plugin-0.15.1/tests/res/000077500000000000000000000000001423155634000171425ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/res/.gitignore000066400000000000000000000000111423155634000211220ustar00rootroot00000000000000/target/ maven-jaxb2-plugin-0.15.1/tests/res/pom.xml000066400000000000000000000056141423155634000204650ustar00rootroot00000000000000 4.0.0 maven-jaxb2-plugin-tests-res org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests 0.15.1-SNAPSHOT jar Maven JAXB 2.x Plugin Tests [res] org.glassfish.jaxb jaxb-runtime org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests-po ${project.version} org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-testing test org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests-po ${project.version} org.jvnet.jaxb2.maven2 maven-jaxb2-plugin generate generate true src/main/resources/catalog.cat ${basedir}/src/main/schemas *.* *.xs http://schemas.opengis.net/wms/1.3.0/exceptions_1_3_0.xsd org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests-po purchaseorder.xsd org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests-po-scd ${project.version} purchaseorder.xsd maven-jaxb2-plugin-0.15.1/tests/res/src/000077500000000000000000000000001423155634000177315ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/res/src/main/000077500000000000000000000000001423155634000206555ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/res/src/main/resources/000077500000000000000000000000001423155634000226675ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/res/src/main/resources/bindings.xjb000066400000000000000000000007161423155634000251750ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/tests/res/src/main/resources/catalog.cat000066400000000000000000000000731423155634000247720ustar00rootroot00000000000000REWRITE_SYSTEM "http://schemas.opengis.net" "../schema/ogc"maven-jaxb2-plugin-0.15.1/tests/res/src/main/schema/000077500000000000000000000000001423155634000221155ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/res/src/main/schema/ogc/000077500000000000000000000000001423155634000226655ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/res/src/main/schema/ogc/wms/000077500000000000000000000000001423155634000234735ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/res/src/main/schema/ogc/wms/1.3.0/000077500000000000000000000000001423155634000241325ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/res/src/main/schema/ogc/wms/1.3.0/exceptions_1_3_0.xsd000066400000000000000000000022551423155634000277200ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/tests/res/src/main/schemas/000077500000000000000000000000001423155634000223005ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/res/src/main/schemas/schema.xs000066400000000000000000000237321423155634000241230ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/tests/res/src/main/schemas/schema.xsd000066400000000000000000000237321423155634000242670ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/tests/res/src/test/000077500000000000000000000000001423155634000207105ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/res/src/test/java/000077500000000000000000000000001423155634000216315ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/res/src/test/java/org/000077500000000000000000000000001423155634000224205ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/res/src/test/java/org/jvnet/000077500000000000000000000000001423155634000235465ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/res/src/test/java/org/jvnet/jaxb2/000077500000000000000000000000001423155634000245545ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/res/src/test/java/org/jvnet/jaxb2/maven2/000077500000000000000000000000001423155634000257445ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/res/src/test/java/org/jvnet/jaxb2/maven2/tests/000077500000000000000000000000001423155634000271065ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/res/src/test/java/org/jvnet/jaxb2/maven2/tests/res/000077500000000000000000000000001423155634000276775ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/res/src/test/java/org/jvnet/jaxb2/maven2/tests/res/RunResMojo.java000066400000000000000000000026031423155634000326060ustar00rootroot00000000000000package org.jvnet.jaxb2.maven2.tests.res; import java.io.File; import org.jvnet.jaxb2.maven2.AbstractXJC2Mojo; import org.jvnet.jaxb2.maven2.DependencyResource; import org.jvnet.jaxb2.maven2.ResourceEntry; import org.jvnet.jaxb2.maven2.test.RunXJC2Mojo; public class RunResMojo extends RunXJC2Mojo { @Override protected void configureMojo(AbstractXJC2Mojo mojo) { super.configureMojo(mojo); mojo.setCatalog(new File(getBaseDir(),"src/main/jaxb/catalog.cat")); mojo.setExtension(true); final ResourceEntry purchaseorder_xsd = new ResourceEntry(); final DependencyResource purchaseorder_xsd_dependencyResource = new DependencyResource(); purchaseorder_xsd.setDependencyResource(purchaseorder_xsd_dependencyResource); purchaseorder_xsd.getDependencyResource().setGroupId("org.jvnet.jaxb2.maven2"); purchaseorder_xsd.getDependencyResource().setArtifactId("maven-jaxb2-plugin-tests-po"); purchaseorder_xsd.getDependencyResource().setResource("purchaseorder.xsd"); mojo.setSchemas(new ResourceEntry[]{ purchaseorder_xsd }); // mojo. // // final ResourceEntry a_xsd = new ResourceEntry(); // a_xsd.setUrl("http://www.ab.org/a.xsd"); // mojo.setStrict(false); // mojo.setSchemaIncludes(new String[] {}); // mojo.setSchemas(new ResourceEntry[] { a_xsd }); // mojo.setCatalog(new File(getBaseDir(), "src/main/resources/catalog.cat")); mojo.setForceRegenerate(true); } } maven-jaxb2-plugin-0.15.1/tests/rnc/000077500000000000000000000000001423155634000171335ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/rnc/.gitignore000066400000000000000000000000531423155634000211210ustar00rootroot00000000000000/target/ /.settings/ /.classpath /.project maven-jaxb2-plugin-0.15.1/tests/rnc/pom.xml000066400000000000000000000032531423155634000204530ustar00rootroot00000000000000 4.0.0 maven-jaxb2-plugin-tests-rnc org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests 0.12.4-SNAPSHOT jar Maven JAXB 2.x Plugin Tests [rnc] org.glassfish.jaxb jaxb-runtime com.sun.xml.bind jaxb-extra-osgi ${jaxb.version} org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-testing test org.jvnet.jaxb2.maven2 maven-jaxb2-plugin ${project.version} generate RELAXNG_COMPACT *.rnc com.sun.xml.bind jaxb-extra-osgi ${jaxb.version} maven-jaxb2-plugin-0.15.1/tests/rnc/src/000077500000000000000000000000001423155634000177225ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/rnc/src/main/000077500000000000000000000000001423155634000206465ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/rnc/src/main/resources/000077500000000000000000000000001423155634000226605ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/rnc/src/main/resources/georss.rnc000066400000000000000000000050301423155634000246640ustar00rootroot00000000000000# -*- rnc -*- # RELAX NG Compact Syntax Grammar for the GEORSS # This defines the conformance to the rules of GEORSS # # OGC Web Services Context 1.0 is an OGC Standard. # Copyright (c) 2014 Open Geospatial Consortium. # To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ . # # Version: 1.0.0 # namespace georss="http://www.georss.org/georss" namespace gml="http://www.opengis.net/gml" namespace local = "" start |= georssElement georssElement = ( georssSimple | georssWhere) georssWhere = element georss:where { gmlAttribute*, gmlElement } georssSimple = georssPoint | georssLine | georssPolygon | georssBox | georssCircle | georssFeatureTypeTag | georssFeatureName | georssElev | georssFloor georssPoint = element georss:point { list { xsd:decimal, xsd:decimal } } georssLine = element georss:line { list { (xsd:decimal, xsd:decimal)+ } } georssPolygon = element georss:polygon { list { (xsd:decimal, xsd:decimal)+ } } georssBox = element georss:box { list { (xsd:decimal, xsd:decimal, xsd:decimal, xsd:decimal) } } georssCircle = element georss:circle { list { (xsd:decimal, xsd:decimal, xsd:decimal) } } georssFeatureTypeTag = element georss:featureTypeTag { text } georssRelationshipTag = element georss:relationshipTag { text } georssFeatureName = element georss:featureName { text } georssElev = element georss:elev {xsd:decimal} georssFloor = element georss:floor {xsd:decimal} georssRadius = element georss:radius {xsd:decimal} gmlAttribute = attribute (xml:base | xml:lang | local:* | gml:* ) { text } gmlElement = (gmlPointElement | gmlLineStringElement | gmlPolygonElement | gmlEnvelopeElement ) gmlPointElement = element gml:Point { gmlAttribute*, element gml:pos { gmlAttribute*, list { xsd:decimal, xsd:decimal }}} gmlLineStringElement = element gml:LineString { gmlAttribute*, element gml:posList {gmlAttribute*, list { (xsd:decimal, xsd:decimal)+ }}} gmlPolygonElement = element gml:Polygon { gmlAttribute*, element gml:exterior { gmlAttribute*, element gml:LinearRing { gmlAttribute*, element gml:posList { gmlAttribute*, list { (xsd:decimal, xsd:decimal)+ }}}}} gmlEnvelopeElement = element gml:Envelope { gmlAttribute*, ( element gml:lowerCorner { gmlAttribute*, list { xsd:decimal, xsd:decimal } } & element gml:upperCorner { gmlAttribute*, list { xsd:decimal, xsd:decimal } }) } # EOF maven-jaxb2-plugin-0.15.1/tests/rnc/src/test/000077500000000000000000000000001423155634000207015ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/rnc/src/test/java/000077500000000000000000000000001423155634000216225ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/rnc/src/test/java/org/000077500000000000000000000000001423155634000224115ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/rnc/src/test/java/org/jvnet/000077500000000000000000000000001423155634000235375ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/rnc/src/test/java/org/jvnet/jaxb2/000077500000000000000000000000001423155634000245455ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/rnc/src/test/java/org/jvnet/jaxb2/maven2/000077500000000000000000000000001423155634000257355ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/rnc/src/test/java/org/jvnet/jaxb2/maven2/tests/000077500000000000000000000000001423155634000270775ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/rnc/src/test/java/org/jvnet/jaxb2/maven2/tests/rnc/000077500000000000000000000000001423155634000276615ustar00rootroot00000000000000DatatypeLibraryLoaderTest.java000066400000000000000000000011501423155634000355310ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/rnc/src/test/java/org/jvnet/jaxb2/maven2/tests/rncpackage org.jvnet.jaxb2.maven2.tests.rnc; import org.junit.Test; import org.kohsuke.rngom.dt.builtin.BuiltinDatatypeLibraryFactory; import org.relaxng.datatype.DatatypeLibraryFactory; import org.relaxng.datatype.helpers.DatatypeLibraryLoader; public class DatatypeLibraryLoaderTest { @Test public void testDatatypeLibrary() { final DatatypeLibraryFactory b = new BuiltinDatatypeLibraryFactory(new DatatypeLibraryLoader()); b.createDatatypeLibrary(""); b.createDatatypeLibrary("http://www.w3.org/2001/XMLSchema-datatypes"); b.createDatatypeLibrary("http://www.w3.org/2001/XMLSchema-datatypes"); } } maven-jaxb2-plugin-0.15.1/tests/rnc/src/test/java/org/jvnet/jaxb2/maven2/tests/rnc/RunRNCMojo.java000066400000000000000000000014061423155634000324610ustar00rootroot00000000000000package org.jvnet.jaxb2.maven2.tests.rnc; import org.jvnet.jaxb2.maven2.AbstractXJC2Mojo; import org.jvnet.jaxb2.maven2.test.RunXJC2Mojo; import com.sun.tools.xjc.reader.Ring; public class RunRNCMojo extends RunXJC2Mojo { @Override protected void configureMojo(AbstractXJC2Mojo mojo) { super.configureMojo(mojo); // final ResourceEntry a_xsd = new ResourceEntry(); // a_xsd.setUrl("http://www.ab.org/a.xsd"); mojo.setStrict(false); mojo.setSchemaLanguage("RELAXNG_COMPACT"); mojo.setSchemaIncludes(new String[] { "*.rnc" }); mojo.setGeneratePackage("foo"); // mojo.setSchemas(new ResourceEntry[] { a_xsd }); // mojo.setCatalog(new File(getBaseDir(), // "src/main/resources/catalog.cat")); mojo.setForceRegenerate(true); // Ring.begin(); } } maven-jaxb2-plugin-0.15.1/tests/tse/000077500000000000000000000000001423155634000171445ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/tse/.gitignore000066400000000000000000000000111423155634000211240ustar00rootroot00000000000000/target/ maven-jaxb2-plugin-0.15.1/tests/tse/pom.xml000066400000000000000000000015201423155634000204570ustar00rootroot00000000000000 4.0.0 maven-jaxb2-plugin-tests-tse org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests 0.15.1-SNAPSHOT jar Maven JAXB 2.x Plugin Tests [tse] org.glassfish.jaxb jaxb-runtime org.jvnet.jaxb2.maven2 maven-jaxb23-plugin maven-jaxb2-plugin-0.15.1/tests/tse/src/000077500000000000000000000000001423155634000177335ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/tse/src/main/000077500000000000000000000000001423155634000206575ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/tse/src/main/java/000077500000000000000000000000001423155634000216005ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/tse/src/main/java/a/000077500000000000000000000000001423155634000220205ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/tse/src/main/java/a/A2Enum.java000066400000000000000000000005601423155634000237530ustar00rootroot00000000000000package a; import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlType; @XmlType(name = "A2EnumType", namespace = "a") @XmlEnum public enum A2Enum { ABC, DEF, GHI; public String value() { return name(); } public static A2Enum fromValue(String v) { return valueOf(v); } } maven-jaxb2-plugin-0.15.1/tests/tse/src/main/java/a/ObjectFactory.java000066400000000000000000000002271423155634000254220ustar00rootroot00000000000000package a; import javax.xml.bind.annotation.XmlRegistry; @XmlRegistry public class ObjectFactory { public ObjectFactory() { } } maven-jaxb2-plugin-0.15.1/tests/tse/src/main/resources/000077500000000000000000000000001423155634000226715ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/tse/src/main/resources/a.xsd000066400000000000000000000010671423155634000236350ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/tests/tse/src/main/resources/b.xsd000066400000000000000000000005751423155634000236410ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/tests/two/000077500000000000000000000000001423155634000171625ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/two/.gitignore000066400000000000000000000000111423155634000211420ustar00rootroot00000000000000/target/ maven-jaxb2-plugin-0.15.1/tests/two/build-1.5.bat000066400000000000000000000001531423155634000212510ustar00rootroot00000000000000setlocal set JAVA_HOME=%JAVA5_HOME% call mvn -X -Dmaven.test.skip=true clean install >std 2>err endlocalmaven-jaxb2-plugin-0.15.1/tests/two/build-1.6.bat000066400000000000000000000001531423155634000212520ustar00rootroot00000000000000setlocal set JAVA_HOME=%JAVA6_HOME% call mvn -X -Dmaven.test.skip=true clean install >std 2>err endlocalmaven-jaxb2-plugin-0.15.1/tests/two/pom.xml000066400000000000000000000041751423155634000205060ustar00rootroot00000000000000 4.0.0 org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests 0.15.1-SNAPSHOT org.jvnet.jaxb2_commons jaxb2-basics-runtime org.glassfish.jaxb jaxb-runtime junit junit test maven-jaxb2-plugin-tests-two jar Maven JAXB 2.x Plugin Tests [two] test org.jvnet.jaxb2.maven2 maven-jaxb2-plugin generate generate true *.xsd *.xs ${project.build.directory}/generated-sources/xjc/META-INF/sun-jaxb.episode -XtoString -Xequals -XhashCode -Xcopyable -Xmergeable org.jvnet.jaxb2_commons jaxb2-basics ${jaxb2-basics.version} maven-jaxb2-plugin-0.15.1/tests/two/src/000077500000000000000000000000001423155634000177515ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/two/src/main/000077500000000000000000000000001423155634000206755ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/two/src/main/resources/000077500000000000000000000000001423155634000227075ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/two/src/main/resources/schema.xs000066400000000000000000000000331423155634000245170ustar00rootroot00000000000000This file must be excluded.maven-jaxb2-plugin-0.15.1/tests/two/src/main/resources/schema.xsd000066400000000000000000000227151423155634000246760ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/tests/two/src/test/000077500000000000000000000000001423155634000207305ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/two/src/test/resources/000077500000000000000000000000001423155634000227425ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/two/src/test/resources/log4j.properties000066400000000000000000000004021423155634000260730ustar00rootroot00000000000000log4j.rootCategory=DEBUG, stdout log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.target=system.out log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - <%m>%nmaven-jaxb2-plugin-0.15.1/tests/two/src/test/samples/000077500000000000000000000000001423155634000223745ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/two/src/test/samples/1.xml000066400000000000000000000002151423155634000232540ustar00rootroot00000000000000 a b c d e 0 1 maven-jaxb2-plugin-0.15.1/tests/wsdl-file/000077500000000000000000000000001423155634000202375ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/wsdl-file/.gitignore000066400000000000000000000000071423155634000222240ustar00rootroot00000000000000target maven-jaxb2-plugin-0.15.1/tests/wsdl-file/build-1.5.bat000066400000000000000000000001531423155634000223260ustar00rootroot00000000000000setlocal set JAVA_HOME=%JAVA5_HOME% call mvn -X -e -Dmaven.test.skip=true clean install >std 2>err endlocalmaven-jaxb2-plugin-0.15.1/tests/wsdl-file/build-1.6.bat000066400000000000000000000001501423155634000223240ustar00rootroot00000000000000setlocal set JAVA_HOME=%JAVA6_HOME% call mvn -X -Dmaven.test.skip=true clean install >std 2>err endlocalmaven-jaxb2-plugin-0.15.1/tests/wsdl-file/pom.xml000066400000000000000000000021101423155634000215460ustar00rootroot00000000000000 4.0.0 maven-jaxb2-plugin-tests-wsdl-file org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests 0.13.2-SNAPSHOT jar Maven JAXB 2.x Plugin Tests [wsdl-file] org.glassfish.jaxb jaxb-runtime junit junit test org.jvnet.jaxb2.maven2 maven-jaxb2-plugin *.wsdl maven-jaxb2-plugin-0.15.1/tests/wsdl-file/src/000077500000000000000000000000001423155634000210265ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/wsdl-file/src/main/000077500000000000000000000000001423155634000217525ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/wsdl-file/src/main/resources/000077500000000000000000000000001423155634000237645ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/wsdl-file/src/main/resources/pedidowebservice.wsdl000066400000000000000000000036471423155634000302140ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/tests/wsdl-file/src/test/000077500000000000000000000000001423155634000220055ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/wsdl-file/src/test/java/000077500000000000000000000000001423155634000227265ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/wsdl-file/src/test/java/net/000077500000000000000000000000001423155634000235145ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/wsdl-file/src/test/java/net/webservicex/000077500000000000000000000000001423155634000260425ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/wsdl-file/src/test/java/net/webservicex/test/000077500000000000000000000000001423155634000270215ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/wsdl-file/src/test/java/net/webservicex/test/JAXBContextTest.java000066400000000000000000000011101423155634000326060ustar00rootroot00000000000000package net.webservicex.test; import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBException; import org.junit.Test; import junit.framework.Assert; import net.webservicex.GetWeather; public class JAXBContextTest { public static final String CONTEXT_PATH = GetWeather.class.getPackage().getName(); @Test public void successfullyCreatesMarshallerAndUnmarshaller() throws JAXBException { final JAXBContext context = JAXBContext.newInstance(CONTEXT_PATH); Assert.assertNotNull(context.createMarshaller()); Assert.assertNotNull(context.createUnmarshaller()); } } maven-jaxb2-plugin-0.15.1/tests/wsdl/000077500000000000000000000000001423155634000173225ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/wsdl/.gitignore000066400000000000000000000000451423155634000213110ustar00rootroot00000000000000target .classpath .project .settings maven-jaxb2-plugin-0.15.1/tests/wsdl/build-1.5.bat000066400000000000000000000001531423155634000214110ustar00rootroot00000000000000setlocal set JAVA_HOME=%JAVA5_HOME% call mvn -X -e -Dmaven.test.skip=true clean install >std 2>err endlocalmaven-jaxb2-plugin-0.15.1/tests/wsdl/build-1.6.bat000066400000000000000000000001501423155634000214070ustar00rootroot00000000000000setlocal set JAVA_HOME=%JAVA6_HOME% call mvn -X -Dmaven.test.skip=true clean install >std 2>err endlocalmaven-jaxb2-plugin-0.15.1/tests/wsdl/pom.xml000066400000000000000000000022541423155634000206420ustar00rootroot00000000000000 4.0.0 maven-jaxb2-plugin-tests-wsdl org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests 0.13.2-SNAPSHOT jar Maven JAXB 2.x Plugin Tests [wsdl] org.glassfish.jaxb jaxb-runtime junit junit test org.jvnet.jaxb2.maven2 maven-jaxb2-plugin http://www.webservicex.net/globalweather.asmx?wsdl WSDL maven-jaxb2-plugin-0.15.1/tests/wsdl/src/000077500000000000000000000000001423155634000201115ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/wsdl/src/test/000077500000000000000000000000001423155634000210705ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/wsdl/src/test/java/000077500000000000000000000000001423155634000220115ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/wsdl/src/test/java/net/000077500000000000000000000000001423155634000225775ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/wsdl/src/test/java/net/webservicex/000077500000000000000000000000001423155634000251255ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/wsdl/src/test/java/net/webservicex/test/000077500000000000000000000000001423155634000261045ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/wsdl/src/test/java/net/webservicex/test/JAXBContextTest.java000066400000000000000000000011101423155634000316710ustar00rootroot00000000000000package net.webservicex.test; import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBException; import org.junit.Test; import junit.framework.Assert; import net.webservicex.GetWeather; public class JAXBContextTest { public static final String CONTEXT_PATH = GetWeather.class.getPackage().getName(); @Test public void successfullyCreatesMarshallerAndUnmarshaller() throws JAXBException { final JAXBContext context = JAXBContext.newInstance(CONTEXT_PATH); Assert.assertNotNull(context.createMarshaller()); Assert.assertNotNull(context.createUnmarshaller()); } } maven-jaxb2-plugin-0.15.1/tests/xjc-simple/000077500000000000000000000000001423155634000204245ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/xjc-simple/.gitignore000066400000000000000000000000111423155634000224040ustar00rootroot00000000000000/target/ maven-jaxb2-plugin-0.15.1/tests/xjc-simple/pom.xml000066400000000000000000000030431423155634000217410ustar00rootroot00000000000000 4.0.0 maven-jaxb2-plugin-tests-xjc-simple org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-tests 0.15.1-SNAPSHOT jar Maven JAXB 2.x Plugin Tests [xjc-simple] org.glassfish.jaxb jaxb-runtime org.jvnet.jaxb2_commons jaxb2-basics-runtime org.jvnet.jaxb2.maven2 maven-jaxb23-plugin generate generate -XtoString -Xequals -XhashCode -Xcopyable org.jvnet.jaxb2_commons jaxb2-basics 0.12.0 true maven-jaxb2-plugin-0.15.1/tests/xjc-simple/src/000077500000000000000000000000001423155634000212135ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/xjc-simple/src/main/000077500000000000000000000000001423155634000221375ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/xjc-simple/src/main/resources/000077500000000000000000000000001423155634000241515ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/tests/xjc-simple/src/main/resources/purchaseorder.xjb000066400000000000000000000005511423155634000275250ustar00rootroot00000000000000 maven-jaxb2-plugin-0.15.1/tests/xjc-simple/src/main/resources/purchaseorder.xsd000066400000000000000000000045051423155634000275430ustar00rootroot00000000000000 Purchase order schema for Example.com. Copyright 2000 Example.com. All rights reserved. maven-jaxb2-plugin-0.15.1/www/000077500000000000000000000000001423155634000160335ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/www/alm-process/000077500000000000000000000000001423155634000202605ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/www/alm-process/snippets/000077500000000000000000000000001423155634000221255ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/www/alm-process/snippets/page.xml000066400000000000000000000006651423155634000235720ustar00rootroot00000000000000 index.htmlSubprojects maven-jaxb2-plugin-0.15.1/www/docs/000077500000000000000000000000001423155634000167635ustar00rootroot00000000000000maven-jaxb2-plugin-0.15.1/www/docs/guide.html000066400000000000000000000006511423155634000207500ustar00rootroot00000000000000 Maven2 JAXB2 Plugin User Guide

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

maven-jaxb2-plugin-0.15.1/www/index.html000066400000000000000000000057061423155634000200400ustar00rootroot00000000000000 JAXB2 Maven2 Plugin
duke

Maven 2 JAXB 2.x Plugin

This Maven 2 plugin wraps the JAXB 2.x XJC compiler and provides the capability to generate java sources from schemas.

Quickstart

  1. Put your schemas (*.xsd) and bindings (*.xjb) into the src/main/resources folder.

  2. Add the plugin to your build:

    <build>
    	<plugins>
    		<plugin>
    			<groupId>org.jvnet.jaxb2.maven2</groupId>
    			<artifactId>maven-jaxb2-plugin</artifactId>
    			<executions>
    				<execution>
    					<goals>
    						<goal>generate</goal>
    					</goals>
    				</execution>
    			</executions>
    		</plugin>
    	</plugins>
    </build>
  3. Reconfigure the compiler plugin to use 1.5:

    <build>
    	<plugins>
    		...
    		<plugin>
    			<inherited>true</inherited>
    			<groupId>org.apache.maven.plugins</groupId>
    			<artifactId>maven-compiler-plugin</artifactId>
    			<configuration>
    				<source>1.5</source>
    				<target>1.5</target>
    			</configuration>
    		</plugin>
    	</plugins>
    </build>

See the sample purchase order project for example.

Project Homepage

Maven JAXB2 Plugin project homepage was moved to the following address:

http://confluence.highsource.org/display/MJIIP/Maven+JAXB2+Plugin

Documentation

Maven JAXB2 Plugin documentation can be found here:

http://confluence.highsource.org/display/MJIIP/Documentation

Here's a couple of direct links:

maven-jaxb2-plugin-0.15.1/www/project_tools.html000066400000000000000000000020721423155634000216100ustar00rootroot00000000000000