jenkins - maven-release-plugin prepare vs perform -


i looking set release jobs in jenkins. use jenkins, maven 3 , perforce source control , nexus repository management.

i have set jobs maven goals release:prepare , release:perform, notice build times doubled both compilation , testing happens twice. current understanding of maven-release-plugin prepare , perform goals follows:

maven-release-plugin prepare:

  1. ensures no local modifications files in workspace
  2. edits poms set release version
  3. executes preparationgoals default "clean verify" ensure code can compiled , passes tests.
  4. commits modified poms
  5. creates vcs tag
  6. increments versions of poms next development version , commits these poms vcs

also, release.properties file created vcs tag , release , development version information

maven-release-plugin perform

  1. checks out fresh copy of source code using vcs tag release.properties default location of target/checkout
  2. executes goals of deploy/deploy-site depending on whether project has distributionmanagement

so in order stop doubling build time preserve build integrity, thinking of doing following:

  1. make jenkins checkout fresh copy of latest source code source repository
  2. configure preparationsgoals config element of release plugin "clean deploy"
  3. just run release:prepare

with above, think can merge 2 (prepare , perform) 1 step , save on build turn around time. build 1 build environment target 1 stack (java6, etc) , long code compiles , passes tests in preparation step, fine deploy artifacts nexus.

i looking opposing thoughts above can go wrong can saved eyes blind to.

thanks

this maven question not jenkins one.

in maven prepare , perform operations 2 different things. 1 operate on snapshots, other in tagged version of release. 1 deployed snapshotrepository other release repository. 1 creates next snapshot build, 1 creates current release.

they serve different purposes. , both may failing in own ways depending on maven & repository configs. hence need run them both.


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -