You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by Jarek Gawor <jg...@gmail.com> on 2008/05/15 21:17:47 UTC

Re: svn commit: r656788 - /geronimo/server/trunk/pom.xml

Jason,

Can you explain why?

Jarek

On Thu, May 15, 2008 at 2:46 PM,  <jd...@apache.org> wrote:
> Author: jdillon
> Date: Thu May 15 11:46:43 2008
> New Revision: 656788
>
> URL: http://svn.apache.org/viewvc?rev=656788&view=rev
> Log:
> STOP using properties to define versions for dependencies!!!!
>
> Modified:
>    geronimo/server/trunk/pom.xml
>
> Modified: geronimo/server/trunk/pom.xml
> URL: http://svn.apache.org/viewvc/geronimo/server/trunk/pom.xml?rev=656788&r1=656787&r2=656788&view=diff
> ==============================================================================
> --- geronimo/server/trunk/pom.xml (original)
> +++ geronimo/server/trunk/pom.xml Thu May 15 11:46:43 2008
> @@ -67,8 +67,10 @@
>         <geronimoSchemaVersion>1.2</geronimoSchemaVersion>
>
>         <!--
> -        Having a single well named version properties makes automatic updating for the weekly build much easier.
> +        FIXME: STOP using properties for dependency versions unless you absolutly need them,
> +               ie. you have a hundred dependencies that all use the same version.
>         -->
> +
>         <openejbVersion>3.1-SNAPSHOT</openejbVersion>
>         <yokoVersion>1.0-SNAPSHOT</yokoVersion>
>         <derbyVersion>10.2.2.0</derbyVersion>
> @@ -83,10 +85,6 @@
>         <plutoVersion>1.1.6-G643117</plutoVersion>
>         <openjpaVersion>1.0.2</openjpaVersion>
>         <xbeanVersion>3.3</xbeanVersion>
> -        <gmavenVersion>1.0-rc-1</gmavenVersion>
> -        <minaVersion>1.1.6</minaVersion>
> -        <slf4jVersion>1.5.0</slf4jVersion>
> -        <groovyVersion>1.5.6</groovyVersion>
>         <wadiVersion>2.0-SNAPSHOT</wadiVersion>
>
>         <!-- Deployers -->
> @@ -484,25 +482,25 @@
>             <dependency>
>                 <groupId>org.slf4j</groupId>
>                 <artifactId>slf4j-api</artifactId>
> -                <version>${slf4jVersion}</version>
> +                <version>1.5.0</version>
>             </dependency>
>
>             <dependency>
>                 <groupId>org.slf4j</groupId>
>                 <artifactId>slf4j-simple</artifactId>
> -                <version>${slf4jVersion}</version>
> +                <version>1.5.0</version>
>             </dependency>
>
>             <dependency>
>                 <groupId>org.slf4j</groupId>
>                 <artifactId>slf4j-log4j12</artifactId>
> -                <version>${slf4jVersion}</version>
> +                <version>1.5.0</version>
>             </dependency>
>
>             <dependency>
>                 <groupId>org.slf4j</groupId>
>                 <artifactId>jcl104-over-slf4j</artifactId>
> -                <version>${slf4jVersion}</version>
> +                <version>1.5.0</version>
>             </dependency>
>
>             <dependency>
> @@ -1378,25 +1376,25 @@
>             <dependency>
>                 <groupId>org.codehaus.groovy.maven</groupId>
>                 <artifactId>gmaven-mojo</artifactId>
> -                <version>${gmavenVersion}</version>
> +                <version>1.0-rc-1</version>
>             </dependency>
>
>             <dependency>
>                 <groupId>org.codehaus.groovy.maven.runtime</groupId>
>                 <artifactId>gmaven-runtime-default</artifactId>
> -                <version>${gmavenVersion}</version>
> +                <version>1.0-rc-1</version>
>             </dependency>
>
>             <dependency>
>                 <groupId>org.codehaus.groovy.maven.support</groupId>
>                 <artifactId>slf4j-gossip</artifactId>
> -                <version>${gmavenVersion}</version>
> +                <version>1.0-rc-1</version>
>             </dependency>
>
>             <dependency>
>                 <groupId>org.codehaus.groovy</groupId>
>                 <artifactId>groovy-all-minimal</artifactId>
> -                <version>${groovyVersion}</version>
> +                <version>1.5.6</version>
>             </dependency>
>
>             <dependency>
> @@ -1481,13 +1479,13 @@
>             <dependency>
>                 <groupId>org.apache.mina</groupId>
>                 <artifactId>mina-core</artifactId>
> -                <version>${minaVersion}</version>
> +                <version>1.1.6</version>
>             </dependency>
>
>             <dependency>
>                 <groupId>org.apache.mina</groupId>
>                 <artifactId>mina-filter-ssl</artifactId>
> -                <version>${minaVersion}</version>
> +                <version>1.1.6</version>
>             </dependency>
>
>             <!-- Admin Console support -->
>
>
>

