Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use XMLBeans' BindingConfigImpl in Axis2BindingConfig instead of XSDConfig, +doc. #589

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

std-h
Copy link

@std-h std-h commented Feb 12, 2024

As discussed on the -user mailing list, here is my proposal to use XMLBeans' own implementation of the .xsdconfig file. Changes are mostly to Axis2BindingConfig, which now keeps a BindingConfigImpl instance created from the given .xsdconfig file.

I have not been able to test this though! While I could patch version 1.7.9 with essentially the same changes, I can't get the code in master to compile. When I disabled one module with a compilation error, another missing resource or test error showed up, and I gave up.

@veithen
Copy link
Member

veithen commented Feb 17, 2024

I can't get the code in master to compile.

Can you rebase onto the current HEAD?

@std-h std-h force-pushed the xmlbeans-xsdconfig-proposal branch from 7868dee to 1268640 Compare February 17, 2024 19:56
@std-h
Copy link
Author

std-h commented Feb 17, 2024

Sure, but it didn't seem to improve the situation. Some errors I got:

  • mvn clean compile, in 'Transport - testkit': [ERROR] Failed to parse plugin descriptor for org.apache.axis2:axis2-repo-maven-plugin:1.8.3-SNAPSHOT (.../axis-axis2-java-core/modules/tool/axis2-repo-maven-plugin/target/classes): No plugin descriptor found at META-INF/maven/plugin.xml -> [Help 1]
  • If I disable modules/transport/testkit in the POM I get the same error for the metadata module.
  • mvn site crashes immediately at 'Root': [ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.12.1:site (default-site) on project axis2: SiteToolException: The site descriptor cannot be resolved from the repository: ArtifactResolutionException: Unable to locate site descriptor: Could not transfer artifact org.apache:apache:xml:site_en:31 from/to eclipse_4_30 (http://download.eclipse.org/eclipse/updates/4.30/R-4.30-202312010110): Cannot access http://download.eclipse.org/eclipse/updates/4.30/R-4.30-202312010110 with type p2 using the available connector factories: BasicRepositoryConnectorFactory

Are there some obvious build instructions I'm maybe missing?

@veithen
Copy link
Member

veithen commented Feb 18, 2024

Are there some obvious build instructions I'm maybe missing?

As mentioned in the README file, use mvn clean install. mvn clean compile fails because the package phase isn't executed.

@std-h
Copy link
Author

std-h commented Feb 18, 2024

Not reading the README, typical. 😑 Sorry about that. Next set of errors:

  • A failed test:

[ERROR] org.apache.axis2.databinding.utils.ConverterUtilTest.testCompareBigIntegerValueIsGreaterThanOrEqualToTotalDigitsFacetRestriction -- Time elapsed: 0.011 s <<< FAILURE!
java.lang.AssertionError:
Expecting actual:
-9000L
to be greater than or equal to:
0L

Not sure what's going here, the CI build doesn't seem to have this problem. I commented out this test and then got:

  • In the AAR Maven Plugin:

[ERROR] Failed to execute goal com.github.veithen.maven:resolver-proxy-maven-plugin:0.5.0:start (default) on project axis2-repo-maven-plugin: Execution default of goal com.github.veithen.maven:resolver-proxy-maven-plugin:0.5.0:start failed: Unable to load the mojo 'start' in the plugin 'com.github.veithen.maven:resolver-proxy-maven-plugin:0.5.0' due to an API incompatibility: org.codehaus.plexus.component.repository.exception.ComponentLookupException: com/github/veithen/maven/resolver/proxy/StartMojo has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0

This looks like I may be running a too old Java version (11). That turned out to be the case, trying again with Java 17 it works. Perhaps the maven-enforcer-plugin configuration in the main POM should be updated?

  • Then, finally, an error of my own making. 🙂 It's the one CI indicated with java.nio.file.Path.of(String, String[]) not being available. Don't know why Eclipse didn't indicate the error, but I replaced it with something that does work in Java 1.8. Commit upcoming.

  • mvn site still fails with the same error. If i run with the '-e' switch, I see as the innermost exception:

Caused by: org.eclipse.aether.transfer.NoRepositoryLayoutException: Unsupported repository layout p2

@std-h std-h force-pushed the xmlbeans-xsdconfig-proposal branch from 1268640 to b96efd4 Compare February 18, 2024 19:28
@std-h
Copy link
Author

std-h commented Feb 18, 2024

About the documentation... I noticed (and rebased onto) the commit removing the Eclipse repository. That's better, but:

  • mvn site now gets about halfway, before it crashes on 'Javadoc' with multiple errors about AccessController in java.security being deprecated, packages like package org.omg.CORBA not existing and symbols not being found. I disabled the apidocs module in the main POM and moved on.
  • More importantly for this pull request, the pages for the wsdl2code plugin are not being created and/or linked from the main site, the map target/site/tools/maven-plugins/axis2-wsdl2code-maven-plugin/ does not exist. I'm really not familiar with the way site creation works. But I noticed that on the Axis2 website https://axis.apache.org/axis2/java/core/tools/maven-plugins/axis2-wsdl2code-maven-plugin/wsdl2code-mojo.html indicates an old version (1.7.9). Perhaps related to this problem?

@std-h std-h force-pushed the xmlbeans-xsdconfig-proposal branch from b96efd4 to a8358f4 Compare February 20, 2024 21:18
@std-h
Copy link
Author

std-h commented Feb 20, 2024

So I actually tested my code now, and I found a silly mistake. Could have known it, it was in the only code that's different from my 1.7.9 patch... Fixed by new commit.

How hard would it be to write a test case? If it's not too much effort I'd like to make one, but I have no idea in which module and how.

@std-h
Copy link
Author

std-h commented Mar 8, 2024

Can someone give me a hint about mvn site generation? If that works I can check if my changes look good, and set this PR as ready for review.

@std-h std-h force-pushed the xmlbeans-xsdconfig-proposal branch from a8358f4 to d002117 Compare April 11, 2024 21:42
@std-h
Copy link
Author

std-h commented Apr 11, 2024

I managed to generate generate-sources-mojo.html, seems OK. Trouble with site generation is reported at https://issues.apache.org/jira/browse/AXIS2-6066. So I think it's ready for review.

@std-h std-h marked this pull request as ready for review April 11, 2024 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants