Maven Questions - illyfrancis/scribble GitHub Wiki
There are three lifecycle phases:
- clean
- default
- site
And within each lifecylcle, there are multiple phases.
- clean
- pre-clean, clean, post-clean
- default
- validate, initialize, ... , compile, ... , test-compile, ... , test, ...
- package ...
- integration-test ...
- verify
- install
- deploy
- when invoking a goal, can it be skipped? E.g. can
testbe called without it invokingcompile? - for multi module projects, how does it manage dependencies between modules? does it
installsub modules first? - how does maven manage
SNAPSHOTetc versioning? what's the best practise? - not clear on built-in lifecycle bindings, refer to this
- What is WAR overlays? When to use it?
- how to publish source
- where to generate javadoc and produce artifacts
- Where to define remote repository and best practise?
- how to structure jenkins with maven for pipeline views
- usage of mvn release plugin, haven't had much use before
- see below
- can
classifierin coordinates be used to produce two builds of the same? refer to book 'definitive guide to maven' chapter 9.5.1
- Should build happen on the root project only?
- what about install and deploy?
- doesn't make sense to install EAR and also its JAR and WAR project?
- What about release process?
- how to manage application version number? is it different from
<version>? - how to keep the version number in sync when working in multi module projects?
- how about structure of the projects in VCS?
- aggeregate project belongin to trunk/branch/tags? or trunk/branch/tags then each projects underneath?
Given the lifecycle phases,
... -> compile -> test compile -> test -> package -> it -> verify -> install -> deploy
- How should we define the jobs in jenkins?
compile ... test? - Where should the static analysis jobs go? in between or a parallel jobs after compile?
- how does the user's name map to actual email address? via ldap? (active dir?)
- assuming a multi module projects, it would only make sense to build the top level project. But how to drive/trigger the top level build based on sub-module changes. Also does it make sense to have a separate job just for the sub modules?
- for example, if there's TOP, EAR, JAR and WAR and something in JAR changes. Should it trigger the build on TOP, EAR and WAR as well as it's own JAR project?
- http://stackoverflow.com/questions/9554688/maven-versioning-best-practices
- http://stackoverflow.com/questions/14605779/maven-best-way-to-change-snapshot-to-release-version-for-parent-child-modules-w?lq=1
-
versioning and release in multi projects
- the accepted answer doesn't look quite right to me though. what's the real purpose of using
<dependencyManagement>?
- the accepted answer doesn't look quite right to me though. what's the real purpose of using