mirror of
https://github.com/Alfresco/alfresco-sdk.git
synced 2025-07-31 17:39:14 +00:00
Feature request: adding support for custom solr config #474
This commit is contained in:
@@ -449,6 +449,35 @@ public abstract class AbstractRunMojo extends AbstractMojo {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Copy custom solr configuration files over, so a
|
||||
* developer can overwrite any files needed
|
||||
*
|
||||
* @throws MojoExecutionException
|
||||
*/
|
||||
protected void copySolrCustomConfig() throws MojoExecutionException {
|
||||
getLog().info("Copying custom Solr config");
|
||||
executeMojo(
|
||||
plugin(
|
||||
groupId("org.apache.maven.plugins"),
|
||||
artifactId("maven-resources-plugin"),
|
||||
version(MAVEN_RESOURCE_PLUGIN_VERSION)
|
||||
),
|
||||
goal("copy-resources"),
|
||||
configuration(
|
||||
element(name("outputDirectory"), solrHome),
|
||||
element(name("overwrite"), "true"),
|
||||
element(name("resources"),
|
||||
element(name("resource"),
|
||||
element(name("directory"), "src/test/resources/solr"),
|
||||
element(name("filtering"), "true")
|
||||
)
|
||||
)
|
||||
),
|
||||
execEnv
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Replace property placeholders in configuration files for the cores, so the
|
||||
* index files can be found for each core when Solr starts up.
|
||||
|
@@ -49,6 +49,7 @@ public class RunMojo extends AbstractRunMojo {
|
||||
if (enableSolr) {
|
||||
unpackSolrConfig();
|
||||
fixSolrHomePath();
|
||||
copySolrCustomConfig();
|
||||
replaceSolrConfigProperties();
|
||||
installSolr10InLocalRepo();
|
||||
}
|
||||
|
Reference in New Issue
Block a user