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

HHH-13043 + HHH-13116 Upgrade to JAXB 2.3 #2658

Closed
wants to merge 1 commit into from

Conversation

yrodiere
Copy link
Member

@yrodiere yrodiere commented Nov 23, 2018

https://hibernate.atlassian.net//browse/HHH-13043
https://hibernate.atlassian.net//browse/HHH-13116

I gave up on doing the upgrade for OSGi; it's just too early for that. We don't really have any code that is specific to JAXB 2.3, so tests work fine in karaf, which uses JAXB 2.2 in the classpath. I guess that's good enough for now?

The most important thing is that Maven users will finally be able to use ORM in a JDK11 environment, i.e. HHH-13116 will be fixed.

How to reproduce HHH-13116 and check that it's fixed

Due to the need to use Maven to reproduce HHH-13116, I didn't even try to add a reproducer in ORM itself. If you want to check that it is indeed fixed:

  • Clone this PR, go to the corresponding directory
  • Publish 5.4.0-SNAPSHOT locally:
    ./gradlew clean publishToMavenLocal -x test
    
  • Clone the reproducer from the Hibernate Search repo (it's just a branch with all the necessary commits to upgrade to ORM 5.4 and make Search compatible with JDK11):
    cd $(mktemp -d)
    git clone --depth 50 --no-single-branch https://github.com/yrodiere/hibernate-search.git
    cd hibernate-search
    git checkout --track origin/HHH-13116-reproducer
    
  • Build the reproducer:
    mvn clean install -DskipTests -pl :hibernate-search-orm -am
    
  • Define the path to your JDK11 home:
    export my_java_home=/path/to/jdk11
    
  • Execute the test, showing something doesn't work (this will use ORM 5.4.0.CR1):
    JAVA_HOME=$my_java_home PATH=$my_java_home/bin:$PATH  mvn clean install -pl :hibernate-search-orm -Dtest='SearchAndEnversIntegrationTest'
    
  • Upgrade to ORM 5.4.0-SNAPSHOT to benefit from the JAXB upgrade:
    git checkout --track origin/HHH-13116-reproducer-fixed
    
  • Launch the test that used to fail:
    JAVA_HOME=$my_java_home PATH=$my_java_home/bin:$PATH  mvn clean install -pl :hibernate-search-orm -Dtest='SearchAndEnversIntegrationTest'
    

@yrodiere yrodiere changed the title HHH-13043 Upgrade to JAXB 2.3 HHH-13043 + [HHH-13116 Upgrade to JAXB 2.3 Nov 23, 2018
@yrodiere yrodiere changed the title HHH-13043 + [HHH-13116 Upgrade to JAXB 2.3 HHH-13043 + HHH-13116 Upgrade to JAXB 2.3 Nov 23, 2018
... which has a correctly formatted POM, and doesn't wreak havoc in
projects depending on us and using Maven + JDK11.
@gsmet
Copy link
Member

gsmet commented Nov 23, 2018

Merged, thanks. Good catch.

@gsmet gsmet closed this Nov 23, 2018
@yrodiere yrodiere deleted the HHH-13043 branch June 26, 2019 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants