Comments (11)
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.
Okay, I misunderstood you regarding javax / jakarta. I updated my JavaEE branch (uising cxf 3.6.1) accordingly and It worked.
from jaxb2-basics.
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.
@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.
@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.
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.
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.
Which version of cxf-plugin do you use ?
from jaxb2-basics.
<!-- 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.
Yes cxf 4.x is based on jakarta
so I'm not surprised of the result.
from jaxb2-basics.
Jakarta is on it's way. Should come soon
from jaxb2-basics.
Related Issues (20)
- Update build to use maven release plugin
- Reverting jakarta initial changes HOT 1
- Update to latests jaxb v2.x
- Update to JUnit 4.13.2
- Upgrade to commons-io 2.11.0
- Update to JDK 1.8 minimum for source and target
- Add support for building with JDK 9+
- Update maven scm for release automation
- Bump version to 0.13.0-SNAPSHOT
- Fix maven-deploy-plugin / oss-staging-plugin fighting each other
- Update version to 2.3.6-SNAPSHOT
- Migrate to jakarta.oss.sonatype.org HOT 1
- Bump commons-beanutils HOT 10
- Jakarta classes support for jaxb2-basics HOT 20
- Simplifying element (rather than type) results in 'Unable to honor this as-element-property customization. It is attached to a wrong place, or its inconsistent with other bindings.'. HOT 1
- Possibilty to find a fix for fixedValues in ComplexType restriction
- Prepare migration to jakarta HOT 1
- Is the latest release published on Maven Repository? HOT 6
- Other xjc plugins repository - maybe useful source code
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jaxb2-basics.