|
| 1 | +## JRuby-OpenSSL |
| 2 | + |
| 3 | +The project is using [Maven](http://maven.apache.org/download.cgi) for build. |
| 4 | + |
| 5 | +Maven enhanced with JRuby using [Polyglot](https://github.com/takari/polyglot-maven), |
| 6 | +allows the build to be written using a Ruby DSL - check [*Mavenfile*](Mavenfile). |
| 7 | + |
| 8 | +If you're coming from a Ruby world and do not have Maven setup, you can alternatively |
| 9 | +`jruby -S gem install ruby-maven` and use the `rmvn` executable (instead of `mvn`). |
| 10 | + |
| 11 | +### Building |
| 12 | + |
| 13 | +The usual `mvn package` builds a .gem that includes the JRuby extension .jar |
| 14 | + |
| 15 | + |
| 16 | +### Testing |
| 17 | + |
| 18 | +Tests `mvn test` are run by default with Maven using JRuby plugins. |
| 19 | +When the ext .jar is build (`rake jar` or `mvn package -Dmaven.test.skip=true`) |
| 20 | +one can run a tests Ruby-style e.g. `jruby -Ilib:. src/test/ruby/test_bn.rb` |
| 21 | + |
| 22 | + |
| 23 | +### Releasing |
| 24 | + |
| 25 | +* fill in [History.md](History.md) change-log entries for release |
| 26 | + |
| 27 | +* update `VERSION` at [lib/jopenssl/version.rb](lib/jopenssl/version.rb), |
| 28 | + make sure [pom.xml](pom.xml) is regenerated e.g. using `rmvn validate` |
| 29 | + and `git commit` the changes |
| 30 | + |
| 31 | +* (optional) signing artifacts is preferred thus find your GPG key |
| 32 | + |
| 33 | +* `mvn -Prelease -DupdateReleaseInfo=true -Dgpg.keyname=A7A374B9 clean deploy` |
| 34 | + |
| 35 | +* (advised) examine and close the repository to push it to Sonatype's staging |
| 36 | + |
| 37 | +* (advised) run JRuby's full suite using the staged new jruby-openssl gem |
| 38 | + e.g. https://github.com/jruby/jruby/commit/1df6315e9145195f19ad862be5e3a5 |
| 39 | + |
| 40 | +* gem push the build gem from pkg/ e.g. `gem push pkg/jruby-openssl-0.9.15.gem` |
| 41 | + |
| 42 | +* tag the release e.g. `git tag v0.9.15` |
| 43 | + |
| 44 | +* update `VERSION` to next SNAPSHOT (e.g. `"0.9.16.dev"`) and commit |
| 45 | + make sure [pom.xml](pom.xml) is regenerated (`rmvn validate`) |
| 46 | + |
| 47 | +* `git push origin master --tags` |
| 48 | + |
| 49 | +* e.g. https://github.com/jruby/jruby/commit/8750e736491825eec1d1954a07d492 |
| 50 | + |
| 51 | + |
| 52 | +#### Manually Deploying |
| 53 | + |
| 54 | +When a release went by only pushing to http://rubygems.org/ one can still push |
| 55 | +to Sonatype's Maven repos, rename *jruby-openssl-x.x.x-java.gem* (when it is |
| 56 | +downloaded from https://rubygems.org/gems/jruby-openssl) to follow Maven's |
| 57 | +naming conventions (stripping the *-java* suffix) and "mvn deploy" by hand : |
| 58 | + |
| 59 | +``` |
| 60 | +mvn deploy:deploy-file -Dfile=jruby-openssl-0.9.15.gem -DpomFile=pom.xml -DrepositoryId=ossrh -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ |
| 61 | +``` |
0 commit comments