Yes, the parameter name is the one used in the configuration section of the
pom.xml file. In order to set it from the command line, the parameter has
also an expression tag that allows to specify the default value (which may
be dynamically computed by Maven at runtime). In our case, the expression is
${buildhelper.removeAll} so you must set a property called
buildhelper.removeAll on the command line in order to set its value.

Regards
Jeff MAURY

On Wed, Sep 8, 2010 at 2:34 PM, Lewis, Eric <[email protected]> wrote:

> Hi Jeff
>
> Thanks, that worked!
>
> However, I'm now confused  :-)
>
> According to
> http://mojo.codehaus.org/build-helper-maven-plugin/remove-project-artifact-mojo.htmlthe
>  parameter is called "removeAll".
> My understanding of plugin parameters on the command line was that you just
> use them with -D
> Am I wrong?
>
> Best regards,
> Eric
>
> -----Ursprüngliche Nachricht-----
> Von: [email protected] [mailto:[email protected]] Im Auftrag von Jeff
> MAURY
> Gesendet: Mittwoch, 8. September 2010 14:25
> An: Maven Users List
> Betreff: Re: Build Helper Plugin: remove-project-artifact always removes
> all versions?
>
> You should use -Dbuildhelper.removeAll=true instead.
>
> Regards
> Jeff MAURY
>
> On Wed, Sep 8, 2010 at 2:20 PM, Lewis, Eric <[email protected]> wrote:
>
> > Hi
> >
> > I'm trying to remove a certain version of an artifact within my local
> repo.
> > I've written a small test script which downloads joda-time 1.0 and 1.6
> > Both versions exist with their directories in my local repo.
> >
> > Then I download the POM for 1.6 into a temporary directory, enter that
> > directory, delete the <distributionManagement> from the POM and then call
> > Maven:
> > mvn build-helper:remove-project-artifact -DremoveAll=false
> >
> > However, that removes *all* versions in the local repo.
> >
> > Unless I understand "removeAll" wrongly, it should only remove 1.6...
> >
> >
> > When running Maven in debug mode, I get
> >
> > [DEBUG] Configuring mojo
> > 'org.codehaus.mojo:build-helper-maven-plugin:1.5:remove-project-artifact'
> > -->
> > [DEBUG]   (f) localRepository =
> > Repository[local|file://C:/jp/maven-repository]
> > [DEBUG]   (f) project = MavenProject: joda-time:joda-time:1.6 @
> > c:\jp\esv-projects\client\temp\pom.xml
> > [DEBUG]   (f) removeAll = true
> > [DEBUG] -- end configuration --
> > [INFO] [build-helper:remove-project-artifact {execution: default-cli}]
> > [INFO] C:\jp\maven-repository\joda-time\joda-time removed.
> >
> > Am I doing something wrong or is this a bug?
> >
> > Best regards,
> > Eric
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: [email protected]
> >
> >
>
>
> --
> "Legacy code" often differs from its suggested alternative by actually
> working and scaling.
>  - Bjarne Stroustrup
>
> http://www.jeffmaury.com
> http://riadiscuss.jeffmaury.com
> http://www.twitter.com/jeffmaury
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>


-- 
"Legacy code" often differs from its suggested alternative by actually
working and scaling.
 - Bjarne Stroustrup

http://www.jeffmaury.com
http://riadiscuss.jeffmaury.com
http://www.twitter.com/jeffmaury

Reply via email to