File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ before_deploy:
66 - ./gradlew clean
77 - ./gradlew -Pversion=${TRAVIS_TAG:1} jar
88 - ./gradlew -Pversion=${TRAVIS_TAG:1} jarWithDependencies
9+ - cp pom.xml build/libs/trex-java-sdk-${TRAVIS_TAG:1}.pom
910
1011deploy :
1112 - provider : releases
Original file line number Diff line number Diff line change 11group ' com.cisco.trex'
22
33apply plugin : ' java'
4+ apply plugin : ' maven'
45
56sourceCompatibility = 1.8
67targetCompatibility = 1.8
@@ -31,6 +32,30 @@ dependencies {
3132 }
3233}
3334
35+ task writePom {
36+ doLast {
37+ pom {
38+ project {
39+ artifactId ' trex-java-sdk'
40+ licenses {
41+ license {
42+ name ' The Apache Software License, Version 2.0'
43+ url ' http://www.apache.org/licenses/LICENSE-2.0.txt'
44+ }
45+ }
46+ }
47+ }. writeTo(" pom.xml" )
48+ }
49+ }
50+
51+ jar {
52+ dependsOn writePom
53+ from sourceSets. main. allSource
54+ into(" META-INF/maven/$project . group /$project . name " ) {
55+ from(" pom.xml" )
56+ }
57+ }
58+
3459task javadocJar (type : Jar ) {
3560 classifier = ' javadoc'
3661 from javadoc
@@ -42,6 +67,7 @@ task sourcesJar(type: Jar) {
4267}
4368
4469task jarWithDependencies (type : Jar ) {
70+ dependsOn writePom
4571 baseName = project. name + ' -with-dependencies'
4672 from { configurations. compile. collect { it. isDirectory() ? it : zipTree(it) } }
4773 with jar
You can’t perform that action at this time.
0 commit comments