11apply plugin : ' java'
2+ apply plugin : ' maven'
23apply plugin : ' eclipse'
34
45sourceCompatibility = 1.8
1819}
1920
2021configurations {
21- releaseJars {
22- extendsFrom runtime
22+ wagon
23+ releaseJars {
24+ extendsFrom runtime
25+ exclude group : ' org.elasticsearch'
26+ exclude group : ' org.apache.lucene'
27+ exclude module : ' commons-logging'
28+ exclude module : ' commons-codec'
29+ exclude module : ' commons-lang3'
30+ exclude module : ' httpclient'
31+ exclude module : ' httpcore'
32+ exclude module : ' junit'
2333 }
2434}
2535
@@ -49,7 +59,6 @@ dependencies {
4959 compile(" org.apache.httpcomponents:httpclient:4.5.2" )
5060
5161 // stuff
52- compile(" org.apache.commons:commons-lang3:3.4" )
5362 compile(" com.carrotsearch.randomizedtesting:randomizedtesting-runner:2.3.4" )
5463
5564 // test
@@ -74,7 +83,7 @@ uploadArchives {
7483
7584task makePluginDescriptor (type : Copy ) {
7685 from ' src/main/templates'
77- into ' src/main/resources '
86+ into ' build/tmp/plugin '
7887 expand([
7988 ' descriptor' : [
8089 ' name' : pluginName,
@@ -89,3 +98,17 @@ task makePluginDescriptor(type: Copy) {
8998 ]
9099 ])
91100}
101+ 102+ task buildPluginZip (type : Zip , dependsOn : [' :jar' , ' :makePluginDescriptor' ]) {
103+ from configurations. releaseJars
104+ from ' build/tmp/plugin'
105+ classifier = ' plugin'
106+ }
107+ 108+ task unpackPlugin (type : Copy , dependsOn : [' :buildPluginZip' ]) {
109+ delete " plugins"
110+ from configurations. releaseJars
111+ from ' build/tmp/plugin'
112+ into " plugins/${ pluginName} "
113+ }
114+
0 commit comments