My M4 file looks like the one described below
test.xml.m4
ifelse(CONF_ENABLE_HTML_VALIDATION,true,
<filter>
<filter-name>JTidyFilter</filter-name>
<init-param>
<param-name>properties.filename</param-name>
<param-value>WMJTidyServlet.properties</param-value>
</init-param>
</filter>
,
<filter>
<filter-name>JXYZFilter</filter-name>
<init-param>
<param-name>properties.filename</param-name>
<param-value>WMXYZServlet.properties</param-value>
</init-param>
</filter>
)
if CONF_ENABLE_HTML_VALIDATION is true the output is test.xml
<filter>
<filter-name>JTidyFilter</filter-name>
<init-param>
<param-name>properties.filename</param-name>
<param-value>WMJTidyServlet.properties</param-value>
</init-param>
</filter>
if CONF_ENABLE_HTML_VALIDATION is false the output is test.xml
<filter>
<filter-name>JXYZFilter</filter-name>
<init-param>
<param-name>properties.filename</param-name>
<param-value>WMXYZServlet.properties</param-value>
</init-param>
</filter>
So I have 1000 files like these and based on the variable my generated file
will be different on differnt machines?
How do I achieve this in maven?
Regards,
Nagesh
Wayne Fay wrote:
>
> Profiles + Filtering makes results comparable to what you're doing
> with the M4 files.
>
> Wayne
>
> On 7/2/07, nash4403 <[EMAIL PROTECTED]> wrote:
>>
>> Thanks Steve.
>> But the other question is we have couple of M4 files.
>> The use of M4 is to have variable substitution.When we run make the m4
>> file
>> is executed and generates a file based on whether on ssl or non-ssl
>> server.
>>
>> Does Maven have anything to replace my M4s
>>
>> Regards,
>> Nagesh
>>
>>
>>
>>
>>
>> Steven Rowe wrote:
>> >
>> > Hi Nagesh,
>> >
>> > Here are some places to start:
>> >
>> >
>> http://maven.apache.org/guides/introduction/introduction-to-profiles.html
>> >
>> > http://www.sonatype.com/book/profiles.html
>> >
>> > Steve
>> >
>> > nash4403 wrote:
>> >> We have different environments like DEV,QA,STAGE and PRODUCTION.
>> >> We have m4 files which generate the content based on different
>> variables.
>> >> So the m4 files get the input from config file .
>> >> We have perl scripts to generate the variables to be used by M4 files
>> to
>> >> generate the config files for different environments?.
>> >>
>> >> How can MAVEN help me to maintain different environments and different
>> >> applications?
>> >> Any examples on the net on how maven can help manage different
>> >> environments?
>> >>
>> >> Nagesh
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/To-replace-M4-files-and-Make-files-using-Maven-tf4014231s177.html#a11400529
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
View this message in context:
http://www.nabble.com/To-replace-M4-files-and-Make-files-using-Maven-tf4014231s177.html#a11421450
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]