You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by walterw <wa...@hotmail.com> on 2008/09/11 14:56:24 UTC

maven-war-plugin (filtering resources)

Hi all,

I am having problems filtering my resources (.jsp, .xml, .sql).  I configure
the context path as well as URLs and so I would like to keep these as
variables so I can update the property in a single place and everything will
be updated automatically.

The issue that I am having is that wherever I use certain attributes:

[code]
${users.id}
${user.id}
${adfadfadflkadf.id}
[/code]

They all match the same pattern unfortunately resulting in an incorrect
override.  I do not want these variables in my JSPs to be matched, but I
want ${context.path} to be matched and it is being matched correctly.  Is
there any way to restrict pattern matching to strict, or is this a bug with
the plexus matching code base?


Please let me know if there is another viable option to filter these
resources.  The maven-war-plugin basically extends the maven-filtering
plugin and are both based off of the plexus pattern matching plugin and that
appears to be causing the problems.

Is it possible to change the pattern matching format as well to only allow
@variable.property@ and not ${variable.property}?  This way, my JSPs can
still use ${} without being adversely affected.


Thanks,
Walter
-- 
View this message in context: http://www.nabble.com/maven-war-plugin-%28filtering-resources%29-tp19434177p19434177.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: maven-war-plugin (filtering resources)

Posted by walterw <wa...@hotmail.com>.
Hi,

Thanks for your quick response.

That looks like exactly what I need.  I have tried using the resources
plugin to configure my JSPs but it does not appear to actually update them. 
If the maven-war-plugin is updated, then I think I'd be good to go.


Thanks,
Walter
-- 
View this message in context: http://www.nabble.com/maven-war-plugin-%28filtering-resources%29-tp19434177p19435216.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: maven-war-plugin (filtering resources)

Posted by Olivier Lamy <ol...@apache.org>.
Hi,
Currently no way to limit this.
But you can certainly add an issue in
http://jira.codehaus.org/browse/MSHARED under the component
maven-filtering.
As we have fixed http://jira.codehaus.org/browse/MRESOURCES-29 we can
imagine having the same feature with the war plugin.

--
Olivier

2008/9/11 walterw <wa...@hotmail.com>:
>
> Hi all,
>
> I am having problems filtering my resources (.jsp, .xml, .sql).  I configure
> the context path as well as URLs and so I would like to keep these as
> variables so I can update the property in a single place and everything will
> be updated automatically.
>
> The issue that I am having is that wherever I use certain attributes:
>
> [code]
> ${users.id}
> ${user.id}
> ${adfadfadflkadf.id}
> [/code]
>
> They all match the same pattern unfortunately resulting in an incorrect
> override.  I do not want these variables in my JSPs to be matched, but I
> want ${context.path} to be matched and it is being matched correctly.  Is
> there any way to restrict pattern matching to strict, or is this a bug with
> the plexus matching code base?
>
>
> Please let me know if there is another viable option to filter these
> resources.  The maven-war-plugin basically extends the maven-filtering
> plugin and are both based off of the plexus pattern matching plugin and that
> appears to be causing the problems.
>
> Is it possible to change the pattern matching format as well to only allow
> @variable.property@ and not ${variable.property}?  This way, my JSPs can
> still use ${} without being adversely affected.
>
>
> Thanks,
> Walter
> --
> View this message in context: http://www.nabble.com/maven-war-plugin-%28filtering-resources%29-tp19434177p19434177.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org