The goal is to refactoring continuum-core to remove :
- use of PlexusAction and the context Map which is a real nigthmare to debug ( ) and/or add improvment.
- easily add news feature (the plugin feature !)
Using a lifecycle "a la" maven
Why ?
- easily adding new phases (something to do in the start/middle/end of the build).
- attach plugins (a phase has a default plugin which is not possible to override)
Phases
Checkout Sources
A particular one checkout-sources ("a la" clean). possible to add plugins here ? (with a previous phase called prepare-checkout-sources ?)
checkoutSources( ScmInformation scmInformation, ProjectInformation projectInformation )
getScmUrl(); getScmUserName(); getScmPassword();
// defined constants m2,m1,ant,shell etc... short getType(); ProjectGroup getProjectGroup(); BuildDefinitionTemplate getBuildDefinitionTemplate(); // for non maven projects getName(); getVersion(); getName();
Build phases
- update-sources
- build-project
- deploy-artifacts
- build-reports
- send-notifications
- end-build ( ? )
A common interface for all phases or one for each phase
One for all
execute(ContinuumBuildContext continuumBuildContext)
//like the already existing BuildContext
One interface for each phases
update-sources
execute(ProjectInformation projectInformation, ScmResult scmResult)
Note the default one will instantiate scmResult for the next ones
build-project.
execute(ProjectInformation projectInformation, ScmResult scmResult, BuildResult buildResult)
build-reports.
execute(ProjectInformation projectInformation, ScmResult scmResult, BuildResult buildResult)
This phase will add some BuildReport bean (to define) in BuildResult as a List which will be available for next phases.
send-notifications.
execute(ProjectInformation projectInformation, ScmResult scmResult, BuildResult buildResult) (with a new parameter List<BuildReport> buildReports ?)
end-build.
Usefull ?
execute(ProjectInformation projectInformation, ScmResult scmResult, BuildResult buildResult) (with a new parameter List<BuildReport> buildReports ?)
Implementations details.
Common
Each phase will have a default implementation which cannot be override.
Attaching plugins to project build will be done at the build definition level. (easy to build some templates).
Each plugin will have an archetype.