Skip to content

Commit

Permalink
Merge branch 'development' into newbuild
Browse files Browse the repository at this point in the history
  • Loading branch information
John Burbridge committed Jan 3, 2013
2 parents 21da8a8 + 8d59fc4 commit d41671f
Show file tree
Hide file tree
Showing 120 changed files with 3,224 additions and 1,951 deletions.
18 changes: 11 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ launcher = rundeck-launcher/launcher/build/libs/rundeck-launcher-$(VERSION).jar



.PHONY: clean rundeck docs makedocs plugins war launcher
.PHONY: clean rundeck docs makedocs plugins war launcher core-release core-snapshot

rundeck: $(launcher)
@echo $(VERSION)-$(RELEASE)

rpm: docs $(launcher) $(plugs)
rpm: docs $(launcher) plugins
cd packaging; $(MAKE) VERSION=$(VNUMBER) VNAME=$(VERSION) RELEASE=$(RELEASE) rpmclean rpm

deb: docs $(launcher) $(plugs)
deb: docs $(launcher) plugins
cd packaging; $(MAKE) VERSION=$(VNUMBER) VNAME=$(VERSION) RELEASE=$(RELEASE) debclean deb

makedocs:
Expand All @@ -63,6 +63,12 @@ makedocs:
$(core): $(CORE_FILES)
cd core; ./gradlew $(PROXY_DEFS) -PbuildNum=$(RELEASE) clean check assemble javadoc

core-snapshot: $(CORE_FILES)
cd core; ./gradlew $(PROXY_DEFS) -Psnapshot -PbuildNum=$(RELEASE) uploadArchives

core-release: $(CORE_FILES)
cd core; ./gradlew $(PROXY_DEFS) -Prelease -PbuildNum=$(RELEASE) uploadArchives

war: $(war)

grails: $(GRAILS_HOME)
Expand Down Expand Up @@ -95,10 +101,8 @@ $(war): $(core) $(RUNDECK_FILES) $(GRAILS_HOME)
cd rundeckapp; $(GRAILS) test-app
cd rundeckapp; yes | $(GRAILS) prod war

$(plugs): $(core) $(PLUGIN_FILES)
cd plugins && ./gradlew

plugins: $(plugs)
plugins: $(core) $(PLUGIN_FILES)
cd plugins && ./gradlew

docs: makedocs
mkdir -p ./rundeckapp/web-app/docs
Expand Down
231 changes: 155 additions & 76 deletions core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,26 @@
description = 'The Rundeck Core API project'

import org.apache.tools.ant.filters.ReplaceTokens
import org.gradle.plugins.signing.Sign

apply from: "${rootDir}/gradle/java.gradle"

archivesBaseName = 'rundeck-core'
defaultTasks 'clean','assemble'

def isReleaseBuild
def isSnapshotBuild
def isDevBuild

if(hasProperty("release")){
isReleaseBuild=true
}else if(hasProperty("snapshot")){
isSnapshotBuild=true
version=version.split('-')[0]+ '-SNAPSHOT'
}else{
isDevBuild=true
}

