Profile

Cover photo
Willhelm Lehman
Works at Websense
Lives in Aleea Resita D, Bucharest, Romania
22 followers|38,407 views
AboutPostsPhotosYouTube

Stream

Willhelm Lehman

Shared publicly  - 
 
Learning Apache Maven 3

Course: http://bit.ly/1kvveqf – Youtube preview:  http://bit.ly/19eFCkG

Disclosure: I was given this video for free to review it.

Introduction

Maven is an often misunderstood topic; often because it is not properly studied. There are a number of books on the topic which often help. However, a video introduction to the topic is perhaps more beneficial as it offers a simulated “live” approach to teaching Maven. In this review I had a closer look at Packt Publishing’s “Learning Apache Maven 3.”

The course is divided in 4 sections – starting with the basics and ending with advanced topics such as multi-modules projects. In my review, I have reviewed each section and divided my review by each section.

Course review

Section 1 of this presentation starts with the very basics. Installing Maven on Windows, OS X and Linux (Ubuntu). The how to download Maven info is repeated on each of the above mentioned operating system; so you can listen to the section concerning your operating system. The first section ends with with the installation on 3 Integrated Development Editors (IDEs); namely Eclipse, Netbeans and IntelliJ IDEA. Each IDE receives a proper coverage from downloading the IDE itself to integrating Maven plugin (only Eclipse needs to have the Maven plugin installed – and this is highlighted in the screencasts). One thing to note about the IDE section is that the instructions tend to be focused on the Windows side. So pay attention to the instructions and be mindful that the Maven environment variable approach is not applicable outside of Windows.

Section 2 dives into Maven functionality by creating a simple project from the command line followed by examples of the above mentioned IDEs (Eclipse, Netbeans and IntelliJ IDEA). The command line approach is similar to the one found at http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html. The initial command line generation is preempted by a short introduction to how Maven Archetypes work via goals. This is an important step to Maven presentations because goals are at the core of Maven fundamentals so it is good that the video presentation introduces this concept early in the presentation. The project coordinates are mentioned in the video introduction; namely ‘’groupId’, artifactId’, and ‘version’ – those will be constantly repeated throughout the course. The sample command line is created using the filter option as in “mvn archetype:generate -Dfilter=maven-archetype-quickstart” – thise, of course, helps avoid the immense number of archetypes available by default. Upon completion of the first example the import to Eclipse is shown followed by how to run the newly generated project in Eclipse.

In the context of the Eclipse IDE the testing with maven is introduced. To start with the project structure is quickly explained and to further improve on this knowledge the maven central documentation is referenced for this topic via http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html. Of note; during this test topic is that JUnit 3.8.x is used to exemplify integrated unit testing with Maven. A very short example on how to generate a unit test is shown.

Section 2 closes with a review of all core concepts discussed in the creation of the sample application, namely; maven plugin, maven plugin goals, maven lifecycle, maven lifecycle phase, maven project coordinates as well as maven project object model (POM). The maven plugins are well explained and the globally available maven plugins are referenced via http://maven.apache.org/plugins/. A very good explanation is given in regards to what Maven includes in the ‘default’ install. That is before any Maven plugins are installed. This is often a good point to make especially when dealing with Configuration Management (CM) integration where CM engineers are often confused as to what it means to install Maven. Lifecycle of maven is well covered explained with a highlight of Maven reference at http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html. This section could have used a bit more detail instead of the brief readout of the maven output. The effective-pom (‘mvn help:effective-pom’) command is introduced and also referenced via http://maven.apache.org/plugins/maven-help-plugin/effective-pom-mojo.html. What is missing from this part is the in-depth explanation of phases. Instead of reading the screen it would have been beneficial to explain what each section does and why is it called rather than saying this plugin depends on that plugin or this plugin executes the following plugins.This section does however include some very good information for the beginner or uninformed on how Maven works and it would be very beneficial for the beginner and perhaps the seasoned Maven user. It is good section which can be used “debug” a maven pom for a given project.

