I'd recommend https://github.com/patrodyne/hisrc-basicjaxb#hisrc-basicjaxb

Cheers!

Am 24.08.2023 um 20:21 schrieb David Hoffer:
That one works great as a general purpose XJC tool and supports JAXB4 but
unfortunately to use any of the plugin options

-XtoString
-Xequals
-XhashCode
-Xcopyable

Requires the use of <artifactId>jaxb2-basics</artifactId> according to the
docs which is ancient and stuck in JDK8 and prior.  So, not an option for a
JDK17 Java EE 10 application.

If anyone knows of newer plugin extensions that can support JDK17 let me
know.

Thanks,
-David

On Tue, Aug 22, 2023 at 2:46 PM Delany <delany.middle...@gmail.com> wrote:

This one has JAXB4 support
https://github.com/phax/maven-jaxb2-plugin
Delany



On Tue, 22 Aug 2023 at 22:04, David Hoffer <dhoff...@gmail.com> wrote:

I think that is based on:

<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>

Which, I can't get to work with JDK17 and to be compatible with the rest
of
my app has to be at Java EE 10.

I'm currently trying to use:

<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId>
<version>3.1.0</version>

As it's current; seems to support JDK17 Java 10 well.  But it seems they
dropped support for -X argument options.  Or I just can't find how it's
supported.

I have also tried:

<groupId>org.apache.cxf</groupId>
<artifactId>cxf-xjc-plugin</artifactId>
<version>4.0.0</version>

And it too is current, supports JDK17 and Java 10.  It does have
extension
support for:

toString
defaultValue

But does not have support for:
equals
hashCode

And those I would really like to have.  Trying to find a way to have all
4
of those options.

-Dave

On Tue, Aug 22, 2023 at 1:31 PM Delany <delany.middle...@gmail.com>
wrote:
Try here https://stackoverflow.com/a/32336886/2746335
Delany

On Tue, 22 Aug 2023 at 21:16, David Hoffer <dhoff...@gmail.com> wrote:

I'm wanting to use the JAXB2 Maven Plugin's XJC goal in a JDK17
project.
I'm using version 3.1.0.  I can get it to generate the Java code but
can't
find any way to add support for optional things like:

toString
equals
hashCode
defaultValue

Can someone point me in the right direction on how to add these very
useful
options to the generated code.

Thanks,
-Dave



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to