Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for source and javadoc building #2

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 84 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@ apply plugin: 'org.sonarqube'
apply plugin: 'maven-publish'
apply plugin: "com.jfrog.artifactory"
apply plugin: "com.github.hierynomus.license"
apply plugin: 'signing'
apply plugin: 'maven'
//apply plugin: 'nebula.lint'

sourceCompatibility = 1.8
version = "${version}"
group = 'com.dell.isg.smi'
archivesBaseName = "wsmanclient"
ext.isReleaseVersion = !version.endsWith("SNAPSHOT")

sourceSets {
main {
Expand All @@ -22,7 +26,7 @@ buildscript {
repositories {
mavenLocal()
maven {
url "${artifactory_contextUrl}/libs-release"
url "${artifactory_contextUrl}/${plugin_repo}"
url "https://plugins.gradle.org/m2/"
}
}
Expand All @@ -35,6 +39,32 @@ buildscript {
}
}

if (JavaVersion.current().isJava8Compatible()) {
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
}

javadoc {
options {
encoding = 'windows-1251'
}
}

task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}

task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}

artifacts {
archives javadocJar, sourcesJar
}

//gradleLint {
//rules = ['dependency-parentheses','overridden-dependency-version','duplicate-dependency-class', 'all-dependency','unused-dependency']
//}
Expand All @@ -56,13 +86,13 @@ jar {
repositories {
mavenLocal()
maven {
url "${artifactory_contextUrl}/libs-release"
url "${artifactory_contextUrl}/${dependency_repo}"
}
}

dependencies {
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'
compile 'com.dell.isg.smi:commons-elm:1.0.36'
compile 'com.dell.isg.smi:commons-elm:1.0.76'
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.5'
compile group: 'xerces', name: 'xercesImpl', version: '2.11.0'
}
Expand All @@ -76,13 +106,64 @@ uploadArchives {
flatDir {
dirs 'repos'
}

mavenDeployer
{
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }

repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}

snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}

pom.project {
artifactId = "wsmanclient"
packaging 'jar'
url 'https://www.github.com/rackhd/smi-lib-wsman-client'
name 'SMI Commons ELM'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change the name to change to WSMAN

description 'WSMAN Client jar library for the System Management Integration (SMI) projects.'
inceptionYear '2017'

licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution 'repo'
}
}

scm {
connection 'scm:git:git://www.github.com/rackhd/smi-lib-wsman-client.git'
developerConnection 'scm:git:ssh://www.github.com/rackhd/smi-lib-wsman-client.git'
url 'http://www.github.com/rackhd/smi-lib-wsman-client'
}

developers {
developer {
id 'michaelsteven'
name 'Michael Hepfer'
email '[email protected]'
organization 'Dell EMC Inc.'
organizationUrl 'http://codedellemc.com'
}
}

}

}
}

publishing {
publications {
mavenJava(MavenPublication){
artifact jar
artifact sourcesJar {
classifier "sources"
}
artifact javadocJar
}
}
}
Expand All @@ -101,7 +182,6 @@ artifactory {
publish {
defaults{ publications ("mavenJava")}
repository {
repoKey = 'libs-release-local'
// note: username and password being set by bamboo artifactory plugin
maven = true
}
Expand Down
10 changes: 8 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
version=1.0
version=1.0-SNAPSHOT
artifactory_contextUrl=https://gtie-artifactory.us.dell.com/artifactory
plugin_repo=libs-release
dependency_repo=libs-snapshot
buildInfo.licenseControl.runChecks=true
buildInfo.licenseControl.autoDiscover=true
buildInfo.build.name=com.dell.isg.smi:wsmanclient
systemProp.sonar.host.url=http://100.68.126.201:9000
systemProp.sonar.host.url=https://sonarqube.com
systemProp.sonar.organization=rackhd-smi
systemProp.sonar.login=##sonarqubeLogin-placeholder##
ossrhUsername=##ossrhUsername-placeholder##
ossrhPassword=##ossrhPassword-placeholder##