maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Blevins <david.blev...@gmail.com>
Subject Re: Maven release plugin not honoring -Darguments
Date Fri, 30 Dec 2011 22:02:58 GMT
An FYI on the escaping/quoting as that's come up twice and isn't the issue.

    public class Arguments {
        public static void main(String[] args) {
    
            for (String arg : args) {
                System.out.printf("[%s]", arg);
            }
    
            System.out.println();
        }
    }


$ java Arguments mvn release:prepare -DdryRun=true -Darguments="-DskipTests=true -DfailIfNoTests=false"
[mvn][release:prepare][-DdryRun=true][-Darguments=-DskipTests=true -DfailIfNoTests=false]

$ java Arguments mvn release:prepare -DdryRun=true "-Darguments=-DskipTests=true -DfailIfNoTests=false"
[mvn][release:prepare][-DdryRun=true][-Darguments=-DskipTests=true -DfailIfNoTests=false]

$ java Arguments mvn release:prepare -DdryRun=true -Darguments=-DskipTests=true" "-DfailIfNoTests=false
[mvn][release:prepare][-DdryRun=true][-Darguments=-DskipTests=true -DfailIfNoTests=false]

$ java Arguments mvn release:prepare -DdryRun=true -Darguments=-DskipTests=true' '-DfailIfNoTests=false
[mvn][release:prepare][-DdryRun=true][-Darguments=-DskipTests=true -DfailIfNoTests=false]

$ java Arguments mvn release:prepare -DdryRun=true -Darguments=-DskipTests=true\ -DfailIfNoTests=false
[mvn][release:prepare][-DdryRun=true][-Darguments=-DskipTests=true -DfailIfNoTests=false]

The next one just to be goofy :)

$ java Arguments mvn release:prepare -DdryRun=true -Da"rg"um'en'ts="-"Ds'k'ipTe"sts=tr"ue\
-Df"ailIf"NoTest's'=false
[mvn][release:prepare][-DdryRun=true][-Darguments=-DskipTests=true -DfailIfNoTests=false]

And finally an actually broken one:

$ java Arguments mvn release:prepare -DdryRun=true -Darguments=-DskipTests=true -DfailIfNoTests=false
[mvn][release:prepare][-DdryRun=true][-Darguments=-DskipTests=true][-DfailIfNoTests=false]


The problem isn't with the plugin but the Apache parent pom.  Thanks, Benson, for the feedback
on that.  There're half dozen committers on that pom so I'm not sure who has the objection
to allowing -Darguments to be used.

I've created this jira and attached a patch.  Hopefully we can either fix it or document it
as intentionally not working and give reasons and workarounds like the ones you suggest. 
I'm fine with either outcome.

  https://issues.apache.org/jira/browse/MPOM-35

On a side note,... Happy new year to all! :)


-David

On Dec 30, 2011, at 2:22 AM, Ansgar Konermann wrote:

> Am 27.09.2011 14:48 schrieb "David Blevins" <david.blevins@gmail.com>:
>> 
>> Is it a known issue that the release plugin does not honor the
> -Darguments?
>> 
>> Specifically, I'm attempting to:
>> 
>> mvn release:prepare -DdryRun=true -Darguments="-DskipTests=true
> -DfailIfNoTests=false"
>> 
> 
> Try:
> 
> mvn release:prepare -DdryRun=true "-Darguments=-DskipTests=true
> -DfailIfNoTests=false"
> 
> Notice the slightly different quoting (before -Darguments). Works well for
> me.
> 
> Best regards
> 
> Ansgar
> 
>> It takes 40 minutes to get through a dryRun with tests on.  We still have
> several kinks in the build to work out before the release plugin will work,
> so obviously running with tests on every dryRun is just making a hard task
> impossible.
>> 
>> maven 3.0.3, apache-10 parent pom, maven-release-plugin 2.1
>> 
>> 
>> -David
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Mime
View raw message