jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephane Landelle (JIRA)" <j...@apache.org>
Subject [jira] Commented: (JCR-1788) Maven variable collision
Date Tue, 07 Oct 2008 12:43:45 GMT

    [ https://issues.apache.org/jira/browse/JCR-1788?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12637460#action_12637460
] 

Stephane Landelle commented on JCR-1788:
----------------------------------------

Hi Thomas,

I haven't found anything in the official documentation yet, but that's no
surprise, it's not really up-to-date...

If you install the attached project, you'll see that ${wsp.name} has indeed
been replaced by "Maven Filtering Test Project Name" which is the name
declared in the pom.

I'll try to find a reference in the documentation or even the code, but I'm
quite pessimistic...

Sincererly,

Stephane

2008/10/7 Thomas Mueller (JIRA) <jira@apache.org>



> Maven variable collision
> ------------------------
>
>                 Key: JCR-1788
>                 URL: https://issues.apache.org/jira/browse/JCR-1788
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: config
>         Environment: Leopard, maven 2.1.0-M1
>            Reporter: Stephane Landelle
>         Attachments: maven-filtering-test.zip
>
>   Original Estimate: 0.08h
>  Remaining Estimate: 0.08h
>
> The jackrabbit config file uses a variable ${wsp.name}.
> This variable name is already used by maven during filtering and holds the project name.
> As a consequence, when trying to filter the file in order for example to change the Cluster
Node Id, the file gets corrupted.
> Please find test project enclosed.
> Patch is very simple : you can keep old variables for compatibility, just duplicate variable
with a jackrabbit specific name such as "jr.wsp.name" and add in org.apache.jackrabbit.core.config.RepositoryConfigurationParser:
> line 62:
>     /** Name of the repository name parser variable. */
>     public static final String MAVEN_SUPPORTING_WORKSPACE_NAME_VARIABLE = "jr.wsp.name";
> line 420:
>         // add a dupplicate that supports maven filtering
>         tmpVariables.put(MAVEN_SUPPORTING_WORKSPACE_NAME_VARIABLE, name);
> This should even be done for other variables to avoid possible later collisions.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message