Re: [2/2] maven git commit: [MNG-6069] Have to treat -D as taking a single argument or else any property with = in the name or = in the value will be mangled

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [2/2] maven git commit: [MNG-6069] Have to treat -D as taking a single argument or else any property with = in the name or = in the value will be mangled

stephenconnolly
If this does not fix the build then I am dropping this branch from the
scope for Maven 3.5.0-beta-1

If the build is fixed and all tests pass then we can include this... and
fix any bugs found in a beta-2... hopefully no bugs will be found so we can
call it 3.5.0 and move forward ;-)

On 20 March 2017 at 15:09, <[hidden email]> wrote:

> [MNG-6069] Have to treat -D as taking a single argument or else any
> property with = in the name or = in the value will be mangled
>
>
> Project: http://git-wip-us.apache.org/repos/asf/maven/repo
> Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/0cafb4c0
> Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/0cafb4c0
> Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/0cafb4c0
>
> Branch: refs/heads/MNG-6069
> Commit: 0cafb4c042da840d038d327b634619c9f26b6728
> Parents: 04e67fd
> Author: Stephen Connolly <[hidden email]>
> Authored: Mon Mar 20 15:09:38 2017 +0000
> Committer: Stephen Connolly <[hidden email]>
> Committed: Mon Mar 20 15:09:38 2017 +0000
>
> ----------------------------------------------------------------------
>  .../src/main/java/org/apache/maven/cli/CLIManager.java    |  2 +-
>  .../src/main/java/org/apache/maven/cli/MavenCli.java      | 10 +---------
>  2 files changed, 2 insertions(+), 10 deletions(-)
> ----------------------------------------------------------------------
>
>
> http://git-wip-us.apache.org/repos/asf/maven/blob/0cafb4c0/
> maven-embedder/src/main/java/org/apache/maven/cli/CLIManager.java
> ----------------------------------------------------------------------
> diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/CLIManager.java
> b/maven-embedder/src/main/java/org/apache/maven/cli/CLIManager.java
> index 774dd0d..a474895 100644
> --- a/maven-embedder/src/main/java/org/apache/maven/cli/CLIManager.java
> +++ b/maven-embedder/src/main/java/org/apache/maven/cli/CLIManager.java
> @@ -109,7 +109,7 @@ public class CLIManager
>          options = new Options();
>          options.addOption( Option.builder( HELP ).longOpt( "help" ).desc(
> "Display help information" ).build() );
>          options.addOption( Option.builder( ALTERNATE_POM_FILE ).longOpt(
> "file" ).hasArg().desc( "Force the use of an alternate POM file (or
> directory with pom.xml)" ).build() );
> -        options.addOption( Option.builder( SET_SYSTEM_PROPERTY ).longOpt(
> "define" ).hasArgs().valueSeparator().desc( "Define a system property"
> ).build() );
> +        options.addOption( Option.builder( SET_SYSTEM_PROPERTY ).longOpt(
> "define" ).hasArg().desc( "Define a system property" ).build() );
>          options.addOption( Option.builder( OFFLINE ).longOpt( "offline"
> ).desc( "Work offline" ).build() );
>          options.addOption( Option.builder( VERSION ).longOpt( "version"
> ).desc( "Display version information" ).build() );
>          options.addOption( Option.builder( QUIET ).longOpt( "quiet"
> ).desc( "Quiet output - only show errors" ).build() );
>
> http://git-wip-us.apache.org/repos/asf/maven/blob/0cafb4c0/
> maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
> ----------------------------------------------------------------------
> diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
> b/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
> index f9eb17e..694f694 100644
> --- a/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
> +++ b/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
> @@ -1671,15 +1671,7 @@ public class MavenCli
>          {
>              if ( CLIManager.SET_SYSTEM_PROPERTY.equals( opt.getOpt() ) )
>              {
> -                String[] values = opt.getValues();
> -                if ( values.length == 1 )
> -                {
> -                    setCliProperty( values[0], userProperties );
> -                }
> -                else
> -                {
> -                    setCliProperty( values[0] + "=" + values[1],
> userProperties );
> -                }
> +                setCliProperty( opt.getValue(), userProperties );
>              }
>          }
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: [2/2] maven git commit: [MNG-6069] Have to treat -D as taking a single argument or else any property with = in the name or = in the value will be mangled

stephenconnolly
Nope... Nope... Nope...

System property parsing is not fixed...

May be better to add some more tests to MavenCliTest so that this can be
iterated faster

On 20 March 2017 at 15:11, Stephen Connolly <[hidden email]
> wrote:

> If this does not fix the build then I am dropping this branch from the
> scope for Maven 3.5.0-beta-1
>
> If the build is fixed and all tests pass then we can include this... and
> fix any bugs found in a beta-2... hopefully no bugs will be found so we can
> call it 3.5.0 and move forward ;-)
>
> On 20 March 2017 at 15:09, <[hidden email]> wrote:
>
>> [MNG-6069] Have to treat -D as taking a single argument or else any
>> property with = in the name or = in the value will be mangled
>>
>>
>> Project: http://git-wip-us.apache.org/repos/asf/maven/repo
>> Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/0cafb4c0
>> Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/0cafb4c0
>> Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/0cafb4c0
>>
>> Branch: refs/heads/MNG-6069
>> Commit: 0cafb4c042da840d038d327b634619c9f26b6728
>> Parents: 04e67fd
>> Author: Stephen Connolly <[hidden email]>
>> Authored: Mon Mar 20 15:09:38 2017 +0000
>> Committer: Stephen Connolly <[hidden email]>
>> Committed: Mon Mar 20 15:09:38 2017 +0000
>>
>> ----------------------------------------------------------------------
>>  .../src/main/java/org/apache/maven/cli/CLIManager.java    |  2 +-
>>  .../src/main/java/org/apache/maven/cli/MavenCli.java      | 10
>> +---------
>>  2 files changed, 2 insertions(+), 10 deletions(-)
>> ----------------------------------------------------------------------
>>
>>
>> http://git-wip-us.apache.org/repos/asf/maven/blob/0cafb4c0/m
>> aven-embedder/src/main/java/org/apache/maven/cli/CLIManager.java
>> ----------------------------------------------------------------------
>> diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/CLIManager.java
>> b/maven-embedder/src/main/java/org/apache/maven/cli/CLIManager.java
>> index 774dd0d..a474895 100644
>> --- a/maven-embedder/src/main/java/org/apache/maven/cli/CLIManager.java
>> +++ b/maven-embedder/src/main/java/org/apache/maven/cli/CLIManager.java
>> @@ -109,7 +109,7 @@ public class CLIManager
>>          options = new Options();
>>          options.addOption( Option.builder( HELP ).longOpt( "help"
>> ).desc( "Display help information" ).build() );
>>          options.addOption( Option.builder( ALTERNATE_POM_FILE ).longOpt(
>> "file" ).hasArg().desc( "Force the use of an alternate POM file (or
>> directory with pom.xml)" ).build() );
>> -        options.addOption( Option.builder( SET_SYSTEM_PROPERTY
>> ).longOpt( "define" ).hasArgs().valueSeparator().desc( "Define a system
>> property" ).build() );
>> +        options.addOption( Option.builder( SET_SYSTEM_PROPERTY
>> ).longOpt( "define" ).hasArg().desc( "Define a system property" ).build() );
>>          options.addOption( Option.builder( OFFLINE ).longOpt( "offline"
>> ).desc( "Work offline" ).build() );
>>          options.addOption( Option.builder( VERSION ).longOpt( "version"
>> ).desc( "Display version information" ).build() );
>>          options.addOption( Option.builder( QUIET ).longOpt( "quiet"
>> ).desc( "Quiet output - only show errors" ).build() );
>>
>> http://git-wip-us.apache.org/repos/asf/maven/blob/0cafb4c0/m
>> aven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
>> ----------------------------------------------------------------------
>> diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
>> b/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
>> index f9eb17e..694f694 100644
>> --- a/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
>> +++ b/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
>> @@ -1671,15 +1671,7 @@ public class MavenCli
>>          {
>>              if ( CLIManager.SET_SYSTEM_PROPERTY.equals( opt.getOpt() ) )
>>              {
>> -                String[] values = opt.getValues();
>> -                if ( values.length == 1 )
>> -                {
>> -                    setCliProperty( values[0], userProperties );
>> -                }
>> -                else
>> -                {
>> -                    setCliProperty( values[0] + "=" + values[1],
>> userProperties );
>> -                }
>> +                setCliProperty( opt.getValue(), userProperties );
>>              }
>>          }
>>
>>
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: [2/2] maven git commit: [MNG-6069] Have to treat -D as taking a single argument or else any property with = in the name or = in the value will be mangled

Karl Heinz Marbaise-3
Hi Stephen,

so moving to maven-3.5.0 or later until will have correct working tests
...and yes I see it the same having more tests to see where the real
issue is located...

I will change the target version...

Kind regards
Karl Heinz Marbaise
On 20/03/17 16:29, Stephen Connolly wrote:

> Nope... Nope... Nope...
>
> System property parsing is not fixed...
>
> May be better to add some more tests to MavenCliTest so that this can be
> iterated faster
>
> On 20 March 2017 at 15:11, Stephen Connolly <[hidden email]
>> wrote:
>
>> If this does not fix the build then I am dropping this branch from the
>> scope for Maven 3.5.0-beta-1
>>
>> If the build is fixed and all tests pass then we can include this... and
>> fix any bugs found in a beta-2... hopefully no bugs will be found so we can
>> call it 3.5.0 and move forward ;-)
>>
>> On 20 March 2017 at 15:09, <[hidden email]> wrote:
>>
>>> [MNG-6069] Have to treat -D as taking a single argument or else any
>>> property with = in the name or = in the value will be mangled
>>>
>>>
>>> Project: http://git-wip-us.apache.org/repos/asf/maven/repo
>>> Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/0cafb4c0
>>> Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/0cafb4c0
>>> Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/0cafb4c0
>>>
>>> Branch: refs/heads/MNG-6069
>>> Commit: 0cafb4c042da840d038d327b634619c9f26b6728
>>> Parents: 04e67fd
>>> Author: Stephen Connolly <[hidden email]>
>>> Authored: Mon Mar 20 15:09:38 2017 +0000
>>> Committer: Stephen Connolly <[hidden email]>
>>> Committed: Mon Mar 20 15:09:38 2017 +0000
>>>
>>> ----------------------------------------------------------------------
>>>  .../src/main/java/org/apache/maven/cli/CLIManager.java    |  2 +-
>>>  .../src/main/java/org/apache/maven/cli/MavenCli.java      | 10
>>> +---------
>>>  2 files changed, 2 insertions(+), 10 deletions(-)
>>> ----------------------------------------------------------------------
>>>
>>>
>>> http://git-wip-us.apache.org/repos/asf/maven/blob/0cafb4c0/m
>>> aven-embedder/src/main/java/org/apache/maven/cli/CLIManager.java
>>> ----------------------------------------------------------------------
>>> diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/CLIManager.java
>>> b/maven-embedder/src/main/java/org/apache/maven/cli/CLIManager.java
>>> index 774dd0d..a474895 100644
>>> --- a/maven-embedder/src/main/java/org/apache/maven/cli/CLIManager.java
>>> +++ b/maven-embedder/src/main/java/org/apache/maven/cli/CLIManager.java
>>> @@ -109,7 +109,7 @@ public class CLIManager
>>>          options = new Options();
>>>          options.addOption( Option.builder( HELP ).longOpt( "help"
>>> ).desc( "Display help information" ).build() );
>>>          options.addOption( Option.builder( ALTERNATE_POM_FILE ).longOpt(
>>> "file" ).hasArg().desc( "Force the use of an alternate POM file (or
>>> directory with pom.xml)" ).build() );
>>> -        options.addOption( Option.builder( SET_SYSTEM_PROPERTY
>>> ).longOpt( "define" ).hasArgs().valueSeparator().desc( "Define a system
>>> property" ).build() );
>>> +        options.addOption( Option.builder( SET_SYSTEM_PROPERTY
>>> ).longOpt( "define" ).hasArg().desc( "Define a system property" ).build() );
>>>          options.addOption( Option.builder( OFFLINE ).longOpt( "offline"
>>> ).desc( "Work offline" ).build() );
>>>          options.addOption( Option.builder( VERSION ).longOpt( "version"
>>> ).desc( "Display version information" ).build() );
>>>          options.addOption( Option.builder( QUIET ).longOpt( "quiet"
>>> ).desc( "Quiet output - only show errors" ).build() );
>>>
>>> http://git-wip-us.apache.org/repos/asf/maven/blob/0cafb4c0/m
>>> aven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
>>> ----------------------------------------------------------------------
>>> diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
>>> b/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
>>> index f9eb17e..694f694 100644
>>> --- a/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
>>> +++ b/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
>>> @@ -1671,15 +1671,7 @@ public class MavenCli
>>>          {
>>>              if ( CLIManager.SET_SYSTEM_PROPERTY.equals( opt.getOpt() ) )
>>>              {
>>> -                String[] values = opt.getValues();
>>> -                if ( values.length == 1 )
>>> -                {
>>> -                    setCliProperty( values[0], userProperties );
>>> -                }
>>> -                else
>>> -                {
>>> -                    setCliProperty( values[0] + "=" + values[1],
>>> userProperties );
>>> -                }
>>> +                setCliProperty( opt.getValue(), userProperties );
>>>              }
>>>          }
>>>
>>>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]