File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Expand file tree Collapse file tree 2 files changed +23
-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,11 +32,32 @@ 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+
3451jar {
52+ dependsOn writePom
3553 from sourceSets. main. allSource
54+ into(" META-INF/maven/$project . group /$project . name " ) {
55+ from(" pom.xml" )
56+ }
3657}
3758
3859task jarWithDependencies (type : Jar ) {
60+ dependsOn writePom
3961 baseName = project. name + ' -with-dependencies'
4062 from { configurations. compile. collect { it. isDirectory() ? it : zipTree(it) } }
4163 with jar
You can’t perform that action at this time.
0 commit comments