[hibernate-dev] Discovering/configuring package-info

Steve Ebersole steve at hibernate.org
Fri Mar 22 09:18:09 EDT 2013


I can make that change.  If only there were a way to make sure further 
changes down the road did not cause this to regress...  Any ideas? ;)

On 03/22/2013 03:17 AM, Christian Bauer wrote:
> Testing the latest scanner changes. Still trying to configure an explicit persistence unit, where only the listed annotated classes (and listed package-info) are included, everything else should be ignored.
>
> The PackageInfoArchiveEntryHandler will always add package names to DeploymentResources if there is a package-info.java file in ANY scanned package.
>
> This leads to problems further down in second pass, when trying to bind for example a @FetchProfiles annotation found in a package-info will fail as the referenced persistent class can't be found.
>
> The solution seems to be to ignore the archive entry in PackageInfoArchiveEntryHandler when ScanOptions#detectClasses is false. If I don't want annotated classes to be detected, I probably don't want annotated package-info as well.
>
>
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev



More information about the hibernate-dev mailing list