DevDocPublishNewVersion - JUCMNAV/projetseg-update GitHub Wiki
Publishing a New Version
The following steps should be done on your project folders. Follow the steps in the order shown on this page. You may search for the bold text in the file to find the lines that need to be changed.
Step 1: Update the following files in seg.jUCMNav:
- META-INF/MANIFEST.FM
- Update Bundle-Version to the new version.
- build.xml
- Search for seg.jUCMNav_ and make a note of the old version. Then search for the old version and replace each occurrence with the new version.
- ccbuild.xml
- Verify that the pattern in format property="buildtime" is set correctly.
- Make a note of the old version in the value of condition property="jucmnav.version". Then search for the old version and replace each occurrence with the new version.
- Remove ${buildtime} from the value of condition property="jucmnav.version". Make sure the format of the version number is now N.N.N (e.g. 3.1.0).
- Commit and wait for CruiseControl to finish with building and testing the jUCMNav jar. Use "version N.N.N" as the commit comment (e.g., version 3.1.0). (IMPORTANT: make sure that the cruise control process is started on the cruise control server. If not, start it in the command shell as an administrator.)
- If in the command shell there is an exception saying that MANIFEST.FM file is not valid that causes the build to fail, simply replace this files with the same file from your current projet and commit again after.
- Login to CruiseControl 137.122.88.32:3389. When providing the username, you might need to prefix it with "SITE" (as in SITEdamyot).
- If cruise control does not update this folder: http://jucmnav.softwareengineering.ca/ccbuilds/public_html/artifacts/seg.jUCMNav/ you can copy manually the lastest built folder (e.g. 20140501155157) and the "latest" folder from C:\cruisecontrol-bin-2.8.4\artifacts\seg.jUCMNav to this directory. Then copy the "latest" folder in the link above to a new folder and name it after the new version. The format for the name of the new folder is N.N.N (e.g. 3.1.0). The above link points to the folder on cserg0 used by CruiseControl - connect to it by executing CruiseControl's map_ccbuilds.vbs (in directory C:\work\cruisecontrol on the server running CruiseControl). If you cannot execute the vbs file, then you may need to remote desktop to rda01 (IP address to be used if done through the VPN) and then map the cruisecontrol folder.
- ccbuild.xml
- Add ${buildtime} back to the value of condition property="jucmnav.version". Make sure the format of the version number is again N.N.${buildtime} (e.g. 3.1.${buildtime}). Commit again and verify that the name of the jar file generated by CruiseControl contains the standard time stamp. Use "version N.N.N (reverting ccbuild to standard naming convention)" as the commit comment (e.g., version 3.1.0 (reverting ccbuild to standard naming convention)).
Step 2: Update the following files in seg.jUCMNav.feature:
This project is supposed to automatically generate a whole lot of things but it only worked the first time. The problem is that the this project may override the plugin build system and makes everything fail. The project now only serves the purpose to create a jar file for the features folder of the seg.jUCMNav.updatesite project.
- feature.xml
- Working with the xml file directly, change the version in line 5 of the file to the new version.
- At the bottom of the file, update the version numbers of all plugins.
- build.xml
- Working with the xml file directly, change the version in line 5 of the file to the new version.
- If applicable, also update the pluginIds of other plugins such as UCEd or UCMScenarioViewer to a new version.
- Note that this build file is not working. We continue to make changes just in case there are unknown dependencies but the build file is never directly executed.
- Commit. Use "version N.N.N (feature)" as the commit comment (e.g., version 3.1.0 (feature)).
- Create the features jar:
- Create a temporary folder and copy feature.xml into the temporary folder.
- In a command shell, go to the temporary folder and type "jar cf seg.jUCMNav_N.N.N.jar feature.xml" with N.N.N replaced by the new version (e.g. 3.1.0).
- Verify that the jar file contains feature.xml and the folder META-INF and that META-INF contains MANIFEST.FM by typing "jar tf seg.jUCMNav_N.N.N.jar" in the command shell in the directory where the jar file is.
Step 3: Update the following files in seg.jUCMNav.updatesite:
- site.xml
- Working with the xml file directly, add a new feature entry by copying the latest one and changing the version numbers to the new version number.
- plugins folder
- Copy the jar file with the new version number generated by CruiseControl to the plugins folder (if applicable, also copy the jar files of other plugins to the plugin folder).
- features folder
- Copy the jar file you have created manually to the features folder.
- Commit. Use "version N.N.N (updatesite)" as the commit comment (e.g., version 3.1.0 (updatesite)).
- Copy site.xml as well as all added jar files to http://jucmnav.softwareengineering.ca/ccbuilds/updatesite. The above link points to the folder on cserg0 used by CruiseControl - connect to it by executing CruiseControl's _mapccbuilds.vbs. The link itself redirects to our home page.
- To be compatible with tools such as https://www.eclipse.org/tycho/, the update site must contain p2 metadata (content.jar and artifacts.jar). These files may be generated manually from the command shell directly on the cruise control server using this command:
cd c:\eclipse\plugins jucmnavCreateRepo.bat
(this script contains: C:\eclipse\plugins>java -jar org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar -application org.eclipse.equinox.p2.publisher.UpdateSitePublisher
-metadataRepository file:/R:/public_html/repository
-artifactRepository file:/R:/public_html/repository
-source R:/public_html/updatesite -compress
-publishArtifacts )
Make sure that C:\eclipse\configuration\org.eclipse.osgi\.manager\.fileTableLock is deleted before and after the script is executed. You may need to delete this file as admin (right-click menu).
Artifacts.jar and Content.jar generated in R:\public_html\repository must then be copied in R:\public_html\updatesite to replace the old ones.
not done anymore (Step 4: Tag the revision)
- Tag the head version of seg.jUCMNav project with the new version (essentially, make a copy of the head version in the tags folder in the repository). The format for the tag (name of the copy) is .../tags/vN_N_N (e.g. .../tags/v3_1_0). Use "version N.N.N" as the commit comment (e.g., version 3.1.0).
-- Main.PatriceBoulet - 07 Aug 2014