[rules-dev] Declare your maven dependency <version> only in the droolsjbpm-parent pom

Geoffrey De Smet ge0ffrey.spam at gmail.com
Fri Sep 28 11:58:43 EDT 2012


Hi guys,

Some maven poms declare their dependency <version> in the pom itself. 
For example in guvnor-webapp-core (mea culpa):

     <dependency>
       <groupId>org.jboss.resteasy</groupId>
       <artifactId>resteasy-jaxrs</artifactId>
       <version>2.3.2.Final</version>
     </dependency>

The problem is that if other modules use the same dependency, they 
duplicate the version.
And in time, as the <version> in 1 module is upgraded, the other gets 
forgotten.

Why is this a problem?
Both modules unit test with their own version of the dependency,
but in production, when both modules are combined, only 1 version of the 
dependency can exist on the classpath.

Solution: don't declare dependency <version> in your poms, declare it in 
the droolsjbpm-parent pom.



More information about the rules-dev mailing list