fangfangli / cleartk

Automatically exported from code.google.com/p/cleartk
0 stars 0 forks source link

implement new versioning strategy #246

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
So we have two requirements for ClearTK versioning:

(1) We should be able to release each module independently
(2) When change the API in one module, you get obvious errors in dependent 
modules that also need to be changed

I believe that to achieve this we need to:

* Move all module versions out of the root pom.xml and into the individual 
module poms.
* Declare  a new module, say cleartk-release, that just declares the current 
version numbers for each module.
* Implement a maven plugin that will cause the build to fail whenever a cleartk 
module version is declared as something other than what is in cleartk-release.
* Whenever you start working on a module, you should then update the version in 
cleartk-release to your current SNAPSHOT version.

This should solve the independent-releases issue because each module now 
contains all the version information it needs.

This should also solve the seeing-errors-in-dependent-modules issue because you 
will be forced to update all dependent modules whenever you update the version 
of your module in cleartk-release.

As an added benefit, to direct someone to an official ClearTK release, we can 
just direct them to a specific version of cleartk-release.

I believe this will work (and it's basically what we talked about on the list) 
but I haven't implemented it yet (and don't have the time right now). But we 
definitely need to solve this problem before ClearTK 1.0.

Original issue reported on code.google.com by steven.b...@gmail.com on 28 Apr 2011 at 10:31

GoogleCodeExporter commented 9 years ago
Ok, I think I got this all working. See the attached diff. Here's what I did:

* Moved everything but the <modules> declaration out of the root pom.xml file.

* Added dependency versions to all the individual module pom.xml files.

* Created a cleartk-parent project which contains all the plugin configuration 
information (e.g. for JCasGen) and is the new parent for all the individual 
modules.

* Created a cleartk-release module which contains the current official versions 
of all the individual modules.

* Wrote a Maven plugin, consistent-versions-plugin, that checks all 
dependencies of all modules in a multi-module project and produces an error 
during "mvn verify" (the first maven phase) if any dependencies have different 
versions.

* Set up the root pom.xml file to invoke consistent-versions-plugin.

With this setup:

* We first need to release consistent-versions-plugin. We should only need to 
do this once ever.

* Then we should release cleartk-parent. We should only need to do this again 
when we want to update plugin versions or how JCasGen is run.

* Then we should release the various cleartk modules. We should first update 
their parent to the released cleartk-parent instead of the snapshot versions. 
That should leave all the cleartk modules with no snapshot dependencies, so 
each module can then be released independently.

* Finally, we should release cleartk-release, after setting all the cleartk 
module versions in the dependencyManagement section to the released versions. 
This module can then be used as a parent module for any user who wants to 
guarantee that they all their cleartk module versions match.

* When you start working on a module in the repository, you should set the 
version in cleartk-release to your current snapshot version. You can then run 
"mvn compile" at the top level, and the consistent-versions-plugin will tell 
you which other module versions you need to update.

Please try this out and let me know if it works for you. You'll need to "mvn 
install" from the consistent-versions-plugin directory before you can "mvn ..." 
from the top level.

Original comment by steven.b...@gmail.com on 4 May 2011 at 4:05

Attachments:

GoogleCodeExporter commented 9 years ago
Updated diff to current repository.

Original comment by steven.b...@gmail.com on 5 May 2011 at 9:08

Attachments:

GoogleCodeExporter commented 9 years ago
Updated diff to current repository.

Original comment by steven.b...@gmail.com on 10 May 2011 at 2:49

Attachments:

GoogleCodeExporter commented 9 years ago
Updated diff to current repository (r2908).

Original comment by steven.b...@gmail.com on 18 Sep 2011 at 4:09

Attachments:

GoogleCodeExporter commented 9 years ago
Second try.

Original comment by steven.b...@gmail.com on 18 Sep 2011 at 4:18

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by lee.becker on 18 Sep 2011 at 8:47

GoogleCodeExporter commented 9 years ago
Completed in r3371.

Original comment by steven.b...@gmail.com on 23 Oct 2011 at 9:31