1 Reply Latest reply on Sep 28, 2011 1:22 PM by kcbabo

    Project pom guidelines

    mageshbk

      A recent review of the poms across core, components, release made me think that we are very inconsistent in declaring dependencies. Dependencies should not be added with hard coded versions. It is mandatory to use properties as needed in the poms. The naming convention should follow "version." as a prefix followed by the name of the dependency.

      <properties>
          <version.junit>4.8.1</version.junit>
          <version.xmlunit>1.1</version.xmlunit>
          <version.log4j>1.2.14</version.log4j>
          <version.maven.plugin.api>3.0.2</version.maven.plugin.api>
          <version.protostuff>1.0.0</version.protostuff>
          <version.mockito>1.8.5</version.mockito>
      </properties>
      

       

      And its usage elsewhere

      <dependency>
          <groupId>xmlunit</groupId>
          <artifactId>xmlunit</artifactId>
          <version>${version.xmlunit}</version>
          <scope>test</scope>
      </dependency>
      

       

      This enables us to search across poms for the usage of dependency properties easily, consolidate them if necessary in one place.

       

      Let me know if you guys have any issues with this.

        • 1. Re: Project pom guidelines
          kcbabo

          Sorry for the late reply.  Forum notifications must be messed up again.

           

          Properties should always be used for versions and dependencies should be tracked in the parent pom for each repository (not everything in the top-level parent) in the dependency management section.