Grouping dependencies is one of the best practices. This can be done by creating a separate POM that simply declares a set of common dependencies. For example, every project that uses Hibernate has a dependency on the Spring Framework and a MySql JDBC driver. A second consideration regarding best practices is the difference between using inheritance and multi-module relationships.
- [Instructor] POM Best Practices.…Grouping dependencies is one of the best practices.…This can be done by creating a separate POM file…that simply declares a set of common dependencies.…For example, every project that uses Hibernate…has a dependency…on the Spring framework n at mysql.jdbc.Driver.…By grouping these dependencies,…we can create a separate external POM file.…That way, that file can be used for all projects…that have the same dependencies…as the one that you created using Hibernate.…
This approach allows other projects to reuse this file.…A second consideration regarding best practices…is the difference between using inheritance…versus a multi-module relationship.…There are projects that have components…that are totally unrelated to each other.…But together, they are required to make a larger project.…This is an example when you should use…a multi-module approach.…A reason to use inheritance occurs…when projects have shared dependencies.…For any programming language,…including the programming of the pom.xml file,…
- 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
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.