-
Notifications
You must be signed in to change notification settings - Fork 74
Development and Release
Tadaya Tsuyukubo edited this page Mar 14, 2017
·
15 revisions
Setting up local development environment for datasource-proxy.
java6+ for runtime.
For development, JDK8 is required to be compatible with JDBC4.2 API(from java8).
In compilation phase, target is set to 1.6, thus distribution(jar file) runs with java5+.
for my reminder
- install PGP
- configure ~/.m2/settings.xml
install for mac
> sudo port install gnupg
generate key-pair
> gpg --gen-key
Real name: Tadaya Tsuyukubo
Email address: tadaya@ttddyy.net
Comment:
keys are stored in ~/.gnupg
confirm generated key
> gpg --list-keys
> gpg --list-secret-keys
to get public key-id, use gpg --list-keys
:
> gpg --list-keys
...
pub 2048R/[KEY_ID] 2013-10-04
...
distribute public key
> gpg --keyserver hkp://pool.sks-keyservers.net --send-keys [KEY_ID]
Reference
- sonatype document : https://docs.sonatype.org/display/Repository/How+To+Generate+PGP+Signatures+With+Maven
- need to provide credential for sonatype's staging repository
add to ~/.m2/settings.xml
<settings>
...
<servers>
<!-- for release version staging -->
<server>
<id>sonatype-nexus-staging</id>
<username>your-jira-id</username>
<password>your-jira-pwd</password>
</server>
<!-- for snapshot -->
<server>
<id>sonatype-nexus-snapshots</id>
<username>your-jira-id</username>
<password>your-jira-pwd</password>
</server>
</servers>
...
</settings>
- use JIRA (https://issues.sonatype.org) ID and pass.
add this to setting.xml
<server>
<id>bintray</id>
<username>[MY_BINTRAY_USERNAME]</username>
<password>[MY_API_KEY]</password>
</server>
add "distributionManagement" to pom.xml
<distributionManagement>
<repository>
<id>bintray</id>
<url>https://api.bintray.com/maven/[MY_BINTRAY_USERNAME]/maven/[ARTIFACT_NAME]</url>
</repository>
</distributionManagement>
* Reference "set me up" help on bintray's repository setup page.
- sonatype user guide: https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide
- sonatype JIRA my account: https://issues.sonatype.org/browse/OSSRH-3541
commands
> git clone git@github.com:ttddyy/datasource-proxy.git dsp-release
> cd dsp-release
> git config user.email tadaya@ttddyy.net
> git config user.name "Tadaya Tsuyukubo"
# first check with dry run
> ./mvnw release:prepare -DdryRun=true
> ./mvnw release:clean
# to try locally add "-DpushChanges=false" (this will not push to github)
> ./mvnw release:prepare -DpushChanges=false
# this will create commits in github
> ./mvnw release:prepare
# upload artifacts to sonatype
> ./mvnw release:perform -s ~/.m2/settings-ttddyy.xml
javadoc
> git checkout gh-pages (may do "git pull --rebase")
> cp -R target/apidocs javadoc/v[VERSION]
> git add javddoc/v[VERSION]
> git commit -m "..."
> git push
- login to https://oss.sonatype.org
- click "Staging Repositories"
- find a repository which was created by
mvn release:perform
- the repository name should be something like "netttddyy-..."
- the repository contains newly uploaded artifacts
- select the repository
- "Close" the repository
- refresh from the left bar "Staging Repositories"
- select the repository
- "Release" the repository (after released, it'll be synced to the central repository in few hours)
- email will be sent
- check the maven central search page : http://search.maven.org/#search|ga|1|net.ttddyy
goto bintray and publish uploaded artifact.
to publish javadoc only.
> git clone git@github.com:ttddyy/datasource-proxy.git
> cd datasource-proxy
# generate javadoc
> git checkout [VERSION_TAG]
> ./mvnw javadoc:javadoc
# add javadoc to github pages
> git checkout gh-pages
> cp -R target/site/apidocs javadoc/v[VERSION]
> git add javddoc/v[VERSION]
> git commit -m "..."
> git push # or git push origin gh-pages
# update github javadoc wiki page
# https://github.com/ttddyy/datasource-proxy/wiki/Javadoc