repositories {
mavenCentral()
add(new org.apache.ivy.plugins.resolver.FileSystemResolver()) {
Expand Down Expand Up @@ -83,96 +97,161 @@ assemble {
}

uploadArchives {
repositories.mavenDeployer {
configuration = configurations.archives
pom.project {
artifactId archivesBaseName
groupId group
inceptionYear '2011'
packaging 'jar'
version version
name "RunDeck Core"
url 'http://rundeck.org'
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution 'repo'
repositories.mavenDeployer {
configuration = configurations.archives
pom.project {
artifactId archivesBaseName
groupId "com.dtolabs.rundeck"
inceptionYear '2011'
packaging 'jar'
version version
name "RunDeck Core"
url 'http://rundeck.org'
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution 'repo'
}
}
}
}
}
}

task createPom << {
pom {
project {
artifactId archivesBaseName
groupId group
inceptionYear '2011'
packaging 'jar'
version version
name "RunDeck Core"
url 'http://rundeck.org'
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution 'repo'
}
//build a pom we reuse for both maven builds and release to sonatype
def buildpom=pom {
project {
artifactId archivesBaseName
groupId project.group
inceptionYear '2011'
packaging 'jar'
version version
name "Rundeck Core"
description "Core library for the Rundeck web console for command dispatching and job scheduling"
url 'http://rundeck.org'
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution 'repo'
}
properties{
'version'(version)
'version_build'(buildNum)
'version_ident'(version+'-'+buildNum)
}
properties{
'version'(version)
'version_build'(buildNum)
'version_ident'(version+'-'+buildNum)
}
scm {
url 'https://github.com/dtolabs/rundeck'
connection 'scm:git:git@github.com/dtolabs/rundeck.git'
developerConnection 'scm:git:git@github.com:dtolabs/rundeck.git'
}
developers {
developer {
id('gschueler')
name('Greg Schueler')
email('greg@dtosolutions.com')
}
}
parent {
groupId('org.sonatype.oss')
artifactId('oss-parent')
version('7')
}
build {
resources{
resource{
directory 'src/main/meta'
targetPath 'META-INF'
filtering=true
}
resource{
directory 'src/main/resources'
}
}
build {
resources{
resource{
directory 'src/main/meta'
targetPath 'META-INF'
filtering=true
}
resource{
directory 'src/main/resources'
plugins{
plugin{
groupId 'org.apache.maven.plugins'
artifactId 'maven-compiler-plugin'
version '2.3.2'
configuration{
'source'('1.5')
'target'('1.5')
}
}
plugins{
plugin{
groupId 'org.apache.maven.plugins'
artifactId 'maven-compiler-plugin'
version '2.3.2'
configuration{
'source'('1.5')
'target'('1.5')
plugin{
groupId 'org.apache.maven.plugins'
artifactId 'maven-surefire-plugin'
version '2.10'
configuration{
systemPropertyVariables{
'rdeck.base'('${project.build.directory}/rdeck_base')
}
redirectTestOutputToFile 'true'
}
plugin{
groupId 'org.apache.maven.plugins'
artifactId 'maven-surefire-plugin'
version '2.10'
configuration{
systemPropertyVariables{
'rdeck.base'('${project.build.directory}/rdeck_base')
}
redirectTestOutputToFile 'true'
}
}
plugin{
groupId 'org.apache.maven.plugins'
artifactId 'maven-jar-plugin'
version '2.3.2'
configuration{
archive{
manifestEntries{
'Rundeck-Version'(version)
'Rundeck-Tools-Dependencies'(configurations.runtime.collect { "$it.name" }.join(" "))
}
}
}
plugin{
groupId 'org.apache.maven.plugins'
artifactId 'maven-jar-plugin'
version '2.3.2'
configuration{
archive{
manifestEntries{
'Rundeck-Version'(version)
'Rundeck-Tools-Dependencies'(configurations.runtime.collect { "$it.name" }.join(" "))
}
}
}
}
}
}
}.writeTo("pom.xml")
}
}

task createPom << {
buildpom.writeTo("pom.xml")
}


// prompt for PGP key passphrase if not set
gradle.taskGraph.whenReady { taskGraph ->
if (taskGraph.allTasks.any { it instanceof Sign } && !ext.hasProperty("signing.password") && !isDevBuild) {
// Use Java 6's console to read from the console (no good for a CI environment)
Console console = System.console()
console.printf "\n\nWe have to sign some things in this build.\n\nPlease enter your signing details.\n\n"

//def id = console.readLine("PGP Key Id: ")
//def file = console.readLine("PGP Secret Key Ring File (absolute path): ")
def password = console.readPassword("PGP Private Key Password: ")

//allprojects { ext."signing.keyId" = id }
//allprojects { ext."signing.secretKeyRingFile" = file }
allprojects { ext."signing.password" = password }

console.printf "\nThanks.\n\n"
}
}

uploadArchives {
if(isDevBuild){
repositories{
mavenLocal()
}
}else{
repositories.mavenDeployer {
if(isReleaseBuild){
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
}

configuration = configurations.archives

repository(url: 'https://oss.sonatype.org/service/local/staging/deploy/maven2') {
authentication(userName: sonatypeUsername, password: sonatypePassword)
}
snapshotRepository(url: 'https://oss.sonatype.org/content/repositories/snapshots/') {
authentication(userName: sonatypeUsername, password: sonatypePassword)
}
pom=buildpom
}
}
}
20 changes: 19 additions & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,16 @@
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.dtolabs.rundeck</groupId>
<parent>
<artifactId>oss-parent</artifactId>
<groupId>org.sonatype.oss</groupId>
<version>7</version>
</parent>
<groupId>org.rundeck</groupId>
<artifactId>rundeck-core</artifactId>
<version>1.5-dev</version>
<name>RunDeck Core</name>
<description>Core library for the Rundeck web console for command dispatching and job scheduling</description>
<url>http://rundeck.org</url>
<inceptionYear>2011</inceptionYear>
<licenses>
Expand All @@ -15,6 +21,18 @@
<distribution>repo</distribution>
</license>
</licenses>
<developers>
<developer>
<id>gschueler</id>
<name>Greg Schueler</name>
<email>greg@dtosolutions.com</email>
</developer>
</developers>
<scm>
<connection>scm:git:git@github.com/dtolabs/rundeck.git</connection>
<developerConnection>scm:git:git@github.com:dtolabs/rundeck.git</developerConnection>
<url>https://github.com/dtolabs/rundeck</url>
</scm>
<build>
<resources>
<resource>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,10 @@

package com.dtolabs.rundeck.core;

import org.apache.tools.ant.BuildException;


/**
* CoreException, base exception class for the core framework
*/
public class CoreException extends BuildException {
public class CoreException extends RuntimeException {
public CoreException(final String msg) {
super(msg);
}
Expand Down
Loading

0 comments on commit d41671f

Please sign in to comment.