0

I saw an article which suggested me to use--- Only by setting the default JAXB provider to be the glassfish implementation by setting the system property: jakarta.xml.bind.JAXBContextFactory=org.glassfish.jaxb.runtime.v2.ContextFactory CXF will work in this setting.

How do I set this property?

I tried using

         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>3.0.0-M5</version>
            <configuration>
                <systemPropertyVariables>
                    <jakarta.xml.bind.JAXBContextFactory>org.glassfish.jaxb.runtime.v2.ContextFactory</jakarta.xml.bind.JAXBContextFactory>
                </systemPropertyVariables>
            </configuration>
        </plugin>

but this did not work.

4
  • where to add the maven tag Commented Jun 7, 2024 at 18:18
  • 1
    Can you get this to work outside of Maven? In other words, can you start GlassFish from the commandline, and tell it to use CXF? Because if you can, then you'll know what to look for in Maven's output, to see if that plugin sets the -D parameter correctly. Commented Jun 7, 2024 at 18:36
  • 2
    "I tried using" "but this did not work." it is not much information for us to go with since a plugin element can be added in different sections of a POM file. So showing how your pom file is defined would help. Commented Jun 7, 2024 at 19:04
  • Why do you use old versions of plugins... Upgrade to most recent versions: maven.apache.org/plugins Also without the full pom file it's hard to even guess what can be wrong? Commented Jun 7, 2024 at 22:08

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.