Maven 2.x Reactor Plugin

Can't pass a parameter with a comma to -Dmake.goals

Details

  • Type: Improvement Improvement
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 1.0
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Testcase included:
    yes
  • Patch Submitted:
    Yes
  • Number of attachments :
    1

Description

If tried to do

mvn reactor:make -Dmake.goals=install,-Pprofile1,profile2

If fails because -Pprofile1,profile2 is split in two parameters.

My solution was to be able to escape a comma by doubling it.

Its implementation and the test case are in attachment.

Activity

Hide
Milos Kleint added a comment -

the invoker component seems to have special setters for profiles and properties. I'm wondering if we shall have special parameters for those in the reactor:make mojo as well..

Show
Milos Kleint added a comment - the invoker component seems to have special setters for profiles and properties. I'm wondering if we shall have special parameters for those in the reactor:make mojo as well..
Hide
Damian Carrillo added a comment -

I think that the patch might be overkill if the gist of the problem is to include those two build profiles in the builds spawned by the reactor. Instead of issuing the command as you have done, try using the following:

$ mvn reactor:make -Dmake.goals="install -Pprofile1 -Pprofile2"

You can even pass any combination of command line parameters this way, ie:

$ mvn reactor:make -Dmake.goals="install -Pprofile1 -Pprofile2 -Dmaven.test.skip=true"

Show
Damian Carrillo added a comment - I think that the patch might be overkill if the gist of the problem is to include those two build profiles in the builds spawned by the reactor. Instead of issuing the command as you have done, try using the following: $ mvn reactor:make -Dmake.goals="install -Pprofile1 -Pprofile2" You can even pass any combination of command line parameters this way, ie: $ mvn reactor:make -Dmake.goals="install -Pprofile1 -Pprofile2 -Dmaven.test.skip=true"
Hide
Henri Tremblay added a comment -

Historically, it wasn't possible to have two -P in the command line.

I just tried with maven 2.1.0 and it now seems to work.

If that's the case, indeed there's a nice workaround to my issue.

Show
Henri Tremblay added a comment - Historically, it wasn't possible to have two -P in the command line. I just tried with maven 2.1.0 and it now seems to work. If that's the case, indeed there's a nice workaround to my issue.

People

Vote (0)
Watch (2)

Dates

  • Created:
    Updated: