@@ -34,6 +34,10 @@ plugins {
34
34
id ' java'
35
35
}
36
36
37
+ apply plugin : ' opensearch.opensearchplugin'
38
+ apply plugin : ' opensearch.internal-cluster-test'
39
+ apply plugin : ' opensearch.pluginzip'
40
+
37
41
repositories {
38
42
mavenLocal()
39
43
mavenCentral()
@@ -50,11 +54,12 @@ allprojects {
50
54
if (isSnapshot) {
51
55
version + = " -SNAPSHOT"
52
56
}
53
- }
54
57
55
- apply plugin : ' opensearch.opensearchplugin'
56
- apply plugin : ' opensearch.internal-cluster-test'
57
- apply plugin : ' opensearch.pluginzip'
58
+ plugins. withId(' java' ) {
59
+ targetCompatibility = JavaVersion . VERSION_11
60
+ sourceCompatibility = JavaVersion . VERSION_11
61
+ }
62
+ }
58
63
59
64
opensearchplugin {
60
65
name ' opensearch-custom-codecs'
@@ -68,33 +73,52 @@ dependencies {
68
73
api " com.github.luben:zstd-jni:1.5.5-5"
69
74
}
70
75
76
+ allprojects {
77
+ // Default to the apache license
78
+ project. ext. licenseName = ' The Apache Software License, Version 2.0'
79
+ project. ext. licenseUrl = ' http://www.apache.org/licenses/LICENSE-2.0.txt'
80
+ publishing {
81
+ repositories {
82
+ maven {
83
+ name = ' staging'
84
+ url = " ${ rootProject.buildDir} /local-staging-repo"
85
+ }
86
+ }
87
+ publications {
88
+ // add license information to generated poms
89
+ all {
90
+ pom {
91
+ name = " opensearch-custom-codecs"
92
+ description = " OpenSearch plugin that implements custom compression codecs"
93
+ }
94
+ pom. withXml { XmlProvider xml ->
95
+ Node node = xml. asNode()
96
+ node. appendNode(' inceptionYear' , ' 2021' )
97
+
98
+ Node license = node. appendNode(' licenses' ). appendNode(' license' )
99
+ license. appendNode(' name' , project. licenseName)
100
+ license. appendNode(' url' , project. licenseUrl)
101
+
102
+ Node developer = node. appendNode(' developers' ). appendNode(' developer' )
103
+ developer. appendNode(' name' , ' OpenSearch' )
104
+ developer. appendNode(' url' , ' https://github.com/opensearch-project/custom-codecs' )
105
+ }
106
+ }
107
+ }
108
+ }
109
+ }
110
+
71
111
publishing {
72
112
publications {
73
113
pluginZip(MavenPublication ) { publication ->
74
114
pom {
75
- name = opensearchplugin . name
76
- description = opensearchplugin . description
115
+ name = " opensearch-custom-codecs "
116
+ description = " OpenSearch plugin that implements custom compression codecs "
77
117
groupId = " org.opensearch.plugin"
78
- licenses {
79
- license {
80
- name = " The Apache License, Version 2.0"
81
- url = " http://www.apache.org/licenses/LICENSE-2.0.txt"
82
- }
83
- }
84
- developers {
85
- developer {
86
- name = " OpenSearch"
87
- url = " https://github.com/opensearch-project/custom-codecs"
88
- }
89
- }
90
118
}
91
119
}
92
120
}
93
121
repositories {
94
- maven {
95
- name = ' staging'
96
- url = " ${ rootProject.buildDir} /local-staging-repo"
97
- }
98
122
maven {
99
123
name = " Snapshots"
100
124
url = " https://aws.oss.sonatype.org/content/repositories/snapshots"
@@ -125,9 +149,4 @@ tasks.withType(Javadoc).configureEach { Javadoc javadoc ->
125
149
126
150
testingConventions. enabled = false
127
151
loggerUsageCheck. enabled = false
128
-
129
- tasks. matching {it. path in [" :validateMavenPom" , " :validateNebulaPom" , " :validatePluginZipPom" ]}. all { task ->
130
- task. dependsOn ' :generatePomFileForNebulaPublication' , ' :generatePomFileForPluginZipPublication'
131
- }
132
-
133
- tasks. named(" publishNebulaPublicationToMavenLocal" ). configure { dependsOn(" generatePomFileForPluginZipPublication" ) }
152
+ validateNebulaPom. enabled = false
0 commit comments