Skip to content

Commit dee924b

Browse files
committed
Depend on elasticsearch-parent
To simplify plugins maintenance and provide more value in the future, we are starting to build an `elasticsearch-parent` project. This commit is the first step for this plugin to depend on this new `pom` maven project.
1 parent 3e612ed commit dee924b

File tree

3 files changed

+82
-70
lines changed

3 files changed

+82
-70
lines changed

.gitignore

+4-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55
/target
66
.DS_Store
77
*.iml
8-
/.settings
98
/.project
9+
/.settings
1010
/.classpath
11+
/plugin_tools
12+
/.local-execution-hints.log
13+
/.local-*-execution-hints.log
1114
*.vmoptions
12-
.local-execution-hints.log
13-
plugin_tools

dev-tools/tests.policy

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
/*
2+
* Licensed to Elasticsearch under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
// Policy file to prevent tests from writing outside the test sandbox directory
21+
// PLEASE NOTE: You may need to enable other permissions when new tests are added,
22+
// everything not allowed here is forbidden!
23+
24+
grant {
25+
// permissions for file access, write access only to sandbox:
26+
permission java.io.FilePermission "<<ALL FILES>>", "read,execute";
27+
permission java.io.FilePermission "${junit4.childvm.cwd}", "read,execute,write";
28+
permission java.io.FilePermission "${junit4.childvm.cwd}${/}-", "read,execute,write,delete";
29+
permission java.io.FilePermission "${junit4.tempDir}${/}*", "read,execute,write,delete";
30+
permission groovy.security.GroovyCodeSourcePermission "/groovy/script";
31+
32+
// Allow connecting to the internet anywhere
33+
permission java.net.SocketPermission "*", "accept,listen,connect,resolve";
34+
35+
// Basic permissions needed for Lucene / Elasticsearch to work:
36+
permission java.util.PropertyPermission "*", "read,write";
37+
permission java.lang.reflect.ReflectPermission "*";
38+
permission java.lang.RuntimePermission "*";
39+
40+
// These two *have* to be spelled out a separate
41+
permission java.lang.management.ManagementPermission "control";
42+
permission java.lang.management.ManagementPermission "monitor";
43+
44+
permission java.net.NetPermission "*";
45+
permission java.util.logging.LoggingPermission "control";
46+
permission javax.management.MBeanPermission "*", "*";
47+
permission javax.management.MBeanServerPermission "*";
48+
permission javax.management.MBeanTrustPermission "*";
49+
50+
// Needed for some things in DNS caching in the JVM
51+
permission java.security.SecurityPermission "getProperty.networkaddress.cache.ttl";
52+
permission java.security.SecurityPermission "getProperty.networkaddress.cache.negative.ttl";
53+
54+
};

pom.xml

+24-67
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ governing permissions and limitations under the License. -->
1414
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1515
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
1616
<modelVersion>4.0.0</modelVersion>
17+
18+
<parent>
19+
<groupId>org.elasticsearch</groupId>
20+
<artifactId>elasticsearch-parent</artifactId>
21+
<version>2.0.0-SNAPSHOT</version>
22+
</parent>
23+
1724
<groupId>org.elasticsearch</groupId>
1825
<artifactId>elasticsearch-cloud-azure</artifactId>
1926
<version>3.0.0-SNAPSHOT</version>
@@ -31,88 +38,49 @@ governing permissions and limitations under the License. -->
3138
</licenses>
3239
<scm>
3340
<connection>scm:git:[email protected]:elasticsearch/elasticsearch-cloud-azure.git</connection>
34-
<developerConnection>scm:git:[email protected]:elasticsearch/elasticsearch-cloud-azure.git
35-
</developerConnection>
41+
<developerConnection>scm:git:[email protected]:elasticsearch/elasticsearch-cloud-azure.git</developerConnection>
3642
<url>http://github.com/elasticsearch/elasticsearch-cloud-azure</url>
3743
</scm>
3844

39-
<parent>
40-
<groupId>org.sonatype.oss</groupId>
41-
<artifactId>oss-parent</artifactId>
42-
<version>7</version>
43-
</parent>
44-
4545
<properties>
46-
<elasticsearch.version>2.0.0-SNAPSHOT</elasticsearch.version>
47-
<lucene.version>5.0.0</lucene.version>
48-
<lucene.maven.version>5.0.0-snapshot-1642891</lucene.maven.version>
49-
<tests.output>onerror</tests.output>
50-
<tests.shuffle>true</tests.shuffle>
51-
<tests.output>onerror</tests.output>
52-
<tests.client.ratio></tests.client.ratio>
53-
<tests.jvm.argline></tests.jvm.argline>
54-
<es.logger.level>INFO</es.logger.level>
46+
<!-- You can add any specific project property here -->
5547
</properties>
5648

57-
<repositories>
58-
<repository>
59-
<id>Lucene snapshots</id>
60-
<url>https://download.elasticsearch.org/lucenesnapshots/1642891/</url>
61-
</repository>
62-
<repository>
63-
<id>sonatype</id>
64-
<url>http://oss.sonatype.org/content/repositories/releases/</url>
65-
</repository>
66-
</repositories>
67-
6849
<dependencies>
6950
<dependency>
7051
<groupId>org.hamcrest</groupId>
71-
<artifactId>hamcrest-core</artifactId>
72-
<version>1.3.RC2</version>
73-
<scope>test</scope>
74-
</dependency>
75-
<dependency>
76-
<groupId>org.hamcrest</groupId>
77-
<artifactId>hamcrest-library</artifactId>
78-
<version>1.3.RC2</version>
79-
<scope>test</scope>
52+
<artifactId>hamcrest-all</artifactId>
8053
</dependency>
8154
<dependency>
8255
<groupId>com.carrotsearch.randomizedtesting</groupId>
8356
<artifactId>randomizedtesting-runner</artifactId>
84-
<version>2.1.10</version>
85-
<scope>test</scope>
8657
</dependency>
8758
<dependency>
8859
<groupId>org.apache.lucene</groupId>
8960
<artifactId>lucene-test-framework</artifactId>
90-
<version>${lucene.maven.version}</version>
91-
<scope>test</scope>
9261
</dependency>
9362

9463
<dependency>
9564
<groupId>org.elasticsearch</groupId>
9665
<artifactId>elasticsearch</artifactId>
97-
<version>${elasticsearch.version}</version>
66+
<scope>provided</scope>
9867
</dependency>
68+
69+
<!-- Azure API -->
9970
<dependency>
10071
<groupId>com.microsoft.windowsazure</groupId>
10172
<artifactId>microsoft-windowsazure-api</artifactId>
10273
<version>0.4.6</version>
10374
</dependency>
75+
10476
<dependency>
10577
<groupId>log4j</groupId>
10678
<artifactId>log4j</artifactId>
107-
<version>1.2.17</version>
108-
<scope>test</scope>
10979
</dependency>
11080
<dependency>
11181
<groupId>org.elasticsearch</groupId>
11282
<artifactId>elasticsearch</artifactId>
113-
<version>${elasticsearch.version}</version>
11483
<type>test-jar</type>
115-
<scope>test</scope>
11684
</dependency>
11785
</dependencies>
11886

@@ -134,16 +102,10 @@ governing permissions and limitations under the License. -->
134102
<plugin>
135103
<groupId>org.apache.maven.plugins</groupId>
136104
<artifactId>maven-compiler-plugin</artifactId>
137-
<version>3.0</version>
138-
<configuration>
139-
<source>1.6</source>
140-
<target>1.6</target>
141-
</configuration>
142105
</plugin>
143106
<plugin>
144107
<groupId>com.carrotsearch.randomizedtesting</groupId>
145108
<artifactId>junit4-maven-plugin</artifactId>
146-
<version>2.0.14</version>
147109
<executions>
148110
<execution>
149111
<id>tests</id>
@@ -213,14 +175,14 @@ governing permissions and limitations under the License. -->
213175
<tests.weekly>${tests.weekly}</tests.weekly>
214176
<tests.slow>${tests.slow}</tests.slow>
215177
<tests.azure>${tests.azure}</tests.azure>
178+
<tests.config>${tests.config}</tests.config>
216179
<tests.awaitsfix>${tests.awaitsfix}</tests.awaitsfix>
217180
<tests.slow>${tests.slow}</tests.slow>
218181
<tests.timeoutSuite>${tests.timeoutSuite}</tests.timeoutSuite>
219182
<tests.showSuccess>${tests.showSuccess}</tests.showSuccess>
220183
<tests.integration>${tests.integration}</tests.integration>
221184
<tests.cluster_seed>${tests.cluster_seed}</tests.cluster_seed>
222185
<tests.client.ratio>${tests.client.ratio}</tests.client.ratio>
223-
<tests.config>${tests.config}</tests.config>
224186
<es.logger.level>${es.logger.level}</es.logger.level>
225187
<java.awt.headless>true</java.awt.headless>
226188
</systemProperties>
@@ -231,27 +193,14 @@ governing permissions and limitations under the License. -->
231193
<plugin>
232194
<groupId>org.apache.maven.plugins</groupId>
233195
<artifactId>maven-surefire-plugin</artifactId>
234-
<version>2.13</version>
235-
<configuration>
236-
<skip>true</skip>
237-
</configuration>
238196
</plugin>
239197
<plugin>
240198
<groupId>org.apache.maven.plugins</groupId>
241199
<artifactId>maven-source-plugin</artifactId>
242-
<version>2.2.1</version>
243-
<executions>
244-
<execution>
245-
<id>attach-sources</id>
246-
<goals>
247-
<goal>jar</goal>
248-
</goals>
249-
</execution>
250-
</executions>
251200
</plugin>
252201
<plugin>
202+
<groupId>org.apache.maven.plugins</groupId>
253203
<artifactId>maven-assembly-plugin</artifactId>
254-
<version>2.4</version>
255204
<configuration>
256205
<appendAssemblyId>false</appendAssemblyId>
257206
<outputDirectory>${project.build.directory}/releases/</outputDirectory>
@@ -270,4 +219,12 @@ governing permissions and limitations under the License. -->
270219
</plugin>
271220
</plugins>
272221
</build>
222+
223+
<repositories>
224+
<repository>
225+
<id>oss-snapshots</id>
226+
<name>Sonatype OSS Snapshots</name>
227+
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
228+
</repository>
229+
</repositories>
273230
</project>

0 commit comments

Comments
 (0)