Giter Site home page Giter Site logo

Comments (11)

cachescrubber avatar cachescrubber commented on August 12, 2024 2

I upgraded my build (see comment above) using

            <dependency>
              <groupId>org.jvnet.jaxb</groupId>
              <artifactId>jaxb-plugins</artifactId>
              <version>3.0.1</version>
            </dependency>

Everything is working as expected.

@laurentschoelens and @mattrpav - Big thank you for keeping this up!

from jaxb2-basics.

cachescrubber avatar cachescrubber commented on August 12, 2024 1

Okay, I misunderstood you regarding javax / jakarta. I updated my JavaEE branch (uising cxf 3.6.1) accordingly and It worked.

from jaxb2-basics.

laurentschoelens avatar laurentschoelens commented on August 12, 2024

Hi @cachescrubber : I've done PR #165 to migrate to jakarta namespace and take back all plugins mentionned here (since not working with jakarta)
Feel free to comment

from jaxb2-basics.

laurentschoelens avatar laurentschoelens commented on August 12, 2024

@cachescrubber PR merged
The repo is being merged into jaxb-tools main project (original maven-jaxb-plugin) to make jakarta migration available soon

from jaxb2-basics.

laurentschoelens avatar laurentschoelens commented on August 12, 2024

@cachescrubber
UPDATE of the issue : we decided, in order to provide jakarta versions of all artifacts, to merge all jaxb-related repositories in former maven-jaxb2-plugin repository, renamed as jaxb-tools. Everything still splitted (and as independant as it should be) and will stay splitted in maven artifacts.

README.md has been up-to-date in jaxb-tools.
After jakarta migration, we'll do some cleanup on "deprecated" repositories, adding mentions in README.md and releasing a latest version with maven relocation infos.

You can use the following to build with remaining plugins mentioned in this issue without depending on external resources.
Feel free to get back if any problems

<dependency>
    <groupId>org.jvnet.jaxb</groupId>
    <artifactId>jaxb2-basics-tools</artifactId>
    <version>2.0.4</version>
</dependency>

from jaxb2-basics.

cachescrubber avatar cachescrubber commented on August 12, 2024

Hi @laurentschoelens I just gave it a try.

This is where I come from:

        <plugin>
          <groupId>org.apache.cxf</groupId>
          <artifactId>cxf-codegen-plugin</artifactId>
          <executions>
            <execution>
              <id>generate-sources</id>
              <phase>generate-sources</phase>
              <configuration>
                <sourceRoot>${project.build.directory}/generated-sources/cxf</sourceRoot>
                <defaultOptions>
                  <extraargs>
                    <extraarg>-verbose</extraarg>
                    <extraarg>-xjc-Xcommons-lang</extraarg>
                    <extraarg>-xjc-Xfluent-api</extraarg>
                    <extraarg>-xjc-Xvalue-constructor</extraarg>
                    <extraarg>-xjc-Xdefault-value</extraarg>
                  </extraargs>
                </defaultOptions>
              </configuration>
              <goals>
                <goal>wsdl2java</goal>
              </goals>
            </execution>
          </executions>
          <dependencies>
            <dependency>
              <groupId>org.jvnet.jaxb2_commons</groupId>
              <artifactId>jaxb2-commons-lang</artifactId>
              <version>${jaxb2-commons-lang.version}</version>
            </dependency>
            <dependency>
              <groupId>org.jvnet.jaxb2_commons</groupId>
              <artifactId>jaxb2-fluent-api</artifactId>
              <version>${jaxb2-fluent-api.version}</version>
            </dependency>
            <dependency>
              <groupId>org.jvnet.jaxb2_commons</groupId>
              <artifactId>jaxb2-value-constructor</artifactId>
              <version>${jaxb2-value-constructor.version}</version>
            </dependency>
            <dependency>
              <groupId>org.jvnet.jaxb2_commons</groupId>
              <artifactId>jaxb2-default-value</artifactId>
              <version>${jaxb2-default-value.version}</version>
            </dependency>
          </dependencies>
        </plugin>

If I understand you correctly, I should replace the individual plugin dependencies using jaxb2-basics-tools.

    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.cxf</groupId>
          <artifactId>cxf-codegen-plugin</artifactId>
          <executions>
            <execution>
              <id>generate-sources</id>
              <phase>generate-sources</phase>
              <configuration>
                <sourceRoot>${project.build.directory}/generated-sources/cxf</sourceRoot>
                <defaultOptions>
                  <extraargs>
                    <extraarg>-verbose</extraarg>
                    <extraarg>-xjc-Xcommons-lang</extraarg>
                    <extraarg>-xjc-Xfluent-api</extraarg>
                    <extraarg>-xjc-Xvalue-constructor</extraarg>
                    <extraarg>-xjc-Xdefault-value</extraarg>
                  </extraargs>
                </defaultOptions>
              </configuration>
              <goals>
                <goal>wsdl2java</goal>
              </goals>
            </execution>
          </executions>
          <dependencies>
            <dependency>
              <groupId>org.jvnet.jaxb</groupId>
              <artifactId>jaxb2-basics-tools</artifactId>
              <version>2.0.4</version>
            </dependency>
          </dependencies>
        </plugin>

A plugin execution failed with the following error:

WARNING]       at org.apache.cxf.maven_plugin.wsdl2java.ForkOnceWSDL2Java.main(ForkOnceWSDL2Java.java:51)
[WARNING] Caused by: com.sun.tools.xjc.BadCommandLineException: unbekannter Parameter -Xcommons-lang
[WARNING]       at com.sun.tools.xjc.Options.parseArguments(Options.java:856)
[WARNING]       at org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:410)
[WARNING]       ... 8 more

Using jaxb2-basics instead of jaxb2-basics-tools it seems to find the plugins. Again, a plugin execution then failed with

[WARNING]       at org.apache.cxf.maven_plugin.wsdl2java.ForkOnceWSDL2Java.main(ForkOnceWSDL2Java.java:51)
[WARNING] Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException
[WARNING]       at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
[WARNING]       at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
[WARNING]       at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
[WARNING]       ... 23 more

            <dependency>
              <groupId>org.jvnet.jaxb</groupId>
              <artifactId>jaxb2-basics</artifactId>
              <version>2.0.4</version>
            </dependency>

from jaxb2-basics.

laurentschoelens avatar laurentschoelens commented on August 12, 2024

Yes, I always mismatch jaxb2-basics-tools with jaxb2-basics which is the good import.
But 2.0.4 is still based on javax namespace. Jakarta will be supported as 3.x and 4.x versions.

from jaxb2-basics.

laurentschoelens avatar laurentschoelens commented on August 12, 2024

Which version of cxf-plugin do you use ?

from jaxb2-basics.

cachescrubber avatar cachescrubber commented on August 12, 2024
    <!-- apache cxf codegen and xjb plugins -->
    <apache-cxf-codegen-plugin.version>4.0.2</apache-cxf-codegen-plugin.version>
    <apache-cxf-xjc-plugin.version>4.0.0</apache-cxf-xjc-plugin.version>

from jaxb2-basics.

laurentschoelens avatar laurentschoelens commented on August 12, 2024

Yes cxf 4.x is based on jakarta so I'm not surprised of the result.

from jaxb2-basics.

laurentschoelens avatar laurentschoelens commented on August 12, 2024

Jakarta is on it's way. Should come soon

from jaxb2-basics.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.