Picking up unwanted mapping files
Status: Beta
Brought to you by:
dbradby
Hibernator is picking up the mapping files from the
source and build directories in my project, which causes
a duplicate import exception during connect.
Two solutions that might work are:
- Allow the connection definition to specify which
mappings to use (which dir to scan?).
- Only take the mapping files from the build dir as it
must use the classes from that dir anyway to do it's
selects.
Logged In: YES
user_id=389579
I suppose I could use the selection mechanism like when you
import files into an Eclipse project. There you can select
subdirs and even down to the file level.
As for the second solution, I am specifically ignoring files in
the output location of the selected projects because either
people have mapping files in their source path (which
duplicates them into the output location) or they are in some
outside directory. I wanted to pick up both of these cases so
scan everything except the output location
Logged In: YES
user_id=7933
The trouble is that you can have multiple output locations
with Eclipse, depending on what your doing.
In this specific case, I also have a webapp output that will
also have a copy of the files.
Anyway, some way to limit the dirs that it search would be
just fine I think.
FYI - I'm using Apache Maven with eclipse and hibernate.