1 Reply Latest reply on Nov 11, 2011 10:34 AM by Rob Cernich

    Error bumping version in tools repository

    Keith Babo Master

      @Rob - I'm trying to bump the pom versions in the tools repository for our CR1 build and hitting this error:

       

      [INFO] ------------------------------------------------------------------------
      [INFO] Reactor Summary:
      [INFO] 
      [INFO] SwitchYard: Tools Parent .......................... SUCCESS [1.230s]
      [INFO] SwitchYard: Eclipse Tools Parent .................. SUCCESS [0.323s]
      [INFO] SwitchYard: Eclipse Tools Plugins ................. SUCCESS [0.017s]
      [INFO] SwtichYard: Eclipse Tools Plugin .................. FAILURE [0.209s]
      [INFO] SwtichYard: Eclipse XSD Catalog ................... SKIPPED
      [INFO] SwitchYard: Eclipse M2E Extensions ................ SKIPPED
      [INFO] SwitchYard: Eclipse Tools Core Plugin ............. SKIPPED
      [INFO] SwtichYard: Eclipse Tools UI Plugin ............... SKIPPED
      [INFO] SwitchYard: Eclipse Tools Test Plugins ............ SKIPPED
      [INFO] SwitchYard: Eclipse M2E Extensions Plugin Tests ... SKIPPED
      [INFO] SwitchYard: Eclipse Tools UI Plugin Tests ......... SKIPPED
      [INFO] Switchyard: Eclipse Tools Features ................ SKIPPED
      [INFO] SwtichYard: Eclipse Tools Feature ................. SKIPPED
      [INFO] SwtichYard: Eclipse Tools Update Site ............. SKIPPED
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 27.106s
      [INFO] Finished at: Fri Nov 11 08:19:00 EST 2011
      [INFO] Final Memory: 40M/85M
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.eclipse.tycho:tycho-packaging-plugin:0.12.0:validate-version (default-validate-version) on project org.switchyard.tools: OSGi version 0.3.0.qualifier in META-INF/MANIFEST.MF does not match Maven version 0.3.0.CR1 in pom.xml -> [Help 1]
      

       

      As background, here's the change being made to the pom:

       

      org.switchyard.tools$ git diff pom.xml
      diff --git a/eclipse/plugins/org.switchyard.tools/pom.xml b/eclipse/plugins/org.switchyard.tools/pom.xml
      index 685173c..d0d0f22 100644
      --- a/eclipse/plugins/org.switchyard.tools/pom.xml
      +++ b/eclipse/plugins/org.switchyard.tools/pom.xml
      @@ -4,7 +4,7 @@
         <parent>
           <groupId>org.switchyard.tools</groupId>
           <artifactId>switchyard-tools-eclipse-plugins</artifactId>
      -    <version>0.3.0-SNAPSHOT</version>
      +    <version>0.3.0.CR1</version>
           <relativePath>../pom.xml</relativePath>
         </parent>
         <artifactId>org.switchyard.tools</artifactId>
      
        • 1. Re: Error bumping version in tools repository
          Rob Cernich Master

          Hey Keith,

           

          Yep.  It's not that simple.  Tycho merges Eclipse/OSGi dependency management with Maven.  The problem here is that the Eclipse/OSGi identifiers do not match the identifiers in the POM.  To fix this, the versions also need to be updated in the MANIFEST.MF files.

           

          Having said that, for Eclipse projects, the "build" bit of the version identifier is usually populated with a timestamp or build number, which is where that ".qualifier" comes into play.  The Tycho packaging plugin will populate that field during the build (see the format element in the tycho-packaging-plugin configuration in tools/eclipse/pom.xml; there's also a Hudson specific profile that includes the Hudson build number).

           

          So, two options here:

          # update the manifests by replacing qualifier with CR1.  This means all builds will have the same version from here forward (until the version gets bumped again).

          # make like the other JBT projects and add a "${BUILD_ALIAS}" to the qualifier string.  This property would need to be defined in either the POM and/or set in Hudson.

           

          Feel free to ping me on IRC.

           

          Hope that helps.

          Rob