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 ?)
Code Block |
---|
title | CheckoutSourcesPlugin.java |
---|
borderStyle | solid |
---|
|
checkoutSources( ScmInformation scmInformation, ProjectInformation projectInformation )
|
Code Block |
---|
title | ScmInformation.java |
---|
borderStyle | solid |
---|
|
getScmUrl();
getScmUserName();
getScmPassword();
|
Code Block |
---|
title | ProjectInformation.java |
---|
borderStyle | solid |
---|
|
// 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
Code Block |
---|
title | ContinuumBuildPlugin.java |
---|
borderStyle | solid |
---|
|
execute(ContinuumBuildContext continuumBuildContext)
|
Code Block |
---|
title | ContinuumBuildContext.java |
---|
borderStyle | solid |
---|
|
//like the already existing BuildContext
|
One interface for each phases
update-sources
Code Block |
---|
title | ContinuumUpdateSourcesPlugin.java |
---|
borderStyle | solid |
---|
|
execute(ProjectInformation projectInformation, ScmResult scmResult)
|
Note the default one will instantiate scmResult for the next ones
build-project.
Code Block |
---|
title | ContinuumUpdateSourcesPlugin.java |
---|
borderStyle | solid |
---|
|
execute(ProjectInformation projectInformation, ScmResult scmResult, BuildResult buildResult)
|
build-reports.
Code Block |
---|
title | ContinuumUpdateSourcesPlugin.java |
---|
borderStyle | solid |
---|
|
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.
Code Block |
---|
title | ContinuumUpdateSourcesPlugin.java |
---|
borderStyle | solid |
---|
|
execute(ProjectInformation projectInformation, ScmResult scmResult, BuildResult buildResult) (with a new parameter List<BuildReport> buildReports ?)
|
end-build.
Usefull ?
Code Block |
---|
title | ContinuumUpdateSourcesPlugin.java |
---|
borderStyle | solid |
---|
|
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.