Skip to content

Commit

Permalink
Added metadata for org.hibernate:hibernate-core:5.6.14.Final (#247)
Browse files Browse the repository at this point in the history
  • Loading branch information
msupic authored Mar 22, 2023
1 parent 4370e07 commit 78d5de2
Show file tree
Hide file tree
Showing 34 changed files with 2,522 additions and 0 deletions.
4 changes: 4 additions & 0 deletions metadata/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@
"directory": "org.glassfish.jaxb/jaxb-runtime",
"module": "org.glassfish.jaxb:jaxb-runtime"
},
{
"directory" : "org.hibernate/hibernate-core",
"module" : "org.hibernate:hibernate-core"
},
{
"directory": "org.thymeleaf/thymeleaf",
"module": "org.thymeleaf:thymeleaf"
Expand Down
4 changes: 4 additions & 0 deletions metadata/org.hibernate/hibernate-core/5.6.14.Final/index.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[
"reflect-config.json",
"resource-config.json"
]
1,232 changes: 1,232 additions & 0 deletions metadata/org.hibernate/hibernate-core/5.6.14.Final/reflect-config.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"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.LocalXmlResourceResolver$DtdMapping"},
"pattern":"\\Qorg/hibernate/hibernate-configuration-3.0.dtd\\E"
},
{
"condition":{"typeReachable":"org.hibernate.boot.jaxb.internal.stax.LocalXmlResourceResolver$DtdMapping"},
"pattern":"\\Qorg/hibernate/hibernate-mapping-3.0.dtd\\E"
},
{
"condition":{"typeReachable":"org.hibernate.boot.jaxb.internal.stax.LocalXmlResourceResolver$NamespaceSchemaMapping"},
"pattern":"\\Qorg/hibernate/hibernate-mapping-4.0.xsd\\E"
},
{
"condition":{"typeReachable":"org.hibernate.boot.jaxb.internal.stax.LocalXmlResourceResolver$NamespaceSchemaMapping"},
"pattern":"\\Qorg/hibernate/jpa/orm_2_0.xsd\\E"
},
{
"condition":{"typeReachable":"org.hibernate.boot.jaxb.internal.stax.LocalXmlResourceResolver$NamespaceSchemaMapping"},
"pattern":"\\Qorg/hibernate/jpa/orm_2_1.xsd\\E"
},
{
"condition":{"typeReachable":"org.hibernate.boot.jaxb.internal.stax.LocalXmlResourceResolver$NamespaceSchemaMapping"},
"pattern":"\\Qorg/hibernate/jpa/orm_2_2.xsd\\E"
},
{
"condition":{"typeReachable":"org.hibernate.boot.jaxb.internal.stax.LocalXmlResourceResolver$NamespaceSchemaMapping"},
"pattern":"\\Qorg/hibernate/jpa/orm_3_0.xsd\\E"
},
{
"condition":{"typeReachable":"org.hibernate.boot.xsd.LocalXsdResolver"},
"pattern":"\\Qorg/hibernate/jpa/persistence_2_0.xsd\\E"
},
{
"condition":{"typeReachable":"org.hibernate.boot.jaxb.internal.stax.LocalXmlResourceResolver$NamespaceSchemaMapping"},
"pattern":"\\Qorg/hibernate/xsd/cfg/legacy-configuration-4.0.xsd\\E"
},
{
"condition":{"typeReachable":"org.hibernate.boot.jaxb.internal.stax.LocalXmlResourceResolver$NamespaceSchemaMapping"},
"pattern":"\\Qorg/hibernate/xsd/mapping/legacy-mapping-4.0.xsd\\E"
}
]}
}
10 changes: 10 additions & 0 deletions metadata/org.hibernate/hibernate-core/index.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[
{
"latest": true,
"metadata-version": "5.6.14.Final",
"module": "org.hibernate:hibernate-core",
"tested-versions": [
"5.6.14.Final"
]
}
]
11 changes: 11 additions & 0 deletions tests/src/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,17 @@
}
]
},
{
"test-project-path" : "org.hibernate/hibernate-core/5.6.14.Final",
"libraries" : [
{
"name" : "org.hibernate:hibernate-core",
"versions" : [
"5.6.14.Final"
]
}
]
},
{
"test-project-path": "org.thymeleaf/thymeleaf/3.1.0.M2",
"libraries": [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
gradlew.bat
gradlew
gradle/
build/
generated-metadata/
.run/
10 changes: 10 additions & 0 deletions tests/src/org.hibernate/hibernate-core/5.6.14.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.
58 changes: 58 additions & 0 deletions tests/src/org.hibernate/hibernate-core/5.6.14.Final/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/*
* 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:hibernate-core:$libraryVersion"
testImplementation 'org.assertj:assertj-core:3.22.0'
testImplementation 'com.h2database:h2:2.1.214'
testImplementation 'javax.validation:validation-api:2.0.1.Final'
testImplementation 'ch.qos.logback:logback-classic:1.4.5'
}

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

// replace typeReachable value for entries generated by AdditionalMetadataTest test class
ant.replace(file: metadataDir + "/reflect-config.json",
token: "org_hibernate.hibernate_core.AdditionalMetadataTest",
value: "org.hibernate.jpa.HibernatePersistenceProvider")

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

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,14 @@
#!/usr/bin/env bash

./gradlew deleteGeneratedMetadata
./gradlew test --tests "org_hibernate.hibernate_core.H2DialectHibernateTest" -Pagent metadataCopy
./gradlew test --tests "org_hibernate.hibernate_core.MariaDBDialectHibernateTest" -Pagent metadataCopy
./gradlew test --tests "org_hibernate.hibernate_core.MSSQLDialectHibernateTest" -Pagent metadataCopy
./gradlew test --tests "org_hibernate.hibernate_core.MySQLDialectHibernateTest" -Pagent metadataCopy
./gradlew test --tests "org_hibernate.hibernate_core.OracleDialectHibernateTest" -Pagent metadataCopy
./gradlew test --tests "org_hibernate.hibernate_core.PostgresDialectHibernateTest" -Pagent metadataCopy
./gradlew test --tests "org_hibernate.hibernate_core.HibernateDialectTest" -Pagent metadataCopy
./gradlew test --tests "org_hibernate.hibernate_core.AdditionalMetadataTest" -Pagent metadataCopy
./gradlew test --tests "org_hibernate.hibernate_core.IdentifierGeneratorTest" -Pagent metadataCopy
./gradlew test --tests "org_hibernate.hibernate_core.OptimizerTest" -Pagent metadataCopy
./gradlew updateGeneratedMetadata
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
library.version = 5.6.14.Final
metadata.dir = org.hibernate/hibernate-core/5.6.14.Final/
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"rules": [
{"includeClasses": "org.hibernate.**"},
{"includeClasses": "org_hibernate.hibernate_core.AdditionalMetadataTest"},
{"includeClasses": "org_hibernate.hibernate_core.IdentifierGeneratorTest"}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"rules": [
{"excludeClasses": "**"},
{"includeClasses": "org.hibernate.**"},
{"includeClasses": "[Lorg.hibernate.**"},
{"includeClasses": "antlr.CommonToken"},
{"includeClasses": "org_hibernate.hibernate_core.AdditionalMetadataTest"},
{"includeClasses": "org_hibernate.hibernate_core.IdentifierGeneratorTest"}
],
"regexRules": [
{"excludeClasses": "org.hibernate.internal.CoreMessageLogger_\\$logger_en.*"},
{"excludeClasses": "org.hibernate.annotations.common.util.impl.Log_\\$logger_en.*"},
{"excludeClasses": "org.hibernate.bytecode.enhance.spi.interceptor.BytecodeInterceptorLogging_\\$logger_en.*"},
{"excludeClasses": "org.hibernate.internal.EntityManagerMessageLogger_\\$logger_en.*"},
{"excludeClasses": "org.hibernate.internal.log.ConnectionAccessLogger_\\$logger_en.*"},
{"excludeClasses": "org.hibernate.internal.log.ConnectionPoolingLogger_\\$logger_en.*"}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
pluginManagement {
def tckPath = Objects.requireNonNullElse(
System.getenv("GVM_TCK_TCKDIR"),
"../../../../tck-build-logic"
)
includeBuild(tckPath)
}

plugins {
id "org.graalvm.internal.tck-settings" version "1.0.0-SNAPSHOT"
}

rootProject.name = 'org.hibernate.hibernate-core_tests'
Loading

0 comments on commit 78d5de2

Please sign in to comment.