[
http://jira.codehaus.org/browse/MWAR-225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=220270#action_220270
]
Peter Runge commented on MWAR-225:
----------------------------------
I should probably add a bit of background and more information to clarify the
issue I am having.
What I was doing was filtering a JSP file, which itself has '@' characters in
it. We had an uneven number of '@' symbols in the header (with @taglib
declarations, etc.) Possibly due to some changes between Maven versions
(plexus interpolator/InterpolatorFilterReader maybe? - only guessing - I did
only a bit of debugging) Maven 3 alpha 7 still coped but Maven 3 beta 1 seems
to become affected by these uneven number of '@' characters (there are line
breaks between them - maybe this behaviour changed?). In any case, I came to
the conclusion that also using '@' for filtering was a bad idea, but because we
use JSTL in the JSP using ${ and } for filtering is an equally bad idea (if
someone adds a Maven project property at some time in the future that happens
to match a JSTL variable name there will be problems).
But because there is no way to change the delimiter token defaults I am a bit
stuck. The resources plugin has the useDefaultDelimiters and delimiters
properties to use custom delimiters for filtering and not use the defaults
which would be handy in my case.
As a workaround (info for anyone else in a similar situation), I might use the
resources plugin to filter the JSPs to a custom build directory and include
that build directory as a resource from the WAR plugin configuration.
> Add support for customizing filtering delimiters like the resources plugin
> --------------------------------------------------------------------------
>
> Key: MWAR-225
> URL: http://jira.codehaus.org/browse/MWAR-225
> Project: Maven 2.x WAR Plugin
> Issue Type: Improvement
> Affects Versions: 2.1-beta-1
> Reporter: Peter Runge
> Priority: Minor
>
> After recently upgrading to Maven3 beta1 from alpha7 I noticed that our
> filters were not taking effect any more. We were using '@' for creating
> filer tokens, which used to work alpha7 but no more with beta1.
> In any case, looking at the resources plugin, it has a delimiters property
> that can be used to customize the delimiters when filtering. As suggested by
> http://stackoverflow.com/questions/2315009/override-mavens-default-resource-filter-replacement-pattern
> I set an appropriate property on the resources plugin, but no such property
> exists for the WAR plugin at the moment which means I am stuck. I need to
> keep the delimiter token as '@' because we need to maintain Ant compatibility
> for the time being.
> It would be nice if this property also existed on the WAR plugin so that
> filtering delimiters could be customized.
> The code in the resources plugin that does the job:
> http://maven.apache.org/plugins/maven-resources-plugin/xref/org/apache/maven/plugin/resources/ResourcesMojo.html#233
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira