You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "laurent gousenbourger (JIRA)" <ji...@codehaus.org> on 2008/12/02 00:25:19 UTC

[jira] Created: (MNG-3884) Command line arguments don't overwrite settings.xml properties when invoking a plugin

Command line arguments don't overwrite settings.xml properties when invoking a plugin
-------------------------------------------------------------------------------------

                 Key: MNG-3884
                 URL: http://jira.codehaus.org/browse/MNG-3884
             Project: Maven 2
          Issue Type: Bug
          Components: Command Line
    Affects Versions: 2.1.0-M1
         Environment: All environments
            Reporter: laurent gousenbourger


To explain the issue, let's start with the following example:

1°) Run a plugin goal with an argument specified in the command line with the "-D" option only

mvn eclipse:eclipse -Declipse.projectNameTemplate=CommandLineProjectName

We can see if we open the generated .project file that the name of the project is as we expect: "CommandLineProjectName"
This is normal, the goal input parameter is set with the command line property.

2°) Run a plugin goal with an argument specified in the "settings.xml" file only

mvn eclipse:eclipse

with settings.xml containing the following enabled profile:

<profiles>
  <profile>
    <id>testProfile</id>
      <properties>
      <eclipse.projectNameTemplate>SettingsProjectName</eclipse.projectNameTemplate>
    </properties>
  </profile>
</profiles>

<activeProfiles>
  <activeProfile>testProfile</activeProfile>
</activeProfiles>

We can see if we open the generated .project file that the name of the project is as we expect: "SettingsProjectName".
This is normal, the input parameter of the goal is set with the "settings.xml" file property.

3°) Run a plugin goal with an argument specified in the command line with the "-D" option and with another value in the "settngs.xml" file

If we use both scenarios, the property value set in the "settings.xml" file will overwrite the value set via the command line with the "-D" option.
Maven should not react in that way but in the opposite: the command line value should overwite the "settings.xml" file value.

It is already the case if we reuse the value somewhere in the pom.xml file. It should be the same when invoking a plugin goal.

-- 
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

       

[jira] Updated: (MNG-3884) Command line arguments don't overwrite settings.xml properties when invoking a plugin

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-3884?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brett Porter updated MNG-3884:
------------------------------

    Affects Version/s: 2.0.9
        Fix Version/s: 2.x

> Command line arguments don't overwrite settings.xml properties when invoking a plugin
> -------------------------------------------------------------------------------------
>
>                 Key: MNG-3884
>                 URL: http://jira.codehaus.org/browse/MNG-3884
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Command Line
>    Affects Versions: 2.0.9, 2.1.0-M1
>         Environment: All environments
>            Reporter: laurent gousenbourger
>             Fix For: 2.x
>
>
> To explain the issue, let's start with the following example:
> 1°) Run a plugin goal with an argument specified in the command line with the "-D" option only
> mvn eclipse:eclipse -Declipse.projectNameTemplate=CommandLineProjectName
> We can see if we open the generated .project file that the name of the project is as we expect: "CommandLineProjectName"
> This is normal, the goal input parameter is set with the command line property.
> 2°) Run a plugin goal with an argument specified in the "settings.xml" file only
> mvn eclipse:eclipse
> with settings.xml containing the following enabled profile:
> <profiles>
>   <profile>
>     <id>testProfile</id>
>       <properties>
>       <eclipse.projectNameTemplate>SettingsProjectName</eclipse.projectNameTemplate>
>     </properties>
>   </profile>
> </profiles>
> <activeProfiles>
>   <activeProfile>testProfile</activeProfile>
> </activeProfiles>
> We can see if we open the generated .project file that the name of the project is as we expect: "SettingsProjectName".
> This is normal, the input parameter of the goal is set with the "settings.xml" file property.
> 3°) Run a plugin goal with an argument specified in the command line with the "-D" option and with another value in the "settngs.xml" file
> If we use both scenarios, the property value set in the "settings.xml" file will overwrite the value set via the command line with the "-D" option.
> Maven should not react in that way but in the opposite: the command line value should overwite the "settings.xml" file value.
> It is already the case if we reuse the value somewhere in the pom.xml file. It should be the same when invoking a plugin goal.

-- 
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

       

[jira] Commented: (MNG-3884) Command line arguments don't overwrite settings.xml properties when invoking a plugin

Posted by "laurent gousenbourger (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=156177#action_156177 ] 

laurent gousenbourger commented on MNG-3884:
--------------------------------------------

The goal of that approach is to have default values configured in a profile of the settings.xml file.

If we invoke different in-house plugins, the default values will be used.

In special case, we would like to overwrite this default values by specifying them with the command line with thee "-D" option.
In that case, the "-D" option should have the last word!

> Command line arguments don't overwrite settings.xml properties when invoking a plugin
> -------------------------------------------------------------------------------------
>
>                 Key: MNG-3884
>                 URL: http://jira.codehaus.org/browse/MNG-3884
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Command Line
>    Affects Versions: 2.1.0-M1
>         Environment: All environments
>            Reporter: laurent gousenbourger
>
> To explain the issue, let's start with the following example:
> 1°) Run a plugin goal with an argument specified in the command line with the "-D" option only
> mvn eclipse:eclipse -Declipse.projectNameTemplate=CommandLineProjectName
> We can see if we open the generated .project file that the name of the project is as we expect: "CommandLineProjectName"
> This is normal, the goal input parameter is set with the command line property.
> 2°) Run a plugin goal with an argument specified in the "settings.xml" file only
> mvn eclipse:eclipse
> with settings.xml containing the following enabled profile:
> <profiles>
>   <profile>
>     <id>testProfile</id>
>       <properties>
>       <eclipse.projectNameTemplate>SettingsProjectName</eclipse.projectNameTemplate>
>     </properties>
>   </profile>
> </profiles>
> <activeProfiles>
>   <activeProfile>testProfile</activeProfile>
> </activeProfiles>
> We can see if we open the generated .project file that the name of the project is as we expect: "SettingsProjectName".
> This is normal, the input parameter of the goal is set with the "settings.xml" file property.
> 3°) Run a plugin goal with an argument specified in the command line with the "-D" option and with another value in the "settngs.xml" file
> If we use both scenarios, the property value set in the "settings.xml" file will overwrite the value set via the command line with the "-D" option.
> Maven should not react in that way but in the opposite: the command line value should overwite the "settings.xml" file value.
> It is already the case if we reuse the value somewhere in the pom.xml file. It should be the same when invoking a plugin goal.

-- 
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

       

[jira] Closed: (MNG-3884) Command line arguments don't overwrite settings.xml properties when invoking a plugin

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-3884?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann closed MNG-3884.
----------------------------------

       Resolution: Duplicate
    Fix Version/s:     (was: 3.0-alpha-8)
         Assignee: Benjamin Bentmann

> Command line arguments don't overwrite settings.xml properties when invoking a plugin
> -------------------------------------------------------------------------------------
>
>                 Key: MNG-3884
>                 URL: http://jira.codehaus.org/browse/MNG-3884
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Command Line
>    Affects Versions: 2.0.9, 2.1.0-M1
>         Environment: All environments
>            Reporter: laurent gousenbourger
>            Assignee: Benjamin Bentmann
>
> To explain the issue, let's start with the following example:
> 1°) Run a plugin goal with an argument specified in the command line with the "-D" option only
> mvn eclipse:eclipse -Declipse.projectNameTemplate=CommandLineProjectName
> We can see if we open the generated .project file that the name of the project is as we expect: "CommandLineProjectName"
> This is normal, the goal input parameter is set with the command line property.
> 2°) Run a plugin goal with an argument specified in the "settings.xml" file only
> mvn eclipse:eclipse
> with settings.xml containing the following enabled profile:
> <profiles>
>   <profile>
>     <id>testProfile</id>
>       <properties>
>       <eclipse.projectNameTemplate>SettingsProjectName</eclipse.projectNameTemplate>
>     </properties>
>   </profile>
> </profiles>
> <activeProfiles>
>   <activeProfile>testProfile</activeProfile>
> </activeProfiles>
> We can see if we open the generated .project file that the name of the project is as we expect: "SettingsProjectName".
> This is normal, the input parameter of the goal is set with the "settings.xml" file property.
> 3°) Run a plugin goal with an argument specified in the command line with the "-D" option and with another value in the "settngs.xml" file
> If we use both scenarios, the property value set in the "settings.xml" file will overwrite the value set via the command line with the "-D" option.
> Maven should not react in that way but in the opposite: the command line value should overwite the "settings.xml" file value.
> It is already the case if we reuse the value somewhere in the pom.xml file. It should be the same when invoking a plugin goal.

-- 
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

       

[jira] Updated: (MNG-3884) Command line arguments don't overwrite settings.xml properties when invoking a plugin

Posted by "Jason van Zyl (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-3884?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jason van Zyl updated MNG-3884:
-------------------------------

    Fix Version/s:     (was: 2.x)
                   3.0-alpha-7

> Command line arguments don't overwrite settings.xml properties when invoking a plugin
> -------------------------------------------------------------------------------------
>
>                 Key: MNG-3884
>                 URL: http://jira.codehaus.org/browse/MNG-3884
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Command Line
>    Affects Versions: 2.0.9, 2.1.0-M1
>         Environment: All environments
>            Reporter: laurent gousenbourger
>             Fix For: 3.0-alpha-7
>
>
> To explain the issue, let's start with the following example:
> 1°) Run a plugin goal with an argument specified in the command line with the "-D" option only
> mvn eclipse:eclipse -Declipse.projectNameTemplate=CommandLineProjectName
> We can see if we open the generated .project file that the name of the project is as we expect: "CommandLineProjectName"
> This is normal, the goal input parameter is set with the command line property.
> 2°) Run a plugin goal with an argument specified in the "settings.xml" file only
> mvn eclipse:eclipse
> with settings.xml containing the following enabled profile:
> <profiles>
>   <profile>
>     <id>testProfile</id>
>       <properties>
>       <eclipse.projectNameTemplate>SettingsProjectName</eclipse.projectNameTemplate>
>     </properties>
>   </profile>
> </profiles>
> <activeProfiles>
>   <activeProfile>testProfile</activeProfile>
> </activeProfiles>
> We can see if we open the generated .project file that the name of the project is as we expect: "SettingsProjectName".
> This is normal, the input parameter of the goal is set with the "settings.xml" file property.
> 3°) Run a plugin goal with an argument specified in the command line with the "-D" option and with another value in the "settngs.xml" file
> If we use both scenarios, the property value set in the "settings.xml" file will overwrite the value set via the command line with the "-D" option.
> Maven should not react in that way but in the opposite: the command line value should overwite the "settings.xml" file value.
> It is already the case if we reuse the value somewhere in the pom.xml file. It should be the same when invoking a plugin goal.

-- 
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