HHH-8076 Make javax.security and javax.validation optional

Currently the OSGi manifest creation via Gradle automatically imports all packages that are used by hibernate-core. Although this saves you from having to list all the imports manually, it does mean that some optional dependencies suddenly become mandatory dependencies. I've updated the hibernate-core Gradle build file to make the hibernate-core dependencies on javax.security and javax.validation optional. This way you are not forced to have these dependencies available in your OSGi container. More information in HHH-7941.
This commit is contained in:
timpeeters 2013-03-11 17:15:34 +01:00 committed by Brett Meyer
parent 79073a98f0
commit 0f9fae5121

View File

@ -41,7 +41,16 @@ jar {
manifest {
instruction 'Bundle-Description', 'Hibernate ORM Core'
instruction 'Bundle-SymbolicName', 'org.hibernate.core'
instruction 'Import-Package',
'javax.security.auth;resolution:=optional',
'javax.security.jacc;resolution:=optional',
'javax.validation;resolution:=optional',
'javax.validation.constraints;resolution:=optional',
'javax.validation.groups;resolution:=optional',
'javax.validation.metadata;resolution:=optional',
'*'
// TODO: Uncomment once EntityManagerFactoryBuilderImpl no longer
// uses ClassLoaderServiceImpl.
instruction 'Export-Package',