Re: svn commit: r656788 - /geronimo/server/trunk/pom.xml

Posted by Jason Dillon <ja...@planet57.com>.
On May 16, 2008, at 2:17 AM, Jarek Gawor wrote:
> Jason,
>
> Can you explain why?

Seems like I have to give this speech several times each year.  I have  
already sent numerous emails on the subject and spent a lot of time  
trying to get rid of these properties, which I'm sad to see slowly  
creeping back into the build.

The main problem is that using pom properties to manage versions of  
dependencies adds additional complexity to the build and makes it  
harder to actually see what versions of dependencies are being used  
when inspecting poms (because the version property can not live close  
to the dependency definition, when trying to understand the versions  
used, a lot of bouncing around in the pom is required).

A secondary problem is that once folks see there is a property for the  
version, they often keep re-specifying the version of dependencies  
instead of letting maven use its dependencyManagement configuration to  
resolve versions.  For example, take a look at how the ${dojoVersion}  
(and ${dojoLegacyVersion} properties are being used by server/trunk  
#656813.  You will find that each time one of the dojo artifacts is  
referenced its version is also specified, when the version should only  
be configured once in a dependenyManagement section.

This was one of the few properties which I had left in there before  
due to the build needing to know the version to unpack and include  
bits of the release archives into our dojo war files.

BUT, its not really needed, as we can figure out what the directory  
name is dynamically, making this property unnecessary.

Some of the other properties I had also left there, like the  
derbyVersion, since there is a bug in Maven making certain usage of  
dependencyManagement information unusable.  But overall I firmly  
believe that we should use Maven's dependencyManagement mechanism to  
manage all versions, and not dance around that by using properties, as  
was the norm with Maven 1.

Our top-level pom is already overly complicated with all of the  
dependencies used by various plugins.  It has become almost  
unmanageable.  Every once in a while I inspect it to look for  
problems, and often I find that folks have duplicated dependencies, or  
forgot to remove old dependencies, leaving the pom to grow out of  
control with junk.  Adding properties for the versions of each  
dependency will only compound that problem and make this file even  
more unmanageable.

--jason


>
> Jarek
>
> On Thu, May 15, 2008 at 2:46 PM,  <jd...@apache.org> wrote:
>> Author: jdillon
>> Date: Thu May 15 11:46:43 2008
>> New Revision: 656788
>>
>> URL: http://svn.apache.org/viewvc?rev=656788&view=rev
>> Log:
>> STOP using properties to define versions for dependencies!!!!
>>
>> Modified:
>>   geronimo/server/trunk/pom.xml
>>
>> Modified: geronimo/server/trunk/pom.xml
>> URL: http://svn.apache.org/viewvc/geronimo/server/trunk/pom.xml?rev=656788&r1=656787&r2=656788&view=diff
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> =====================================================================
>> --- geronimo/server/trunk/pom.xml (original)
>> +++ geronimo/server/trunk/pom.xml Thu May 15 11:46:43 2008
>> @@ -67,8 +67,10 @@
>>        <geronimoSchemaVersion>1.2</geronimoSchemaVersion>
>>
>>        <!--
>> -        Having a single well named version properties makes  
>> automatic updating for the weekly build much easier.
>> +        FIXME: STOP using properties for dependency versions  
>> unless you absolutly need them,
>> +               ie. you have a hundred dependencies that all use  
>> the same version.
>>        -->
>> +
>>        <openejbVersion>3.1-SNAPSHOT</openejbVersion>
>>        <yokoVersion>1.0-SNAPSHOT</yokoVersion>
>>        <derbyVersion>10.2.2.0</derbyVersion>
>> @@ -83,10 +85,6 @@
>>        <plutoVersion>1.1.6-G643117</plutoVersion>
>>        <openjpaVersion>1.0.2</openjpaVersion>
>>        <xbeanVersion>3.3</xbeanVersion>
>> -        <gmavenVersion>1.0-rc-1</gmavenVersion>
>> -        <minaVersion>1.1.6</minaVersion>
>> -        <slf4jVersion>1.5.0</slf4jVersion>
>> -        <groovyVersion>1.5.6</groovyVersion>
>>        <wadiVersion>2.0-SNAPSHOT</wadiVersion>
>>
>>        <!-- Deployers -->
>> @@ -484,25 +482,25 @@
>>            <dependency>
>>                <groupId>org.slf4j</groupId>
>>                <artifactId>slf4j-api</artifactId>
>> -                <version>${slf4jVersion}</version>
>> +                <version>1.5.0</version>
>>            </dependency>
>>
>>            <dependency>
>>                <groupId>org.slf4j</groupId>
>>                <artifactId>slf4j-simple</artifactId>
>> -                <version>${slf4jVersion}</version>
>> +                <version>1.5.0</version>
>>            </dependency>
>>
>>            <dependency>
>>                <groupId>org.slf4j</groupId>
>>                <artifactId>slf4j-log4j12</artifactId>
>> -                <version>${slf4jVersion}</version>
>> +                <version>1.5.0</version>
>>            </dependency>
>>
>>            <dependency>
>>                <groupId>org.slf4j</groupId>
>>                <artifactId>jcl104-over-slf4j</artifactId>
>> -                <version>${slf4jVersion}</version>
>> +                <version>1.5.0</version>
>>            </dependency>
>>
>>            <dependency>
>> @@ -1378,25 +1376,25 @@
>>            <dependency>
>>                <groupId>org.codehaus.groovy.maven</groupId>
>>                <artifactId>gmaven-mojo</artifactId>
>> -                <version>${gmavenVersion}</version>
>> +                <version>1.0-rc-1</version>
>>            </dependency>
>>
>>            <dependency>
>>                <groupId>org.codehaus.groovy.maven.runtime</groupId>
>>                <artifactId>gmaven-runtime-default</artifactId>
>> -                <version>${gmavenVersion}</version>
>> +                <version>1.0-rc-1</version>
>>            </dependency>
>>
>>            <dependency>
>>                <groupId>org.codehaus.groovy.maven.support</groupId>
>>                <artifactId>slf4j-gossip</artifactId>
>> -                <version>${gmavenVersion}</version>
>> +                <version>1.0-rc-1</version>
>>            </dependency>
>>
>>            <dependency>
>>                <groupId>org.codehaus.groovy</groupId>
>>                <artifactId>groovy-all-minimal</artifactId>
>> -                <version>${groovyVersion}</version>
>> +                <version>1.5.6</version>
>>            </dependency>
>>
>>            <dependency>
>> @@ -1481,13 +1479,13 @@
>>            <dependency>
>>                <groupId>org.apache.mina</groupId>
>>                <artifactId>mina-core</artifactId>
>> -                <version>${minaVersion}</version>
>> +                <version>1.1.6</version>
>>            </dependency>
>>
>>            <dependency>
>>                <groupId>org.apache.mina</groupId>
>>                <artifactId>mina-filter-ssl</artifactId>
>> -                <version>${minaVersion}</version>
>> +                <version>1.1.6</version>
>>            </dependency>
>>
>>            <!-- Admin Console support -->
>>
>>
>>