diff --git a/jaxb-maven-plugin/src/main/java/org/openjax/jaxb/JaxbMojo.java b/jaxb-maven-plugin/src/main/java/org/openjax/jaxb/JaxbMojo.java index ddeef0a..c42c464 100644 --- a/jaxb-maven-plugin/src/main/java/org/openjax/jaxb/JaxbMojo.java +++ b/jaxb-maven-plugin/src/main/java/org/openjax/jaxb/JaxbMojo.java @@ -48,84 +48,83 @@ /** * Mojo that creates compile-scope Java source or binaries from XML schema(s) by invoking the JAXB XJC binding compiler. */ -@Mojo(name="xjc", defaultPhase=LifecyclePhase.GENERATE_SOURCES, requiresDependencyResolution=ResolutionScope.TEST) -@Execute(goal="xjc") +@Mojo(name = "xjc", defaultPhase = LifecyclePhase.GENERATE_SOURCES, requiresDependencyResolution = ResolutionScope.TEST) +@Execute(goal = "xjc") public class JaxbMojo extends GeneratorMojo { /** Turn on debug mode. */ - @Parameter(property="debug") + @Parameter(property = "debug") private boolean debug = false; /** Generated files will be in read-only mode. */ - @Parameter(property="readOnly") + @Parameter(property = "readOnly") private boolean readOnly = false; /** Suppress generation of a file header with timestamp. */ - @Parameter(property="noHeader") + @Parameter(property = "noHeader") private boolean noHeader = false; /** Generates code that works around issues specific to 1.4 runtime. */ - @Parameter(property="explicitAnnotation") + @Parameter(property = "explicitAnnotation") private boolean explicitAnnotation = false; /** If {@code true} XML security features when parsing XML documents will be disabled. The default value is {@code false}. */ - @Parameter(property="disableXmlSecurity") + @Parameter(property = "disableXmlSecurity") private boolean disableXmlSecurity = false; /** * When on, generates content property for types with multiple xs:any derived elements (which is supposed to be correct behavior). */ - @Parameter(property="contentForWildcard") + @Parameter(property = "contentForWildcard") private boolean contentForWildcard = false; /** If true, try to resolve name conflicts automatically by assigning mechanical numbers. */ - @Parameter(property="autoNameResolution") + @Parameter(property = "autoNameResolution") private boolean autoNameResolution = false; /** This allocator has the final say on deciding the class name. */ - @Parameter(property="testClassNameAllocator") + @Parameter(property = "testClassNameAllocator") private boolean testClassNameAllocator = false; /** Java module name in {@code module-info.java}. */ - @Parameter(property="javaModule") + @Parameter(property = "javaModule") private String javaModule; /** File defining proxyHost:proxyPort */ - @Parameter(property="httpProxyFile") + @Parameter(property = "httpProxyFile") private File httpProxyFile; /** String defining proxyHost:proxyPort */ - @Parameter(property="httpProxy") + @Parameter(property = "httpProxy") private String httpProxy; /** * Corresponding XJC parameter: mark-generated. This feature causes all of the generated code to have @Generated annotation. */ - @Parameter(property="addGeneratedAnnotation") + @Parameter(property = "addGeneratedAnnotation") private boolean addGeneratedAnnotation = false; /** - * Corresponding XJC parameter: catalog. - * Specify catalog files to resolve external entity references. Supports - * TR9401, XCatalog, and OASIS XML Catalog format. + * Corresponding XJC parameter: catalog. Specify catalog files to resolve external entity references. Supports TR9401, XCatalog, and + * OASIS XML Catalog format. */ - @Parameter(property="catalog") + @Parameter(property = "catalog") private File catalog; /** * Corresponding XJC parameter: enableIntrospection. Enable correct generation of Boolean getters/setters to enable Bean * Introspection APIs. */ - @Parameter(property="enableIntrospection") + @Parameter(property = "enableIntrospection") private boolean enableIntrospection = true; /** * Defines the encoding used by XJC (for generating Java Source files) and schemagen (for generating XSDs). The corresponding * argument parameter for XJC and SchemaGen is: encoding. The algorithm for finding the encoding to use is as follows (where the * first non-null value found is used for encoding): 1. If the configuration property is explicitly given within the plugin's - * configuration, use that value. 2. If the Maven property project.build.sourceEncoding is defined, use its value. 3. Otherwise - * use the value from the system property file.encoding. + * configuration, use that value. 2. If the Maven property project.build.sourceEncoding is defined, use its value. 3. Otherwise use + * the value from the system property file.encoding. */ - @Parameter(property="encoding", defaultValue="${project.build.sourceEncoding}") + @Parameter(property = "encoding", defaultValue = "${project.build.sourceEncoding}") private String encoding; /** @@ -134,7 +133,7 @@ public class JaxbMojo extends GeneratorMojo { * supported by JAXB v1.0. In some cases, you may be allowed to use them in the '-extension' mode enabled by this switch. In the * default (strict) mode, you are also limited to using only the binding customizations defined in the specification. */ - @Parameter(property="extension") + @Parameter(property = "extension") private boolean extension = false; /** @@ -143,31 +142,29 @@ public class JaxbMojo extends GeneratorMojo { * just a JAXB customization file (but with vendor extensions.) If this parameter is true, the episode file generated is called * META-INF/sun-jaxb.episode, and included in the artifact. */ - @Parameter(property="generateEpisode") + @Parameter(property = "generateEpisode") private boolean generateEpisode = false; /** * Corresponding XJC parameter: nv. By default, the XJC binding compiler performs strict validation of the source schema before - * processing it. Use this option to disable strict schema validation. This does not mean that the binding compiler will not - * perform any validation, it simply means that it will perform less-strict validation. + * processing it. Use this option to disable strict schema validation. This does not mean that the binding compiler will not perform + * any validation, it simply means that it will perform less-strict validation. */ - @Parameter(property="laxSchemaValidation") + @Parameter(property = "laxSchemaValidation") private boolean laxSchemaValidation = false; /** - * Corresponding XJC parameter: no-header. - * - * Suppress the generation of a file header comment that includes some note - * and timestamp. Using this makes the generated code more diff-friendly. + * Corresponding XJC parameter: no-header. Suppress the generation of a file header comment that includes some note and timestamp. + * Using this makes the generated code more diff-friendly. */ - @Parameter(property="noGeneratedHeaderComments") + @Parameter(property = "noGeneratedHeaderComments") private boolean noGeneratedHeaderComments = false; /** - * Corresponding XJC parameter: npa. Suppress the generation of package level annotations into package-info.java. Using this - * switch causes the generated code to internalize those annotations into the other generated classes. + * Corresponding XJC parameter: npa. Suppress the generation of package level annotations into package-info.java. Using this switch + * causes the generated code to internalize those annotations into the other generated classes. */ - @Parameter(property="noPackageLevelAnnotations") + @Parameter(property = "noPackageLevelAnnotations") private boolean noPackageLevelAnnotations = false; /** @@ -175,13 +172,13 @@ public class JaxbMojo extends GeneratorMojo { * 'Specifying a target package via this command-line option overrides any binding customization for package name and the default * package name algorithm defined in the specification'. */ - @Parameter(property="packageName") + @Parameter(property = "packageName") private String packageName; /** * Corresponding XJC parameter: quiet. Suppress compiler output, such as progress information and warnings. */ - @Parameter(property="quiet") + @Parameter(property = "quiet") private boolean quiet = false; /** @@ -189,27 +186,27 @@ public class JaxbMojo extends GeneratorMojo { * have the same type of content. This parameter replaces the previous multiple-choice boolean configuration options for the * jaxb2-maven-plugin (i.e. dtd, xmlschema, wsdl), and corresponds to setting one of those flags as an XJC argument. */ - @Parameter(property="sourceType") + @Parameter(property = "sourceType") private String sourceType = "xmlschema"; /** - * Corresponding XJC parameter: target. Permitted values: '2.0' and '2.1'. Avoid generating code that relies on JAXB newer than - * the version given. This will allow the generated code to run with JAXB 2.0 runtime (such as JavaSE 6.). + * Corresponding XJC parameter: target. Permitted values: '2.0' and '2.1'. Avoid generating code that relies on JAXB newer than the + * version given. This will allow the generated code to run with JAXB 2.0 runtime (such as JavaSE 6.). */ - @Parameter(property="target") + @Parameter(property = "target") private String targetVersion; /** - * Corresponding XJC parameter: verbose. Tells XJC to be extra verbose, such as printing informational messages or displaying - * stack traces. User property: xjc.verbose + * Corresponding XJC parameter: verbose. Tells XJC to be extra verbose, such as printing informational messages or displaying stack + * traces. User property: xjc.verbose */ - @Parameter(property="verbose") + @Parameter(property = "verbose") private boolean verbose = false; /** - * Parameter holding List of XSD paths to files and/or directories which should be recursively searched for XSD files. Only files - * or directories that actually exist will be included (in the case of files) or recursively searched for XSD files to include (in - * the case of directories). Configure using standard Maven structure for Lists: + * Parameter holding List of XSD paths to files and/or directories which should be recursively searched for XSD files. Only files or + * directories that actually exist will be included (in the case of files) or recursively searched for XSD files to include (in the + * case of directories). Configure using standard Maven structure for Lists: * *
* {@code @@ -225,14 +222,14 @@ public class JaxbMojo extends GeneratorMojo { **/ @FilterParameter(FilterType.URL) - @Parameter(property="schemas", required=true) + @Parameter(property = "schemas", required = true) private List
* {@code @@ -247,7 +244,7 @@ public class JaxbMojo extends GeneratorMojo { **/ @FilterParameter(FilterType.URL) - @Parameter(property="bindings") + @Parameter(property = "bindings") private List
- * Or if the {@link ValidationEventHandler} returns false from its handleEvent method or the {@link Marshaller} is
- * unable to marshal the binding.
+ * Or if the {@link ValidationEventHandler} returns false from its handleEvent method or the {@link Marshaller} is unable
+ * to marshal the binding.
*/
@SuppressWarnings("unchecked")
- public static