[ 
https://jira.codehaus.org/browse/MRAR-30?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=333559#comment-333559
 ] 

Barney Barumba commented on MRAR-30:
------------------------------------

Here's what I think is happening:

# The ra.xml file is being copied across, including filtering if enabled.
# Later, includeCustomRaXmlFile() is called, which overwrites it (regardless of 
whether or not a custom file was used).

A simple fix is just to remove the default value from the raXmlFile property. 
This means that includeCustomRaXmlFile() is only called if you actually specify 
a <raXmlFile> in your pom. So if you don't use a custom ra.xml file then the 
standard one will be copied across and filtered, as per (1), and not 
overwritten by (2). However, if you use a custom one it will still not be 
filtered.

A more complete solution would seem to be to just treat any custom ra.xml file 
as another resource, and copy/filter it along with the rest of the resources.

Then:

# If you do not use a custom ra.xml file then the standard one will be copied 
and filtered with all the other rar files.
# If you do use a custom ra.xml file outside of the standard rar directory, 
then it will be copied and filtered as a separate file.
# If you do use a custom ra.xml file inside of the standard rar directory, then 
it will be processed twice: not super efficient but doesn't seem to do any harm.

I've attached a patch which does this, and seems to work for me. Hope this is 
useful.

Cheers,
                
> Filtering of RA.xml
> -------------------
>
>                 Key: MRAR-30
>                 URL: https://jira.codehaus.org/browse/MRAR-30
>             Project: Maven Rar Plugin
>          Issue Type: New Feature
>    Affects Versions: 2.2
>         Environment: Win7 64Bit JDK1.6.0_26
>            Reporter: Markus KARG
>            Priority: Minor
>         Attachments: maven-rar-plugin.diff
>
>
> It would be great if one could specify <filtering>true</filtering> in the 
> pom.xml to make the RAR plugin filter the custom RA.xml file provided in src. 
> Using this feature, one could put ${project.version} into the custom RA.xml's 
> <resourceadapter-version/> section.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to