maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Connolly <>
Subject Re: Custom plugin - resolve variables loaded from a file
Date Wed, 16 Dec 2009 12:48:50 GMT
Hi. I have no experience with this plugin but it would seem that you
could first filter the file as a typical maven resource and then have
the plugin point to the filtered version?

On 12/16/09, Gajo Csaba <> wrote:
> Hello,
> We're using the rpm plugin for packaging, and we have a problem with its
> install script. There are two ways to include a script. One is the
> (deprecated) <install> tag. In this case, we would put the bash script
> into the pom.xml, which is rather ugly, but it works. The bash script
> itself contains Maven variables, and these are replaced by maven before
> the script is used by the rpm plugin.
> The other way is to user the <installScriptlet> tag. This tag required
> the name of an external file, which contains the contents of the bash
> script. This is a much cleaner approach. However, the problem is the
> maven variables are not replaced in the external file, so the script
> doesn't work.
> I've looked at the source code of the rpm plugin, and it seems that it
> simply opens the external script file, and prints it line-by-line into
> the generated spec file, with no modification to the line.
> I think it would be a good idea to modify the rpm plugin code at this
> point, so that the line is first processed, expanding all maven variables.
> How can I do this? How is maven expanding its variables? Is there a
> method somewhere like MavenEnv.expandVariables(str) ?
> Thanks, Csaba
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Sent from my mobile device


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message