Dependency Versions - Makeover

Lukas Krejci lkrejci at redhat.com
Fri Mar 15 17:13:56 UTC 2013


What about a BOM to contain the deps? Just to separate them out of the root pom and have a dedicated file to contain only the dep versions.
Not sure if an imported BOM is inherited by the child modules (so that we don't have to import the BOM in every module).

http://stackoverflow.com/questions/6281422/clean-up-maven-dependency-management

This is essentially the same as your current proposal, the only change is the dedicated file for dep version declarations to keep the sizes of the "real" poms down to the minimum making them easier to comprehend.

----- Original Message -----
> From: "Stefan Negrea" <snegrea at redhat.com>
> To: rhq-devel at lists.fedorahosted.org
> Sent: Friday, March 15, 2013 5:59:29 PM
> Subject: Re: Dependency Versions - Makeover
> 
> So the plan would be:
> 
> 1) Properties with versions in root pom:
> <jboss-jmx.version>4.2.3.GA</jboss-jmx.version>
> 
> 2) Root pom will have dependencies with versions in
> dependencyManagement section:
> <dependency>
>   <groupId>jboss</groupId>
>   <artifactId>jboss-jmx</artifactId>
>   <version>${jboss-jmx.version}</version>
> </dependency>
> 
> 3) Root pom will have plugins with versions in pluginManagement
> section (build/pluginManagement):
> <plugin>
>   <groupId>org.codehaus.mojo</groupId>
>   <artifactId>clirr-maven-plugin</artifactId>
>   <version>${clirr.version}</version>
> </plugin>
> 
> 4) All submodules would use plugins and dependencies without version:
> <dependency>
>   <groupId>antlr</groupId>
>   <artifactId>antlr</artifactId>
>   <scope>provided</scope>
> </dependency>
> 
> <plugin>
>   <groupId>org.codehaus.mojo</groupId>
>   <artifactId>clirr-maven-plugin</artifactId>
>   ....
> </plugin>
> 
> 
> The versions to be extract in properties would be the full name of
> the dependency/plugin + version. For example:
> clirr-maven-plugin.version and not the current clirr.version.
> 
> I really like this because we will have a single pattern for
> dependencies. Only one rule to follow.
> 
> 
> 
> Thank you,
> Stefan Negrea
> 
> 
> 
> ----- Original Message -----
> > From: "John Mazzitelli" <mazz at redhat.com>
> > To: rhq-devel at lists.fedorahosted.org
> > Sent: Friday, March 15, 2013 11:39:15 AM
> > Subject: Re: Dependency Versions - Makeover
> > 
> > > So you would rather see all the dependencies declared in the
> > > dependencyManagement section of the root pom of the project? And
> > > then apply the option 2 from below across all the sub-modules?
> > > The
> > > only concern that I have with this option is that we will have a
> > > huge!! section for dependency management. Aside from the huge
> > > section in the root pom I think it is a cleaner approach.
> > 
> > I like the idea of having everything like this defined in one place
> > (the root pom). If its large, so be it. The alternative is going
> > through our large set of poms to adjust things that we need.
> > _______________________________________________
> > rhq-devel mailing list
> > rhq-devel at lists.fedorahosted.org
> > https://lists.fedorahosted.org/mailman/listinfo/rhq-devel
> > 
> _______________________________________________
> rhq-devel mailing list
> rhq-devel at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/rhq-devel
> 


More information about the rhq-devel mailing list