Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

hibernate mapping file..

 
Ronan Dowd
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I'm using Hibernate 3, Spring 2.5.1 and Maven 2.0.8 and was wondering if from one of my hibernate mapping files (.hbm.xml) whether I can reference the "version" element which is defined in my pom.xml

Note: I use hibernate to create my database tables. I have a table called PROJECTVERSION with a string column called "version" in it.
In ProjectVersion.hbm.xml file I have (extract shown below):

<property name="version">
<column name="VERSION" length="10" default="${pom.version.value}"/>
</property>

Is there a way i can do something like the above?
Thanks, Ro.
 
Angel Taveras
Ranch Hand
Posts: 84
Eclipse IDE Hibernate Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This it's a question from maven actually but i got the idea . What you have to do it's to enable filtering in maven for that file only. You can find it here. There you look for the heading How do I filter resource files?

I hope this could help,
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic