Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-7979

API versioning mechanism

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • 4.0.x-candidate, 4.0.0
    • API
    • None

    Description

      The way to go would be for maven to provide multiple versions of the api at the same time imho (in different classloaders of course). 
       
      So when maven 4.1.0 loads a plugin, if that plugin has been compiled with api in version A (and if the api version B is incompatible, of course, else, there's no point...), it will load the plugin with the api A.  if the plugin has been compiled with api version B, it will use the version B api to load the plugin, etc...  What exactly A and B are is irrelevant, only Maven has to know if they are compatible or not, and thus provide the correct one.   If we add stuff, the API is still compatible, so we can keep only the latest version.  The first time we make an incompatible change, we need to provide the two APIs in the new maven version.  This would allow an easy display of warning when loading "old" plugins and ask to update them.
       
      We don't even have to use the same number for the API version and for the maven release.  We could start at 1 and whenever a breaking change occurs, upgrade by 1.  This would be stored in the plugin.xml and handled transparently.

      We can even start with alpha releases and start releasing plugins using alpha apis.  The only point is that while in alpha, we would only support the latest API and not older ones, but at least, maven could safely identify plugins which use an older api.

      Attachments

        Activity

          People

            Unassigned Unassigned
            gnodet Guillaume Nodet
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: