i think i understand your problem. let me rephrase to see if i understood correct:
in the whole jbpm sources, we only want 1 source version of all the configuration files so
that we don't have to search and update 20 different configuration files if a cfg
property needs to be updated or added.
so now you want a different configuration.
here's my current approach. let me know if you see a better way.
i take the basic configuration file that is used for the unit tests as a starting point.
Each time when i need a different configuration, i create a copy and apply modifications
of certain parts in that file.
Several modifications techniques can be used.
Plain replace:
<replace dir="${tmp.dir}">
| <includesfile name="**/*.hbm.xml"/>
|
<replacetoken><![CDATA[type="string_max"]]></replacetoken>
| <replacevalue><![CDATA[]]></replacevalue>
| </replace>
|
Or update the comments. In that case you put a commented section in the original file
like this
<!-- CMT transaction properties (begin) ===
| <property
name="hibernate.transaction.factory_class">org.hibernate.transaction.CMTTransactionFactory</property>
| <property
name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
| ==== CMT transaction properties (end) -->
|
so then you can use search and replace for the begin and end markers and replace the ====
pieces with the matching end of the comment. That way the commented section will be
uncommented.
Most of the configurations that have to do with db properties can be specified from a
.properties file rather then from inline in the properties in the hibernate.cfg.xml. In
that case you can use any of the above 2 techniques to update the jbpm.cfg.xml and then
add a reference to a properties file that is in cvs. then you can easily have a separate
.properties configuration file instead of having your properties in the build script.
hope this helps.
let me know if something is not clear or needs improvement.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3978992#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...