In this sample program, we will use the build lifecycle, Maven repositories, dependency management and POM. The Maven Archetype plugin is a great tool that can be used to create your first sample program. It allows us to build a simple program using an existing prototype, in this case, the maven-archetype-quickstart which builds a simple hello world application including all the file structures and files needed for Maven.
- [Instructor] It's finally time for the rubber…to meet the road.…Let's create a sample program using Maven.…In this sample program we will use the build lifecycle,…Maven repositories, dependency management, and POM.…I'm running a Windows machine.…If you're using a Mac or Linux environment…your commands might be slightly different.…You wanna start by opening a command prompt,…and we're gonna run the Maven command…by typing in mvn for Maven,…space, archetype.…This is the plugin, and the goal will be generate.…
The generate goal for archetype creates a simple program…that is based on a template for the Hello World program.…Let's do -D.…We need to give it a group ID.…In this case, I'm gonna do com.lynda.…Next, I give it the artifact ID.…Remember, the artifact ID is what Maven will use…for the name of the project.…I'm gonna call it sample.…Now we wanna specify the archetyped artifact ID.…(chuckles) Say that five times fast.…
archetypeArtifactId.…And the artifact ID that I wanna use…is called maven-archetype-quickstart.…
- Downloading Maven
- Installing Maven
- Understanding the lifecycle and dependencies of Maven
- Working with the Project Object Model (POM)
- Defining project relationships
- Using Maven plugins
- Creating a sample project with Maven
- Writing tests in Maven
- Packaging your app
Skill Level Intermediate
Java Database Integration with JDBCwith David Gassner2h 51m Intermediate
Java EE Essentials: Enterprise JavaBeanswith Patrick Royal1h 45m Intermediate
1. Get Started with Maven
2. Understand Maven
3. Project Object Model (POM)
4. Maven Plugins
5. Create a Project with Maven
6. Test with Maven
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.