Maven and Stack Starter
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.
- 1 Prerequisites
- 2 Outline
- 3 Slide Deck
- 4 Useful Plugins Presentation
- 5 Lab 1 Useful Plugins
- 6 Lab 1 Solution
- 7 Stack Master Presentation
- 8 Lab 2 Stack Master
- 9 Lab 2 Solution
- 10 Stack Starter Presentation
- 11 Lab 3 Stack Starter
- 12 Lab 3 Solution
- 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.
Common Maven Plugins
- Useful Maven Plugins
- Introduce Stack Master
- Review Stack Starter
- Stack Starter Modules
- Stack Starter Profiles
Useful Plugins Presentation
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
Stack Master Presentation
Lab 2 Stack Master
Build a new project from Stack Starter
Build a new Stack project from Java Stack Starter.
- Choose Web Application Give the project a name, directory, etc., and click Next
- Under the Service Layer section change Database platform: embedded
- Click Next
- 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.
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.
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
Stack Starter Presentation
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. :)