LDSTechForumProjects

Maven and Stack Starter

« Back to Java Stack Training

This training provides some basic knowledge about Maven and how it works. Because Java Stack 3 makes less assumptions about your project's build configuration a greater knowledge of Maven itself is vital to get the most out of development using the Java Stack Tools. By the end of this training you should have a rudimentary understanding of a Java Stack Template's build configuration and how to customize this configuration.

Prerequisites

  • Must have previously completed the Introduction to the Java Stack training.
  • Must have previously completed the Introduction to Maven training.
  • Much of the presentation assumes you have gone through the Intermediate Maven training previously. Knowledge from those 2 presentations is probably required in order to complete the labs in this presentation. However, good information about Maven and Stack Starter templates can be gleaned from the presentation without having gone through the Intermediate Maven.
  • Basic knowledge of Java language.
  • Basic knowledge of XML syntax and structure.
  • A workstation running Windows, Linux, or Mac OS.
  • A desire to learn.

Outline

Common Maven Plugins

  • Useful Maven Plugins

Stack Master

  • Introduce Stack Master
  • Configurations
  • Dependencies
  • Plugins

Stack Starter

  • Review Stack Starter
  • Stack Starter Modules
  • Stack Starter Profiles

Slide Deck

Media:MavenAndStackStarter.ppt‎

Useful Plugins Presentation

Get Adobe Flash player

Lab 1 Useful Plugins

Practice navigating documentation for Maven Plugins. Accomplish the following tasks:

  • Find the configuration value(s) that would tell the compiler to build a Java 1.5 compatible class.
  • Find out about the GroupId, ArtifactId, and latest version of a Maven 2 plugin that generates taglib docs.
  • Find the documentation on how you might merge xml files of jars when using the Maven Shade Plugin.
  • What Pseudo I18n goal doubles the consonants of a translation?

Lab 1 Solution

Get Adobe Flash player

Stack Master Presentation

Get Adobe Flash player

Lab 2 Stack Master

Build a new project from Stack Starter

Build a new Stack project from Java Stack Starter.

  1. Choose Web Application Give the project a name, directory, etc., and click Next
  2. Under the Service Layer section change Database platform: embedded
  3. Click Next
  4. Click Build

Import this new project into your LDSTech IDE. How to do this can be found in Lab 3 of our Introduction Training.

  • Build your new Stack application by invoking clean install.

Discover Dependency Versions

Show that you know how to discover dependency information from Stack Starter by figuring out the version of CXF that the stack supports for your application.

Plugin Configuration

In this section we will practice finding plugin configuration in Stack Master.

Make your web project's ExampleIT test fail on purpose by adding the following to the testManageExample test method.

org.testng.Assert.fail();

Confirm your test is failing by building your web project install. Because by default integration test failures don't fail the build the build won't fail. However, you should see in the logs that a test has failed.

Now try and find a property that will make it so that integration test failures will fail the build. Confirm you have the correct property by seeing if the build fails when you use it.

Lab 2 Solution

Get Adobe Flash player

Stack Starter Presentation

Get Adobe Flash player

Lab 3 Stack Starter

Attempt to figure out how to build your stack starter project without executing tests and without doing an embedded deploy.

Create a custom profile that will automatically disable executing tests and deploying the application.

Make this profile enabled by default.

Lab 3 Solution

There is no solution video for this lab. Think of it as your final exam. :)

« Back to Java Stack Training

This page was last modified on 12 July 2013, at 19:13.

Note: Content found in this wiki may not always reflect official Church information. See Terms of Use.