Maven release prepare without prompts?

Posted by Bruce Settergren on Stack Overflow See other posts from Stack Overflow or by Bruce Settergren
Published on 2010-05-20T16:48:31Z Indexed on 2010/05/20 16:50 UTC
Read the original article Hit count: 195

Filed under:
|
|
|

I want to automate the execution of Maven release:prepare with Perl so that the user doesn't have to answer the prompts for version names etc. Are there a -D arguments that can be supplied so that no prompting is done? I tried the obvious solution which is to feed the prompt answers to mvn via perl code like this:

my $cmd = qq(mvn release:prepare -DautoVersionSubmodules=true-DpreparationGoals="clean install"); open MVN, "| $cmd";

print MVN "\n"; # default
print MVN "$cur_version";
print MVN "\n";
print MVN "$next_version";
print MVN "\n";

close MVN;

but mvn ignores such input and winds up using the defaults (and doesn't prompt either).

So, are there -D args for the release:prepare plugin:goal?

Thanks.

© Stack Overflow or respective owner

Related posts about maven

Related posts about release