Why not just use a top-level POM’s dependencyManagement section, in conjunction with top-level POM-defined properties if desired, to control the dependency versions?
> On Oct 10, 2017, at 6:56 AM, Bikash Chandra Barad > <[email protected]> wrote: > > Hi Russell, > > I am not using it as import. > > POM > ==== > > <project> > <groupId>org.sonatype.mavenbook</groupId> > <artifactId>persistence-deps</artifactId> > <version>1.0</version> > <packaging>pom</packaging> > <dependencies> > <dependency> > <groupId>org.hibernate</groupId> > <artifactId>hibernate</artifactId> > <version>${hibernateVersion}</version> > </dependency> > <dependency> > <groupId>org.hibernate</groupId> > <artifactId>hibernate-annotations</artifactId> > <version>${hibernateAnnotationsVersion}</version> > </dependency> > <dependency> > <groupId>org.springframework</groupId> > <artifactId>spring-hibernate3</artifactId> > <version>${springVersion}</version> > </dependency> > <dependency> > <groupId>mysql</groupId> > <artifactId>mysql-connector-java</artifactId> > <version>${mysqlVersion}</version> > </dependency> > </dependencies> > <properties> > <mysqlVersion>(5.1,)</mysqlVersion> > <springVersion>(2.0.6,)</springVersion> > <hibernateVersion>3.2.5.ga</hibernateVersion> > <hibernateAnnotationsVersion>3.3.0.ga</hibernateAnnotationsVersion> > </properties> > </project> > > Adding dependencies > ================= > > <project> > <description>This is a project requiring JDBC</description> > ... > <dependencies> > ... > <dependency> > <groupId>org.sonatype.mavenbook</groupId> > <artifactId>persistence-deps</artifactId> > <version>1.0</version> > <type>pom</type> > </dependency> > </dependencies> > </project> > > Regards, > Bikash Chandra > > -----Original Message----- > From: Russell Gold [mailto:[email protected]] > Sent: Tuesday, October 10, 2017 5:13 PM > To: Maven Users List <[email protected]> > Subject: Re: Need to pass properties to the dependency POM file > > Sounds as though you may want to use “import” scope > https://urldefense.proofpoint.com/v2/url?u=https-3A__maven.apache.org_guides_introduction_introduction-2Dto-2Ddependency-2Dmechanism.html&d=DwIGaQ&c=RoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&r=Ql5uwmbofQMW0iErugdCnFgO-CBGr_pt_OzwdxJosG0&m=55zhnJWrLDMAiuaB5pm9kC5cwEZ5DXWtGS3Rkle3obI&s=9YuWlEsrF5dB0MfahK--TN8Ud68aWuMMoilCQf6XGMA&e= > > >> On Oct 10, 2017, at 7:26 AM, Bikash Chandra Barad >> <[email protected]> wrote: >> >> Hi, >> >> I am trying to grouping the dependencies into a pom(pom-deps.pom)file and >> adding that pom file as a dependency in my project. >> I need to substitute the properties of the dependency pom file(pom-deps.pom) >> to get the latest version dependencies, like parent POM, from the >> dependency POM, in my project. >> Is it possible to do so? >> >> >> Regards, >> Bikash Chandra >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
