Skip to content

concordion/concordion-extension-build

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 

Repository files navigation

concordion-extension-build

Contains a common build file for publishing Concordion extensions. This includes common properties, dependencies and plugins, publishing artifacts to Maven Central and documentation to Github Pages.

Tasks

It adds the following tasks (amongst others) to your build, that you can run using Gradle

  • ./gradlew publishToMavenLocal - builds the release and installs to your local Maven repository
  • ./gradlew gitPublishPush - builds the documentation and publishes to Github Pages
  • ./gradlew publishToSonatype - builds the release and publishes to the Maven Central repositories

Configuration

Example configuration is:

apply from: 'https://raw.githubusercontent.com/concordion/concordion-extension-build/master/extension-build.gradle'

description = 'An extension to Concordion to use Excel spreadsheets rather than HTML as specifications'

ext {
    poiVersion = '3.10-FINAL'
    developers = {
        developer {
            id 'robmoffat'
            name 'Rob Moffat'
            roles { role 'Extension Contributor' }
            url 'http://kite9.com'
        }
    }
    inceptionYear = '2014'   
}

dependencies {
    implementation "org.apache.poi:poi:$poiVersion"
    implementation "org.apache.poi:poi-ooxml:$poiVersion"
    implementation "org.apache.poi:poi-ooxml-schemas:$poiVersion"
    implementation 'org.apache.commons:commons-lang3:3.3.2'
}

gitPublish {
	repoUri = '[email protected]:concordion/concordion-excel-extension.git'
	contents {
	   from 'docs'

		from ('build/reports/spec/spec/concordion/ext/excel') {
			into 'spec'
		}

		from ('build/docs/javadoc/') {
			into 'api'
		}
	}
}

The dependencies block is only required if you want to add dependencies over and above the concordion dependency.

The gitPublish block defines the repository to publish to, and has a pages CopySpec that defines the pages to be copied.

Publishing to Github Pages

Prior to publishing to Github Pages for the first time, you will need to create a gh-pages branch, and add content and push.

Publishing a release

Only authorised committers can publish a release.

The project is released to Maven Central using a few plugins defined in build.gradle.

Pre-conditions

  • A GPG client is installed on your command line path. For more information, please refer to http://www.gnupg.org/.

  • You have created your GPG keys and distributed your public key. For more information, please refer to Gradle Signing Plugin.

  • You have a Sonatype JIRA account, which has approval for publishing to the Concordion project.

  • You have configured your gradle.properties, typically located in your ~/.gradle directory:

sonatypeUsername=<your-jira-username>
sonatypePassword=<your-jira-password>

signing.keyId=<public GPG key>
signing.password=<private GPG key passphrase>
signing.secretKeyRingFile=<path to secret key ring file containing your private key>

where and are the credentials for your Sonatype JIRA account.

Performing a release

  • Check that gradle.properties contains the desired version number.
  • Commit and push all the changes to GitHub. (The release plugin will fail if you have any changes that aren't committed and pushed.)
  • Checkout the master branch, if not already checked out.
  • Either run ./gradlew clean test javadoc gitPublishPush publishToSonatype closeSonatypeStagingRepository and manually release the build from the Nexus staging repository or run ./gradlew clean test javadoc gitPublishPush publishToSonatype closeAndReleaseSonatypeStagingRepository if you are confident. See the Gradle Nexus Publish Plugin for more details.

Announce

  • Announce to the mailing list and Twitter

About

Contains a common build file for publishing Concordion extensions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published