...
Code Block | ||
---|---|---|
| ||
# Insure you have no changed files or files that are not being tracked
$ git status
# git stash if need be. If you have files not being tracked, those should be added first to have the stash
# remove from from the file system.
$ git checkout master
$ git pull upstream master
# Optional, check for updated dependencies
mvn versions:display-dependency-updates
# Verify project builds properly
$ mvn clean install license:check notice:check javadoc:javadoc
# fix any issues
# javadoc: Building with Java 8 often reports javadoc issues that did not occur when building with Java 7.
# It's strongly discouraged but for Java 8 javadocs issues, you can consider whether it is reasonable
# to add '-Xdoclint:none' as specified at the following to not run Xdoclint
# http://stackoverflow.com/questions/15886209/maven-is-not-working-in-java-8-when-javadoc-tags-are-incomplete
# Update: This did not work for me. The javadoc seemed to run twice. The first time OK and the second with errors
# despite mvn help:effective-pom showing that every merged instance had -Xdoclint:none set.
#
# Here is an approach that sets the parameter based on a profile activated when using Java 8+:
# <profiles>
# <profile>
# <id>disable-java8-doclint</id>
# <activation>
# <jdk>[1.8,)</jdk>
# </activation>
# <properties>
# <additionalparam>-Xdoclint:none</additionalparam>
# </properties>
# </profile>
# </profiles>
#
# license: If you get many error about license headers, the headers may have changed (this happened when Jasig
# became Apereo). Execute the command 'mvn license:format' to replace existing license headers with
# new license headers and commit the result. To update notices, run 'mvn notice:generate'.
# if need be, do git commit -m "NOJIRA pre-release prep"
$ mvn release:clean
$ mvn release:prepare
# Temporary: Verify maven release steps are committed. Look for commits like
# [maven-release-plugin] prepare for next development iteration
# [maven-release-plugin] prepare release jasig-widget-portlets-2.1.4
#
# If not present:
# - commit the change seen in https://github.com/Jasig/JasigWidgetPortlets/commit/f2597e442be90d350382c69ec5aee62b49b620d5
# - If the tag was pushed to upstream, you'll have to delete the local tag using the command 'git tag -d <tagname>'
# and the remote tag using the command 'git push upstream :refs/tags/<tagname>'. Then re-run mvn release:perform.
git log
# release:perform uploads artifacts to Sonatype
$ mvn release:perform
# In Sonatype Staging Repository:
# - Select repository and close it. Wait a bit and refresh.
# - Validate artifacts on Sonatype and release artifacts.
# Release is complete.
# If you have multiple repositories and origin is not the Jasig repository,
# you need to push commits to upstream to push the commits and the tag.
git push upstream master
git push upstream <tagname> |
...