I am attending the advanced Maven training course offered by Sonatype today and tomorrow and thought I would just jot down my impressions while they are fresh. Last week I already got the training material and links to some awesome resources provided by Matthew McCullough.
The training started well, when Matt mentioned that he thinks deleting a line of code improves the code you are working on. I totally agree and always found refactoring sessions that remove reams of code especially satisfying. Anyway without further ado here is a list of impression and little things I learned (or thought worth mentioning although I knew them already):
- Matthews examples on github are a great reference, Matthew even used the break to push another enhancement to it based on a question
- properties are resolved by Maven core before they are passed into a plugin (e.g. when used in plugin configuration) and is therefore totally transparent to the plugin
- profiles themselves are not inherited. Only the results are…
- it is amazing how much you can theoretically configure the build with profiles and then lock things down with plugin/dependency management and the enforcer plugin – for heavy regulated environments or tight requirements this is ideal
- in my opinion optional dependencies are nice, but I prefer adding them all in and then users can always use excluded to get rid of unused ones, less potential for screw ups
- version numbers that don’t follow the standard naming convention (one, two or three digits) are dangerous when using ranges since string compare is used then.. (e.g. 126.96.36.199 > 188.8.131.52 !!)
- the maven-archetype-site archetype looks pretty good, I hope this gets ported to Maven 3 reporting/site usage
So far this has been really good. I am looking forward to tomorrow..