我们有一个称为网络申请1的项目,依靠另一个称为核心申请的杰尔档案,这个档案由另一个小组作为共享图书馆提供,但在这个核心申请.jar(在杰尔一侧)中,有一只藏书,内容如下。
<hibernate-configuration>
<session-factory>
<property name="dialect">${hibernate.dialect}</property>
<property name="query.substitutions"><![CDATA[false N , true Y ]]></property>
<property name="show_sql">false</property>
<property name="format_sql">false</property>
<property name="use_sql_comments">false</property>
<property name="generate_statistics">true</property>
<property name="hibernate.connection.release_mode">after_transaction</property>
<!-- Search Configurations -->
<property name="hibernate.search.default.directory_provider">org.hibernate.search.store.FSDirectoryProvider</property>
<property name="hibernate.search.default.indexBase">${lucene.index.home}</property>
<property name="hibernate.search.default.batch.merge_factor">10</property>
<property name="hibernate.search.default.batch.max_buffered_docs">10</property>
</session-factory>
</hibernate-configuration>
As we see in the Search Configurations section, there is a variable ${lucene.index.home} that should be replaced by other projects on different OS platform,
so the question, does maven provide a way to filter a dependency jar file and filter the content? any plugins ? war:war , unzip ? dependencies ? I couldn t figure a fast way to do that. it looks to me , no matter what plugin would be adopted, the plugin needs to do 4 things basically.
- 1 unpack the jar in process-resources phase.
- 2 substitute the ${var} with value defined in profile.
- 3 pack it again back into a jar.
- 4 need to copy it back from the packing/unpacking workspace back to the maven process path ??
以前,任何人都符合这一类似要求。
感谢