Skip to content

Commit

Permalink
[ issue #95 ] Default and runtime SolrVersion property
Browse files Browse the repository at this point in the history
  • Loading branch information
agazzarini committed Jul 30, 2019
1 parent 289236e commit 39b5498
Show file tree
Hide file tree
Showing 12 changed files with 42 additions and 38 deletions.
7 changes: 4 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
<jackson.version>2.9.4</jackson.version>
<github.global.server>github</github.global.server>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<solrVersion>LATEST</solrVersion>
</properties>
<developers>
<developer>
Expand All @@ -45,12 +46,12 @@
</developer>
</developers>
<modules>
<module>rre-maven-plugin</module>
<module>rre-core</module>
<module>rre-search-platform</module>
<module>rre-server</module>
<module>rre-maven-archetype</module>
<module>rre-persistence-plugin</module>
<module>rre-maven-plugin</module>
<module>rre-core</module>
<module>rre-server</module>
</modules>

<distributionManagement>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,14 @@
<plugin>
<groupId>io.sease</groupId>
<artifactId>rre-maven-external-solr-plugin</artifactId>
<version>${solrVersion}</version>
<version>1.0</version>
<dependencies>
<dependency>
<groupId>org.apache.solr</groupId>
<artifactId>solr-solrj</artifactId>
<version>LATEST</version>
</dependency>
</dependencies>
<!-- the configuration below is provided just for example, as it perfectly matches default values -->
<configuration>
<configurations-folder>src/etc/configuration_sets</configurations-folder>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<plugin>
<groupId>io.sease</groupId>
<artifactId>rre-maven-solr-plugin</artifactId>
<version>${solrVersion}</version>
<version>1.0</version>
<!-- the configuration below is provided just for example, as it perfectly matches default values -->
<configuration>
<configurations-folder>src/etc/configuration_sets</configurations-folder>
Expand Down
8 changes: 4 additions & 4 deletions rre-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@
<name>RRE - Maven Plugins</name>
<modules>
<module>rre-maven-solr-plugin</module>
<module>rre-maven-report-plugin</module>
<module>rre-maven-external-solr-plugin</module>
<module>rre-maven-elasticsearch-plugin</module>
<module>rre-maven-external-elasticsearch-plugin</module>
<module>rre-maven-external-solr-plugin</module>
<module>rre-maven-report-plugin</module>
</modules>
<packaging>pom</packaging>
<properties>
<maven.version>3.5.0</maven.version>
<maven.version>3.5.2</maven.version>
</properties>
<dependencies>
<dependency>
Expand Down Expand Up @@ -138,7 +138,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>3.5.1</version>
<version>${maven.version}</version>
<configuration>
<goalPrefix>rre</goalPrefix>
</configuration>
Expand Down
8 changes: 3 additions & 5 deletions rre-maven-plugin/rre-maven-external-solr-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@
<version>1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>rre-maven-external-solr-plugin</artifactId>
<version>7.6.0</version>
<packaging>maven-plugin</packaging>
<name>RRE - Maven External Apache Solr Plugin</name>
<name>RRE - Maven External Apache Solr Plugin V${project.version}</name>
<dependencies>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
Expand All @@ -22,12 +20,12 @@
<dependency>
<groupId>io.sease</groupId>
<artifactId>rre-search-platform-api</artifactId>
<version>1.0</version>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>io.sease</groupId>
<artifactId>rre-search-platform-external-solr-impl</artifactId>
<version>${project.version}</version>
<version>${project.parent.version}</version>
</dependency>
</dependencies>

Expand Down
5 changes: 2 additions & 3 deletions rre-maven-plugin/rre-maven-solr-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>rre-maven-solr-plugin</artifactId>
<version>7.4.0</version>
<packaging>maven-plugin</packaging>
<name>RRE - Maven Apache Solr Plugin</name>
<dependencies>
Expand All @@ -39,12 +38,12 @@
<dependency>
<groupId>io.sease</groupId>
<artifactId>rre-search-platform-api</artifactId>
<version>1.0</version>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>io.sease</groupId>
<artifactId>rre-search-platform-solr-impl</artifactId>
<version>${project.version}</version>
<version>${project.parent.version}</version>
</dependency>
</dependencies>
</project>
2 changes: 1 addition & 1 deletion rre-persistence-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<dependency>
<groupId>io.sease</groupId>
<artifactId>rre-core</artifactId>
<version>${parent.version}</version>
<version>${project.parent.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down
5 changes: 3 additions & 2 deletions rre-search-platform/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,17 @@
<packaging>pom</packaging>
<modules>
<module>rre-search-platform-api</module>
<module>rre-search-platform-external-solr-impl</module>
<module>rre-search-platform-solr-impl</module>
<module>rre-search-platform-elastic-search-impl</module>
<module>rre-search-platform-external-solr-impl</module>

</modules>

<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,8 @@
<version>1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>rre-search-platform-external-solr-impl</artifactId>
<name>RRE - External Solr search platform binding</name>

<version>7.6.0</version>

<name>RRE - External Solr (version ${solrVersion}) search platform binding V${project.version}</name>
<dependencies>
<dependency>
<groupId>io.sease</groupId>
Expand All @@ -23,12 +19,13 @@
<dependency>
<groupId>org.apache.solr</groupId>
<artifactId>solr-solrj</artifactId>
<version>${project.version}</version>
<version>LATEST</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.solr</groupId>
<artifactId>solr-test-framework</artifactId>
<version>${project.version}</version>
<version>LATEST</version>
<scope>test</scope>
<exclusions>
<exclusion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
*/
package io.sease.rre.search.api.impl;

import org.apache.solr.SolrTestCaseJ4;
import org.apache.solr.client.solrj.impl.CloudSolrClient;
import org.apache.solr.client.solrj.impl.HttpSolrClient;
import org.apache.solr.cloud.MiniSolrCloudCluster;
Expand All @@ -31,15 +32,12 @@
import java.util.List;
import java.util.stream.Collectors;

import static junit.framework.TestCase.assertTrue;
import static org.junit.Assert.assertNotNull;

/**
* Unit tests for the SolrClientManager class.
*
* @author Matt Pearce (matt@flax.co.uk)
*/
public class SolrClientManagerTest {
public class SolrClientManagerTest extends SolrTestCaseJ4 {

private final String TARGET_INDEX = "targetIndex";

Expand Down
7 changes: 3 additions & 4 deletions rre-search-platform/rre-search-platform-solr-impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>rre-search-platform-solr-impl</artifactId>
<version>7.4.0</version>
<name>RRE - Apache Solr platform binding</name>
<name>RRE - Embedded Apache Solr (version ${solrVersion}) platform binding</name>
<dependencies>
<dependency>
<groupId>io.sease</groupId>
Expand All @@ -38,12 +37,12 @@
<dependency>
<groupId>org.apache.solr</groupId>
<artifactId>solr-solrj</artifactId>
<version>${project.version}</version>
<version>LATEST</version>
</dependency>
<dependency>
<groupId>org.apache.solr</groupId>
<artifactId>solr-core</artifactId>
<version>${project.version}</version>
<version>${solrVersion}</version>
</dependency>
</dependencies>
<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
*/
package io.sease.rre.search.api.impl;

import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import io.sease.rre.DirectoryUtils;
import io.sease.rre.search.api.QueryOrSearchResponse;
import io.sease.rre.search.api.SearchPlatform;
import org.apache.htrace.fasterxml.jackson.databind.JsonNode;
import org.apache.htrace.fasterxml.jackson.databind.ObjectMapper;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.solr.client.solrj.SolrQuery;
Expand All @@ -29,7 +29,11 @@
import org.apache.solr.common.SolrException;
import org.apache.solr.core.CoreContainer;

import java.io.*;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.StandardCopyOption;
import java.util.ArrayList;
Expand Down

0 comments on commit 39b5498

Please sign in to comment.