[
http://opensource.atlassian.com/projects/hibernate/browse/EJB-232?page=all ]
Emmanuel Bernard resolved EJB-232:
----------------------------------
Resolution: Fixed
Better documentation for <jar-file> and scanning outside of PU
root
-------------------------------------------------------------------
Key: EJB-232
URL:
http://opensource.atlassian.com/projects/hibernate/browse/EJB-232
Project: Hibernate Entity Manager
Type: Improvement
Components: Documentation
Reporter: Christian Bauer
Priority: Minor
Fix For: 3.2.1
> > I'm trying to solve a problem that people will face as soon as they
> > do unit testing. Given the following directories with classes:
> >
> > - build/classes/MyModel.class @Entity
> > - build/testclasses/META-INF/persistence.xml
> >
> > This doesn't work because the PU root is build/testclasses, and
> > there are no entities there. I've tried to use <jar-file>file://
> > build/classes</jar-file> to point the scanner to that directory,
> > but it doesn't work either. Apparently it has to be a JAR file.
> >
> > Maybe we should introduce a syntax or fallback for <jar-file> to
> > scan a directory. I see no other way how I could split my entity
> > build path from the test configuration build path. It's almost
> > impossible to find a project layout in an IDE where you could get
> > both together and not run into all kinds of issues.
>
> Oh, it works. I had a slash too many in my URL. Maybe we should add
> this to the documentation:
>
>
<jar-file>file:/home/turin/work/local/lab8/build/classes</jar-file>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira