sorry not adding "code" so can't find them in my last post
1. Original snippet
<folder name="hbm"> <fileset dir="/fqportal/src" includes="**/*.hbm.xml" inWorkspace="true"> <properties></properties> </fileset> <properties></properties> </folder>
2. Added exclude element,
<folder name="hbm"> <fileset dir="/fqportal/src" includes="**/*.hbm.xml" excludes="**/com" inWorkspace="true"> <properties></properties> </fileset> <properties></properties> </folder>
1) looks like a bug - put it in jira
2) if you want your hbm.xml to be in one dir why don't you just have that in your source too ?
1. Entered in JIRA, http://jira.jboss.com/jira/browse/JBIDE-943
2. hbm files do exist with source code, but due to mapping purpose, I have to move them in the same folder in deploying so Spring can locate them. See below for my hbm configuration.
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> <property name="mappingDirectoryLocations"> <list><value>/WEB-INF/hbm</value></list> </property> </bean>
Is there any way letting hbm files in its orignial source folder?
I don't know spring enough to know how it scans.
but you can always just list the needed mappings explicitly.
I have over hundreds hbm files so it would be tedious putting explicit location for them one by one:-)
so you are looking for a "copy but do not preserve directory structure" option ? not sure if that is viable.
Any reason why you don't put this in a hbm/ directory somewhere instead of spreading them around when you don't seem to use that spread anyway.
That is a different story. All hbm files are generated by Hibernate Tools with corresponding POJOs. So they are spread around POJO code rather than in a fixed hbm folder. It is easy for developer to locate POJO-HBM pair.