Sample layout pom.xml for Java project

To make you get into Maven 2 project easily, let’s have a look to pom.xml general layout for Java project, here it is:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project xmlns="" 

    <name>Osify Training Sample</name>
    <description>Osify Training Sample</description>

	<prerequisites />






Sort explanation of each elements:

  • parent: Parent pom project if you have any main project to refer
  • repositories: You can fix some repositories directly in pom.xml but as recommended, you should use your settings.xml in .m2 directory for that
  • scm: Source Code/Control Management
  • properties: property variable to use in the pom.xml
  • depedencies: Your dependecy jars that you will use in your project
  • build :
    • resources
    • plugins

Full list explanation, you can find at

By osify

2 replies on “Sample layout pom.xml for Java project”

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.