Intellij + JRebel + Ant Project build
We are using JRebel with Intellij and working on an Ant-based project with a complicated build structure. The Ant task that builds the WAR file does a <filter> command to replace configuration file elements with properties pulled from a properties file.
<copy todir="target/webapp" preservelastmodified="true">
<fileset dir="webapp" includes="**/*.xml" />
<filterset>
<filter token="MY-VALUE" value="${my.property.value}"/>
</filterset>
It works fine when run from command line. But inside Intellij IDEA, the "Rebuild" or "Make" commands don't know anything about the Ant file filtering so when Intellij rebuilds the WAR, I wind up with configuration files that have embedded placeholders in them instead of the correct values.
So instead of this:
<display-name>My Web Site (Version 1.2.3.4)</display-name>
we get
<display-name>My Web Site (@FULL-BUILD-NUMBER@)</display-name>
Does anyone have any advice on getting the Intellij/JRebel combination to work with this Ant build under these conditions?
请先登录再写评论。
Artifacts have Pre-processing settings where you can specify Ant task that will do the replacement. You can also configure artifact so that it's built using the properties files processed by Ant.