Build: Make rest-spec-api a project so eclipse build works

The change makes rest-spec-api a project in the same way as we build dev-tools. it packages the tests and api in a bundle using the maven-remote-resources-plugin and uses the same plugin in the plugins and core pom to unpack the rest-api-spec into the target directory and references the rest tests there in the test resources.

The main stimulus for this change is that for those using Eclipse the current build does not work. After running `mvn eclipse:eclipse` the Eclipse IDE errors because the rest-api-spec is outside of the project scope, meaning that every time the command is run (required whenever any dependencies change), the class path of all the projects has to be manually fixed.
This commit is contained in:
Colin Goodheart-Smithe 2015-06-18 15:05:42 +01:00
parent ec6946e979
commit 772d0cc6e7
342 changed files with 41 additions and 2 deletions

View File

@ -281,7 +281,7 @@
</includes>
</testResource>
<testResource>
<directory>${project.basedir}/../rest-api-spec</directory>
<directory>${elasticsearch.tools.directory}/rest-api-spec</directory>
<targetPath>rest-api-spec</targetPath>
<includes>
<include>api/*.json</include>

View File

@ -110,7 +110,7 @@
<!-- REST API specifications copied from main Elasticsearch specs
because they are required to execute the REST tests in plugins -->
<testResource>
<directory>${project.basedir}/../../rest-api-spec</directory>
<directory>${elasticsearch.tools.directory}/rest-api-spec</directory>
<targetPath>rest-api-spec</targetPath>
<includes>
<!-- required by the test framework -->

View File

@ -708,6 +708,7 @@
<configuration>
<resourceBundles>
<resourceBundle>org.elasticsearch:dev-tools:${elasticsearch.version}</resourceBundle>
<resourceBundle>org.elasticsearch:rest-api-spec:${elasticsearch.version}</resourceBundle>
</resourceBundles>
<outputDirectory>${elasticsearch.tools.directory}</outputDirectory>
<!-- don't include dev-tools in artifacts -->
@ -1457,6 +1458,7 @@ org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UT
</profiles>
<modules>
<module>dev-tools</module>
<module>rest-api-spec</module>
<module>plugins</module>
<module>core</module>
</modules>

37
rest-api-spec/pom.xml Normal file
View File

@ -0,0 +1,37 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>org.elasticsearch</groupId>
<artifactId>rest-api-spec</artifactId>
<version>2.0.0-SNAPSHOT</version>
<name>Elasticsearch Rest API Spec</name>
<parent>
<groupId>org.sonatype.oss</groupId>
<artifactId>oss-parent</artifactId>
<version>7</version>
<relativePath></relativePath>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-remote-resources-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<goals>
<goal>bundle</goal>
</goals>
</execution>
</executions>
<configuration>
<includes>
<include>**/*</include>
</includes>
</configuration>
</plugin>
</plugins>
</build>
</project>

Some files were not shown because too many files have changed in this diff Show More