Fixed Solr Data Dir path on Windows, #284

This commit is contained in:
Martin Bergljung 2015-05-14 11:38:12 +01:00
parent ee6861e873
commit f1735544ab

View File

@ -69,6 +69,30 @@
</executions> </executions>
</plugin> </plugin>
<!-- For windows paths, convert single \ to / for the ${alfresco.solr.data.dir} path,
by default it will be c:\bla\, we need forward slash or double backslash. -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>regexp-property</id>
<phase>generate-resources</phase>
<goals>
<goal>regex-property</goal>
</goals>
</execution>
</executions>
<configuration>
<name>solrDataDir</name>
<value>${alfresco.solr.data.dir}</value>
<regex>\\</regex>
<replacement>/</replacement>
<failIfNoMatch>false</failIfNoMatch>
</configuration>
</plugin>
<!-- Run the goal replace and update configuration files for the <!-- Run the goal replace and update configuration files for the
Solr cores to reflect our build structure --> Solr cores to reflect our build structure -->
<plugin> <plugin>
@ -90,21 +114,9 @@
<include>${alfresco.solr.home.dir}/workspace-SpacesStore/conf/solrcore.properties</include> <include>${alfresco.solr.home.dir}/workspace-SpacesStore/conf/solrcore.properties</include>
</includes> </includes>
<replacements> <replacements>
<replacement>
<token>@@ALFRESCO_SOLR4_DIR@@</token>
<value>${alfresco.solr.home.dir}/</value>
</replacement>
<replacement>
<token>@@ALFRESCO_SOLR4_MODEL_DIR@@</token>
<value>${alfresco.solr.home.dir}/alfrescoModels/</value>
</replacement>
<replacement>
<token>@@ALFRESCO_SOLR4_CONTENT_DIR@@</token>
<value>${alfresco.solr.data.dir}/content/</value>
</replacement>
<replacement> <replacement>
<token>@@ALFRESCO_SOLR4_DATA_DIR@@</token> <token>@@ALFRESCO_SOLR4_DATA_DIR@@</token>
<value>${alfresco.solr.data.dir}/index</value> <value>${solrDataDir}/index</value>
</replacement> </replacement>
</replacements> </replacements>
</configuration> </configuration>