views:

21

answers:

1

When preparing the release of a Maven 2 project which includes a GWT module, mvn -B release:prepare release:perform builds the GWT module twice, which takes up most of the time of the build.

Running a full GWT build is not necessary when executing release:prepare, a validate-only build is enough. This would be achieved by specifying the -Dgwt.validateOnly=true flag on the command line, but the command line arguments are passed to a single execution when using the Maven 2 Release plugin plugin under Hudson.

How can I pass the -Dgwt.validateOnly flag to release:prepare but not to release:perform?

+1  A: 

Do it yourself and create two steps.

  1. mvn -B release:prepare -Dgwt.validateOnly=true
  2. mvn -B release:perform

EDIT: Just read the documentation of the M2 Release Plugin. I suggest to use the standard Release Plugin or the Batch Task Plugin .

Peter Schuetze
Thanks, that would solve it, but I would need to create another Hudson job, and that would not be acceptable. I'd rather wait 5 minutes more.
Robert Munteanu
Actually not. see my edit.
Peter Schuetze