Skip to content

Commit

Permalink
[#378] rename part of classes to remove '2' part of XJC / JAXB + fixi…
Browse files Browse the repository at this point in the history
…ng README
  • Loading branch information
laurentschoelens authored and mattrpav committed Sep 15, 2023
1 parent 2c06062 commit 4eb5cc6
Show file tree
Hide file tree
Showing 45 changed files with 148 additions and 148 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,22 +94,22 @@ If you need an older JAXB version, you can use one of the following variants, wh
If you experience issues with the Mojohaus JAXB2 Maven Plugin (`org.codehaus.mojo:jaxb2-maven-plugin`),
please file it [on their project page](https://github.com/mojohaus/jaxb2-maven-plugin).

# JAXB2 Basics
# JAXB Basics

JAXB2 Basics is an [open source](https://github.com/highsource/jaxb-tools/blob/master/LICENSE) project
which provides useful plugins and tools for [JAXB 2.x reference implementation](https://github.com/eclipse-ee4j/jaxb-ri/tree/EE8).
JAXB Basics is an [open source](https://github.com/highsource/jaxb-tools/blob/master/LICENSE) project
which provides useful plugins and tools for [JAXB 3.x reference implementation](https://github.com/eclipse-ee4j/jaxb-ri/tree/3.0.2-RI).

## Documentation

Please refer to the [wiki](https://github.com/highsource/jaxb-tools/wiki/JAXB2-Basic) for documentation.

JAXB2 Basics can only be used with JAXB/XJC 2.3.x. JAXB/XJC versions 2.2.x and earlier are no longer supported.
JAXB Basics can only be used with JAXB/XJC 3.x.

## Using JAXB2 Basics
## Using JAXB Basics

* [Using JAXB2 Basics Plugins](https://github.com/highsource/jaxb-tools/wiki/Using-JAXB2-Basics-Plugins)
* [Using JAXB Basics Plugins](https://github.com/highsource/jaxb-tools/wiki/Using-JAXB2-Basics-Plugins)

## JAXB2 Basics Plugins
## JAXB Basics Plugins
* [SimpleEquals Plugin](https://github.com/highsource/jaxb-tools/wiki/JAXB2-SimpleEquals-Plugin) - generates runtime-free reflection-free `equals(...)` methods.
* [SimpleHashCode Plugin](https://github.com/highsource/jaxb-tools/wiki/JAXB2-SimpleHashCode-Plugin) - generates runtime-free reflection-free `hashCode()` methods.
* [Equals Plugin](https://github.com/highsource/jaxb-tools/wiki/JAXB2-Equals-Plugin) - generates reflection-free strategic `equals(...)` method.
Expand Down Expand Up @@ -198,7 +198,7 @@ You can put your annotations directly in schema:
<xsd:annotation>
<xsd:appinfo>
<annox:annotate>@java.lang.SuppressWarnings({"unchecked","rawtypes"})</annox:annotate>
<annox:annotate target="package">@javax.annotation.Generated({"XJC","JAXB2 Annotate Plugin"})</annox:annotate>
<annox:annotate target="package">@javax.annotation.Generated({"XJC","JAXB Annotate Plugin"})</annox:annotate>
</xsd:appinfo>
</xsd:annotation>
<xsd:sequence>
Expand Down Expand Up @@ -380,7 +380,7 @@ Note: yes, I know that `http://annox.dev.java.net` no longer exists. Changing th
This is just a namespace, there must not necessarily be content there. Treat it as a logical identifier, nothing else.


## Using JAXB2 Annotate Plugin with Maven
## Using JAXB Annotate Plugin with Maven

* Add `org.jvnet.jaxb:jaxb-basics-annotate` as XJC plugin
* Turn on the plugin using `-Xannotate` or `-XremoveAnnotation`switch
Expand Down Expand Up @@ -416,7 +416,7 @@ See [this example](https://github.com/highsource/jaxb-tools/tree/master/jaxb-ann

Note that annotations are first compiled in the `annotations` module and the added to the classpath of the `jaxb-maven-plugin` in the `schema` module:

## Using JAXB2 Annotate Plugin with Ant
## Using JAXB Annotate Plugin with Ant

See [this example](https://github.com/highsource/jaxb-tools/blob/master/jaxb-annotate-parent/samples/annotate/project-build.xml).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import org.apache.tools.ant.BuildException;

public class XJC2Task extends com.sun.tools.xjc.XJC2Task {
public class XJCTask extends com.sun.tools.xjc.XJC2Task {

private boolean disableXmlSecurity = true;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public String getOptionName() {
@Override
public String getUsage() {
return " -XsimpleEquals : Generate reflection-free runtime-free equals(Object that) methods.\n" +
" See https://github.com/highsource/jaxb2-basics/wiki/JAXB2-SimpleEquals-Plugin";
" See https://github.com/highsource/jaxb-tools/wiki/JAXB2-SimpleEquals-Plugin";
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public String getOptionName() {
@Override
public String getUsage() {
return " -XsimpleEquals : Generate reflection-free runtime-free hashCode() methods.\n" +
" See https://github.com/highsource/jaxb2-basics/wiki/JAXB2-SimpleHashCode-Plugin";
" See https://github.com/highsource/jaxb-tools/wiki/JAXB2-SimpleHashCode-Plugin";
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@
import java.util.ArrayList;
import java.util.List;

import org.jvnet.jaxb.maven.AbstractXJC2Mojo;
import org.jvnet.jaxb.maven.test.RunXJC2Mojo;
import org.jvnet.jaxb.maven.AbstractXJCMojo;
import org.jvnet.jaxb.maven.test.RunXJCMojo;

import com.sun.tools.xjc.Options;

public class RunCopyablePlugin extends RunXJC2Mojo {
public class RunCopyablePlugin extends RunXJCMojo {

@Override
public File getSchemaDirectory() {
return new File(getBaseDir(), "src/test/resources");
}

@Override
protected void configureMojo(AbstractXJC2Mojo<Options> mojo) {
protected void configureMojo(AbstractXJCMojo<Options> mojo) {
super.configureMojo(mojo);
mojo.setForceRegenerate(true);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@
import java.util.ArrayList;
import java.util.List;

import org.jvnet.jaxb.maven.AbstractXJC2Mojo;
import org.jvnet.jaxb.maven.test.RunXJC2Mojo;
import org.jvnet.jaxb.maven.AbstractXJCMojo;
import org.jvnet.jaxb.maven.test.RunXJCMojo;

import com.sun.tools.xjc.Options;

public class RunEqualsPlugin extends RunXJC2Mojo {
public class RunEqualsPlugin extends RunXJCMojo {

@Override
public File getSchemaDirectory() {
return new File(getBaseDir(), "src/test/resources");
}

@Override
protected void configureMojo(AbstractXJC2Mojo<Options> mojo) {
protected void configureMojo(AbstractXJCMojo<Options> mojo) {
super.configureMojo(mojo);
mojo.setForceRegenerate(true);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@
import java.util.ArrayList;
import java.util.List;

import org.jvnet.jaxb.maven.AbstractXJC2Mojo;
import org.jvnet.jaxb.maven.test.RunXJC2Mojo;
import org.jvnet.jaxb.maven.AbstractXJCMojo;
import org.jvnet.jaxb.maven.test.RunXJCMojo;

import com.sun.tools.xjc.Options;

public class RunMergeablePlugin extends RunXJC2Mojo {
public class RunMergeablePlugin extends RunXJCMojo {

@Override
public File getSchemaDirectory() {
return new File(getBaseDir(), "src/test/resources");
}

@Override
protected void configureMojo(AbstractXJC2Mojo<Options> mojo) {
protected void configureMojo(AbstractXJCMojo<Options> mojo) {
super.configureMojo(mojo);
mojo.setForceRegenerate(true);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@
import java.util.ArrayList;
import java.util.List;

import org.jvnet.jaxb.maven.AbstractXJC2Mojo;
import org.jvnet.jaxb.maven.test.RunXJC2Mojo;
import org.jvnet.jaxb.maven.AbstractXJCMojo;
import org.jvnet.jaxb.maven.test.RunXJCMojo;
import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;

import com.sun.tools.xjc.Options;

public class RunToStringPlugin extends RunXJC2Mojo {
public class RunToStringPlugin extends RunXJCMojo {

@Override
public File getSchemaDirectory() {
return new File(getBaseDir(), "src/test/resources");
}

@Override
protected void configureMojo(AbstractXJC2Mojo<Options> mojo) {
protected void configureMojo(AbstractXJCMojo<Options> mojo) {
super.configureMojo(mojo);
mojo.setForceRegenerate(true);
}
Expand Down
4 changes: 2 additions & 2 deletions basics/samples/basic/project-build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@
<delete dir="${basedir}/target/test-classes"/>
</target>
<target name="generate-sources">
<taskdef name="xjc" classname="org.jvnet.jaxb2_commons.xjc.XJC2Task">
<!-- XJC2 Task classpath -->
<taskdef name="xjc" classname="org.jvnet.jaxb2_commons.xjc.XJCTask">
<!-- XJC Task classpath -->
<classpath>
<fileset dir="${basedir}/lib">
<include name="codemodel-*.jar"/>
Expand Down
4 changes: 2 additions & 2 deletions basics/samples/po-simple/project-build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@
<delete dir="${basedir}/target/test-classes"/>
</target>
<target name="generate-sources">
<taskdef name="xjc" classname="org.jvnet.jaxb2_commons.xjc.XJC2Task">
<!-- XJC2 Task classpath -->
<taskdef name="xjc" classname="org.jvnet.jaxb2_commons.xjc.XJCTask">
<!-- XJC Task classpath -->
<classpath>
<fileset dir="${basedir}/lib">
<include name="codemodel-*.jar"/>
Expand Down
4 changes: 2 additions & 2 deletions basics/samples/po/project-build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@
<delete dir="${basedir}/target/test-classes"/>
</target>
<target name="generate-sources">
<taskdef name="xjc" classname="org.jvnet.jaxb2_commons.xjc.XJC2Task">
<!-- XJC2 Task classpath -->
<taskdef name="xjc" classname="org.jvnet.jaxb2_commons.xjc.XJCTask">
<!-- XJC Task classpath -->
<classpath>
<fileset dir="${basedir}/lib">
<include name="codemodel-*.jar"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
import java.util.ArrayList;
import java.util.List;

import org.jvnet.jaxb.maven.AbstractXJC2Mojo;
import org.jvnet.jaxb.maven.test.RunXJC2Mojo;
import org.jvnet.jaxb.maven.AbstractXJCMojo;
import org.jvnet.jaxb.maven.test.RunXJCMojo;

import com.sun.tools.xjc.Options;

public class RunIssuesPlugin extends RunXJC2Mojo {
public class RunIssuesPlugin extends RunXJCMojo {

@Override
protected void configureMojo(AbstractXJC2Mojo<Options> mojo) {
protected void configureMojo(AbstractXJCMojo<Options> mojo) {
super.configureMojo(mojo);
mojo.setExtension(true);
mojo.setForceRegenerate(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
import java.util.ArrayList;
import java.util.List;

import org.jvnet.jaxb.maven.AbstractXJC2Mojo;
import org.jvnet.jaxb.maven.test.RunXJC2Mojo;
import org.jvnet.jaxb.maven.AbstractXJCMojo;
import org.jvnet.jaxb.maven.test.RunXJCMojo;

import com.sun.tools.xjc.Options;

public class RunNamespacePlugin extends RunXJC2Mojo {
public class RunNamespacePlugin extends RunXJCMojo {

@Override
protected void configureMojo(AbstractXJC2Mojo<Options> mojo) {
protected void configureMojo(AbstractXJCMojo<Options> mojo) {
super.configureMojo(mojo);
mojo.setExtension(true);
mojo.setForceRegenerate(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
import java.util.ArrayList;
import java.util.List;

import org.jvnet.jaxb.maven.AbstractXJC2Mojo;
import org.jvnet.jaxb.maven.test.RunXJC2Mojo;
import org.jvnet.jaxb.maven.AbstractXJCMojo;
import org.jvnet.jaxb.maven.test.RunXJCMojo;

import com.sun.tools.xjc.Options;

public class RunOnePlugin extends RunXJC2Mojo {
public class RunOnePlugin extends RunXJCMojo {

@Override
protected void configureMojo(AbstractXJC2Mojo<Options> mojo) {
protected void configureMojo(AbstractXJCMojo<Options> mojo) {
super.configureMojo(mojo);
mojo.setExtension(true);
mojo.setForceRegenerate(true);
Expand Down
4 changes: 2 additions & 2 deletions hyperjaxb/ejb/samples/po-customized-toplink/project-build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@
<delete dir="${basedir}/target/test-classes"/>
</target>
<target name="generate-sources">
<taskdef name="xjc" classname="org.jvnet.jaxb2_commons.xjc.XJC2Task">
<!-- XJC2 Task classpath -->
<taskdef name="xjc" classname="org.jvnet.jaxb2_commons.xjc.XJCTask">
<!-- XJC Task classpath -->
<classpath>
<fileset dir="${basedir}/lib">
<include name="activation-*.jar"/>
Expand Down
4 changes: 2 additions & 2 deletions hyperjaxb/ejb/samples/po-initial/project-build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@
</target>
<target name="generate-sources">
<taskdef name="xjc" classname="com.sun.tools.xjc.XJC2Task">
<!--taskdef name="xjc" classname="org.jvnet.jaxb2_commons.xjc.XJC2Task"-->
<!-- XJC2 Task classpath -->
<!--taskdef name="xjc" classname="org.jvnet.jaxb2_commons.xjc.XJCTask"-->
<!-- XJC Task classpath -->
<classpath>
<fileset dir="${basedir}/lib">
<include name="activation-*.jar"/>
Expand Down
4 changes: 2 additions & 2 deletions hyperjaxb/ejb/samples/uniprot/project-build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@
<delete dir="${basedir}/target/test-classes"/>
</target>
<target name="generate-sources">
<taskdef name="xjc" classname="org.jvnet.jaxb2_commons.xjc.XJC2Task">
<!-- XJC2 Task classpath -->
<taskdef name="xjc" classname="org.jvnet.jaxb2_commons.xjc.XJCTask">
<!-- XJC Task classpath -->
<classpath>
<fileset dir="${basedir}/lib">
<include name="activation-*.jar"/>
Expand Down
4 changes: 2 additions & 2 deletions hyperjaxb/ejb/templates/basic/project-build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@
<delete dir="${basedir}/target/test-classes"/>
</target>
<target name="generate-sources">
<taskdef name="xjc" classname="org.jvnet.jaxb2_commons.xjc.XJC2Task">
<!-- XJC2 Task classpath -->
<taskdef name="xjc" classname="org.jvnet.jaxb2_commons.xjc.XJCTask">
<!-- XJC Task classpath -->
<classpath>
<fileset dir="${basedir}/lib">
<include name="activation-*.jar"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@
import org.apache.maven.plugins.annotations.ResolutionScope;

import com.sun.tools.xjc.Options;
import org.jvnet.jaxb.maven.XJC2Mojo;
import org.jvnet.jaxb.maven.XJCMojo;

@Mojo(name = "generate", defaultPhase = LifecyclePhase.GENERATE_SOURCES, requiresDependencyResolution = ResolutionScope.COMPILE, threadSafe = true)
public class Hyperjaxb3Mojo extends XJC2Mojo {
public class Hyperjaxb3Mojo extends XJCMojo {

/**
* Target directory for the generated mappings. If left empty, mappings are
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@

import org.apache.maven.project.MavenProject;
import org.jvnet.hyperjaxb3.maven2.Hyperjaxb3Mojo;
import org.jvnet.jaxb.maven.AbstractXJC2Mojo;
import org.jvnet.jaxb.maven.test.RunXJC2Mojo;
import org.jvnet.jaxb.maven.AbstractXJCMojo;
import org.jvnet.jaxb.maven.test.RunXJCMojo;

public class Hyperjaxb3MojoTest extends RunXJC2Mojo {
public class Hyperjaxb3MojoTest extends RunXJCMojo {

@Override
protected AbstractXJC2Mojo createMojo() {
protected AbstractXJCMojo createMojo() {
return new Hyperjaxb3Mojo();
}

@Override
protected void configureMojo(AbstractXJC2Mojo mojo) {
protected void configureMojo(AbstractXJCMojo mojo) {
super.configureMojo(mojo);
configureHyperjaxb3Mojo((Hyperjaxb3Mojo) mojo);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@

import org.apache.maven.project.MavenProject;
import org.jvnet.hyperjaxb3.maven2.Hyperjaxb3Mojo;
import org.jvnet.jaxb.maven.AbstractXJC2Mojo;
import org.jvnet.jaxb.maven.test.RunXJC2Mojo;
import org.jvnet.jaxb.maven.AbstractXJCMojo;
import org.jvnet.jaxb.maven.test.RunXJCMojo;

public class RunEjbHyperjaxb3Mojo extends RunXJC2Mojo {
public class RunEjbHyperjaxb3Mojo extends RunXJCMojo {

@Override
protected AbstractXJC2Mojo createMojo() {
protected AbstractXJCMojo createMojo() {
return new Hyperjaxb3Mojo();
}

@Override
protected void configureMojo(AbstractXJC2Mojo mojo) {
protected void configureMojo(AbstractXJCMojo mojo) {
super.configureMojo(mojo);
configureHyperjaxb3Mojo((Hyperjaxb3Mojo) mojo);

Expand Down
4 changes: 2 additions & 2 deletions jaxb-annotate-parent/samples/annotate/project-build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@
<delete dir="${basedir}/target/test-classes"/>
</target>
<target name="generate-sources">
<taskdef name="xjc" classname="org.jvnet.jaxb2_commons.xjc.XJC2Task">
<!-- XJC2 Task classpath -->
<taskdef name="xjc" classname="org.jvnet.jaxb2_commons.xjc.XJCTask">
<!-- XJC Task classpath -->
<classpath>
<fileset dir="${basedir}/lib">
<include name="commons-text-*.jar"/>
Expand Down
Loading

0 comments on commit 4eb5cc6

Please sign in to comment.