Home > Articles > Programming

  • Print
  • + Share This
Like this article? We recommend

Duplication is Wasteful

To avoid any duplication of configuration settings, I created a project.xml file in the common directory. This file has all the settings that are common among all of the subprojects:

<project>
 <pomVersion>3</pomVersion>
  <groupId>zarrastudios</groupId>
  <artifactId>example</artifactId>
  <currentVersion>1.0</currentVersion>
  <organization>
   <name>Zarra Studios</name>
   <url>http://www.zarrastudios.com</url>
  </organization>

  <dependencies>
   <dependency>
    <groupId>log4j</groupId>
    <artifactId>log4j</artifactId>
    <version>1.2.8</version>
   </dependency>
  </dependencies>

  <build>
   <sourceDirectory>src/java</sourceDirectory>
  </build>
</project>

Each subproject now extends off of this project.xml file and automatically gains all the settings that are contained therein.

  • + Share This
  • 🔖 Save To Your Account