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:
- ensures no local modifications files in workspace
- edits poms set release version
- executes preparationgoals default "clean verify" ensure code can compiled , passes tests.
- commits modified poms
- creates vcs tag
- 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
- checks out fresh copy of source code using vcs tag release.properties default location of target/checkout
- 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:
- make jenkins checkout fresh copy of latest source code source repository
- configure preparationsgoals config element of release plugin "clean deploy"
- 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
Post a Comment