Search code examples
javamavenpom.xmlparent-pom

Version declaration in parent POM


Which is the suitable tag to declare version of dependencies used in child POM, i.e. Properties tag or DependencyManagement tag? What are their respective pros n con's? Is there any better way?


Solution

  • declare them as one of the property

    <properties>
       <commons.dbcp.version>somenumber</commons.dbcp.version>
    </properties>