Skip to content

Commit

Permalink
Add support for Hibernate 6.6.0.Final
Browse files Browse the repository at this point in the history
Add missing reflection entries for
[Lorg.hibernate.event.spi.PostUpsertEventListener; and
org.hibernate.internal.log.ConnectionInfoLogger_$logger
to the Hibernate 6.5.0.Final metadata to create the
6.6.0.Final one.
  • Loading branch information
sdeleuze committed Aug 20, 2024
1 parent a64c861 commit 63ac2cc
Show file tree
Hide file tree
Showing 41 changed files with 2,901 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[
"reflect-config.json",
"resource-config.json"
]
1,037 changes: 1,037 additions & 0 deletions metadata/org.hibernate.orm/hibernate-core/6.6.0.Final/reflect-config.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"resources":{
"includes":[
{
"condition":{"typeReachable":"org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl"},
"pattern":"\\QMETA-INF/persistence.xml\\E"
},
{
"condition":{"typeReachable":"org.hibernate.internal.util.ConfigHelper"},
"pattern":"\\Qhibernate.properties\\E"
},
{
"condition":{"typeReachable":"org.hibernate.boot.jaxb.internal.stax.LocalSchemaLocator"},
"pattern":"\\Qorg/hibernate/hibernate-configuration-3.0.dtd\\E"
},
{
"condition":{"typeReachable":"org.hibernate.boot.jaxb.internal.stax.LocalSchemaLocator"},
"pattern":"\\Qorg/hibernate/hibernate-mapping-3.0.dtd\\E"
},
{
"condition":{"typeReachable":"org.hibernate.boot.xsd.LocalXsdResolver"},
"pattern":"\\Qorg/hibernate/jpa/persistence_2_0.xsd\\E"
},
{
"condition": {"typeReachable": "org.hibernate.boot.xsd.LocalXsdResolver"},
"pattern": "\\Qorg/hibernate/jpa/persistence_3_0.xsd\\E"
},
{
"condition": {"typeReachable": "org.hibernate.boot.xsd.LocalXsdResolver"},
"pattern": "\\Qorg/hibernate/jpa/persistence_3_1.xsd\\E"
}
]}
}
11 changes: 10 additions & 1 deletion metadata/org.hibernate.orm/hibernate-core/index.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
[
{
"latest": true,
"metadata-version": "6.6.0.Final",
"module": "org.hibernate.orm:hibernate-core",
"tested-versions": [
"6.6.0.Final"
]
},
{
"metadata-version": "6.5.0.Final",
"module": "org.hibernate.orm:hibernate-core",
"tested-versions": [
"6.5.0.Final"
"6.5.0.Final",
"6.5.1.Final",
"6.5.2.Final"
]
},
{
Expand Down
8 changes: 7 additions & 1 deletion tests/src/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,12 @@
"name" : "org.hibernate.orm:hibernate-core",
"versions" : [ "6.5.0.Final" ]
} ]
}, {
"test-project-path" : "org.hibernate.orm/hibernate-core/6.6.0.Final",
"libraries" : [ {
"name" : "org.hibernate.orm:hibernate-core",
"versions" : [ "6.6.0.Final" ]
} ]
}, {
"test-project-path" : "org.hibernate.orm/hibernate-envers/6.1.1.Final",
"libraries" : [ {
Expand Down Expand Up @@ -616,4 +622,4 @@
"name" : "samples:docker",
"versions" : [ "image-pull" ]
} ]
} ]
} ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
gradlew.bat
gradlew
gradle/
build/
generated-metadata/
10 changes: 10 additions & 0 deletions tests/src/org.hibernate.orm/hibernate-core/6.6.0.Final/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

# Hibernate ORM

The metadata has been generated by executing the following script:

```bash
./generate-metadata.sh
```

The generated metadata can be found in the `generated-metadata` directory.
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/*
* Copyright and related rights waived via CC0
*
* You should have received a copy of the CC0 legalcode along with this
* work. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
*/

plugins {
id "org.graalvm.internal.tck"
}

String libraryVersion = tck.testedLibraryVersion.get()

dependencies {
testImplementation "org.hibernate.orm:hibernate-core:$libraryVersion"
testImplementation 'org.assertj:assertj-core:3.22.0'
testImplementation 'com.h2database:h2:2.1.214'
testImplementation 'jakarta.validation:jakarta.validation-api:3.0.2'
testImplementation 'org.postgresql:postgresql:42.6.0'
testImplementation 'com.oracle.database.jdbc:ojdbc11:21.9.0.0'
testImplementation 'org.jboss.logging:jboss-logging:3.5.0.Final'

testImplementation 'ch.qos.logback:logback-classic:1.4.5'
testCompileOnly("net.bytebuddy:byte-buddy:1.12.10")
testCompileOnly("org.graalvm.nativeimage:graal-hotspot-library:22.0.0")
}

task updateGeneratedMetadata {
doLast {
final ant = new groovy.ant.AntBuilder()
final metadataDir = project.projectDir.toString() + "/generated-metadata"

// replace typeReachable value for entries generated by IdentifierGeneratorTest test class
ant.replace(file: metadataDir + "/reflect-config.json",
token: "org_hibernate_orm.hibernate_core.IdentifierGeneratorTest",
value: "org.hibernate.id.factory.internal.StandardIdentifierGeneratorFactory")
}
}

task deleteGeneratedMetadata(type: Delete) {
delete files(project.projectDir.toString() + "/generated-metadata")
}

graalvmNative {
agent {
defaultMode = "conditional"
modes {
conditional {
userCodeFilterPath = "metadata-conditions-filter.json"
extraFilterPath = "metadata-extra-filter.json"
}
}
metadataCopy {
inputTaskNames.add("test")
outputDirectories.add("generated-metadata")
mergeWithExisting = true
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash

./gradlew deleteGeneratedMetadata
./gradlew test --tests "org_hibernate_orm.hibernate_core.H2DialectHibernateTest" -Pagent metadataCopy
./gradlew test --tests "org_hibernate_orm.hibernate_core.MariaDBDialectHibernateTest" -Pagent metadataCopy
./gradlew test --tests "org_hibernate_orm.hibernate_core.MSSQLDialectHibernateTest" -Pagent metadataCopy
./gradlew test --tests "org_hibernate_orm.hibernate_core.MySQLDialectHibernateTest" -Pagent metadataCopy
./gradlew test --tests "org_hibernate_orm.hibernate_core.OracleDialectHibernateTest" -Pagent metadataCopy
./gradlew test --tests "org_hibernate_orm.hibernate_core.PostgresDialectHibernateTest" -Pagent metadataCopy
./gradlew test --tests "org_hibernate_orm.hibernate_core.HibernateDialectTest" -Pagent metadataCopy
./gradlew test --tests "org_hibernate_orm.hibernate_core.LoggerTest" -Pagent metadataCopy
./gradlew test --tests "org_hibernate_orm.hibernate_core.IdentifierGeneratorTest" -Pagent metadataCopy
./gradlew test --tests "org_hibernate_orm.hibernate_core.OptimizerTest" -Pagent metadataCopy
./gradlew test --tests "org_hibernate_orm.hibernate_core.EntityManagerTest" -Pagent metadataCopy
./gradlew updateGeneratedMetadata
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
library.version = 6.6.0.Final
metadata.dir = org.hibernate.orm/hibernate-core/6.6.0.Final/
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 63ac2cc

Please sign in to comment.