The project is built and released in two parts:
- The core product and Maven plugin are released using normal Maven release support
- The Eclipse feature is built with the Tycho Maven plugins, but doesn't use the regular Maven release support
- Get authorization to Sonatype and make sure your GPG key is setup and registered per instructions here: https://github.com/mybatis/committers-stuff/wiki/Release-Process
- Make sure your SSH key is setup at GitHub
- Create a Maven Central Publishing token if you don't have one, or it is expired:
- Logon to https://central.sonatype.com/
- Go to Profile, View User Tokens
- Generate a new token if you need to and add it to the maven settings file
- Make sure your Maven
settings.xmlfile is correct. At a minimum, it should contain the following:<settings> <servers> <server> <id>gh-pages-scm</id> <configuration> <scmVersionType>branch</scmVersionType> <scmVersion>gh-pages</scmVersion> </configuration> </server> <server> <id>central</id> <username>[tokenized user name]</username> <password>[tokenized password]</password> </server> </servers> </settings>
- Make sure the version numbers are updated in the runningWithMaven.xhtml page
- Make sure the GitHub issues and pull requests are associated with the GitHub milestone for this release.
- If you are on a Unix or Mac, then setup GPG to use the terminal when asking for your password:
export GPG_TTY=$(tty)
- Clone the main repo (with ssh), checkout the master branch, build the core product:
cd core ./mvnw release:prepare ./mvnw release:perform - Logon to https://central.sonatype.com/
- Go to Profile->View Deployments
- Verify everything looks OK
- Publish the deployment
- If you are on a Unix or Mac, then setup GPG to use the terminal when asking for your password:
export GPG_TTY=$(tty)
- Clone the update site repo and make a branch. e.g.:
git clone git@github.com:jeffgbutler/mybatis-generator-update-site.git cd mybatis-generator-update-site git switch -c mybatis-generator-2.0.0 - Clone the main repo and checkout the release tag. e.g.:
git clone https://github.com/mybatis/generator.git cd generator git checkout mybatis-generator-2.0.0 - Build the feature:
cd eclipse ./mvnw clean verify -Prelease-composite - Copy the newly generated site into your clone of the update site repo. e.g.:
cd org.mybatis.generator.eclipse.site/target/p2-composite-repo cp -R . ~/git/GitHub/jeffgbutler/mybatis-generator-update-site
- Commit, push, make a PR, etc.
- Logon to the eclipse marketplace and add the new release information
- Add the zipped site file from
org.mybatis.generator.eclipse.site/target/p2-composite-repo/zippedto the GitHub release page
- If the DTD has changed, then update it at https://github.com/mybatis/mybatis.github.io
- Make a Github Release that contains the Bundle and the Zipped Eclipse Site
- Update the version numbers in all the Eclipse projects with the tycho-versions plugin. For example:
git checkout master cd eclipse ./mvnw tycho-versions:set-version -DnewVersion=1.4.3-SNAPSHOT git add . git commit -m "Update Eclipse versions for new release" git push
The site will publish automatically as part of the release process. But you can do it independently too.
The following command will do a dry run of the site publishing process - you can use it to see what will be published:
./mvnw clean site scm-publish:publish-scm -Dscmpublish.dryRun=trueThis command will publish the site:
./mvnw clean site scm-publish:publish-scmIf you run into issues with the publishing process, then resetting the working directory can help:
sudo rm -r ~/maven-sitesTycho uses a cache to improve performance. This can cause issues if you try to release the Eclipse feature before the cache expires - you will notice that the "compositeArtifacts.xml" file does not reflect the entire set of releases on the update site. There are two ways to handle this:
-
Disabling Maven caching sometimes works:
./mvnw clean verify -Prelease-composite -U
-
If this fails, then manually clear the cache:
rm -r ~/.m2/repository/.cache/tycho