Section 3 traverses the creation of an application from a simple web application to a fully functional Java application with Struts 2 as the front end, Hibernate as the persistence layer and Spring as the business layer. To start with the m2e-wtp plugin is introduced (http://www.eclipse.org/m2e-wtp/). As a means to introduce the creation of a simple web app the maven-archetype-webapp is used as an example. The sample created is exemplified through Eclipse IDE and once compiled the example is executed through Tomcat. Once ran the lifecycle is shown for maven-archetype-webapp plugin. A side by side highlight comparison of maven-archetype-webapp and maven-archetype-quickstart projects is also shown and the main difference; namely the packaging phase (war vs jar). The effective-pom is also discussed in the context of the web app.

Section 3 continues with adding the Struts 2 dependency to the sample web app created at the beginning of the section. In this context a number of important topics are discussed; namely: Maven Dependency Scope, Maven Transitive Dependencies, Maven Transitive Dependency Scope, Maven Dependency Management Element, Maven Dependency Exclusion and Maven Optional Dependencies. Along the way searching for dependencies is mentioned via http://search.maven.org/ (although http://mvnrepository.com/ is not mentioned). mvn dependency:tree command is used to introspect the dependencies for the Struts 2 project. In this context the course also teaches the listener about overriding transitive dependencies with the desired dependency versions. Although the main goal of the course is to teach the viewer how to use Maven each project creation will provide a high level overview of other skills such as Spring, Struts2 and Hibernate. Reference to each technology is annotated with where to obtain more information on each technology introduced. The Hibernate screencast shows how to integrate Hibernate into the project via Spring ORM using Maven.  As a good practice in the Spring screencast Maven properties are used to simplify dependency versions. Although Spring JAR dependencies used are version 3.0.5 the Spring code is 2.5.x.

Section 4 moves to the multi-module applications. Maven ‘reactor build order’ receives a proper coverage and is exemplified using Eclipse. The client screencast uses wsimport which is documented by Oracle at http://docs.oracle.com/javase/6/docs/technotes/tools/share/wsimport.html. Multi-module optimization is covered and variables such as ${project.groupId} and ${project.version} are used to show how to optimize and potentially avoid topographical mistakes when referencing a parent project. Dependency management optimization receives a good coverage and in this section the dependency management element is covered by showing how to use the parent project to centralize dependencies.

What is not covered

Maven settings.xml does not receive any coverage. Topics such as adding repositories via settings.xml is obviously not covered.
Running Maven offline is not covered.
Integrating Ant with maven is not covered.
The compiler plugin does not receive coverage on the configuration and how to reference specific versions such as 1.7 as a means to avoid the default Java version.
Not covered in the videos is the Maven site creation.
Missing from the videos is the Maven Repositories view in Eclipse. This is an important topic which should be highlighted as an alternative to searching for dependencies on the main Maven repository sites.
Transcripts; It would have been beneficial to have a transcript of the video as some of the information provided is referential and important to revisit after viewing the videos.
Notes on the screencasts:

Of note is the sound quality changes. Though not very significant the sound jumps are noticeable. Screencast 4.1 had a small sound defect – though it does not affect the overall screencast. The defect could be related to my download.
Maven 3.0.5 is discussed but the video applies nicely to all Maven 3.x releases and for the most part 2.x releases.
The course reader is obviously not a Java developer. At times the reader makes reading mistakes such as calling the Java package as packaging. To the attentive viewer those are indistinguishable minor details; but they are worth mentioning in this review.
Bottom line:

The course level is beginner to intermediate

The question is this. Would this video help teach or enhance your Maven skills. If you are an absolute beginner, the answer is a clear yes. Overall the videos, although robotic at times, do teach the viewer how to effectively use Maven. For the beginner the videos are perhaps the most effective as the knowledge for a beginner is stressed throughout the videos. A seasoned Maven user will perhaps benefit from the well structured Maven topics which do serve as a good review of Maven topics. Along the way several other skills are highlighted; of note are: Eclipse, Struts2, Spring and Hibernate. This approach enhances the course. What remains are the sections in the “what is not covered” – if those are added, the course would perhaps become more accessible to advanced users as well.
2

Willhelm Lehman

Shared publicly  - 
 
This beats assfacebook!
1
In their circles
21 people
Have them in circles
22 people
Doug Serres's profile photo
Glenn Buckholtz's profile photo
Eyal Lupu's profile photo
Cheryl Venters's profile photo
 
Buy One, Get One Free on all of #Packt’s 2000 eBooks! http://bit.ly/1j26nPN #Packt2k
1

Willhelm Lehman changed his profile photo.

Shared publicly  - 
 
Willhelm Lehman changed his profile photo.
1

Willhelm Lehman changed his profile photo.

Shared publicly  - 
 
Willhelm Lehman changed his profile photo.
1
Willhelm Lehman's profile photo
 
Hello google man
People
In their circles
21 people
Have them in circles
22 people
Doug Serres's profile photo
Glenn Buckholtz's profile photo
Eyal Lupu's profile photo
Cheryl Venters's profile photo
Places
Map of the places this user has livedMap of the places this user has livedMap of the places this user has lived
Currently
Aleea Resita D, Bucharest, Romania
Work
Employment
  • Websense
    present
Links