Skip to content

Commit

Permalink
Fix wrong copy destination for photon-es module
Browse files Browse the repository at this point in the history
Signed-off-by: Holger Bruch <[email protected]>
  • Loading branch information
hbruch committed May 23, 2020
1 parent d6b7450 commit 6c475c7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main/java/de/komoot/photon/elasticsearch/Server.java
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,10 @@ private void setupDirectories(URL directoryName) throws IOException, URISyntaxEx
final File pluginDirectory = new File(esDirectory, "plugins");
final File analysisDirectory = new File(esDirectory, "config/analysis");
final File painlessDirectory = new File(esDirectory, "modules/lang-painless");
final File photonEsModuleDirectory = new File(esDirectory, "modules/photon-es");

for (File directory : new File[]{photonDirectory, esDirectory, pluginDirectory,
painlessDirectory, analysisDirectory}) {
painlessDirectory, analysisDirectory, photonEsModuleDirectory}) {
directory.mkdirs();
}

Expand All @@ -179,9 +180,9 @@ private void setupDirectories(URL directoryName) throws IOException, URISyntaxEx
new File(analysisDirectory, "hyphenation_patterns.xml"));

copyOrReplace("modules/photon-es/photon-es.jar",
new File(painlessDirectory, "photon-es.jar"));
new File(photonEsModuleDirectory, "photon-es.jar"));
copyOrReplace("modules/photon-es/plugin-descriptor.properties",
new File(painlessDirectory, "plugin-descriptor.properties"));
new File(photonEsModuleDirectory, "plugin-descriptor.properties"));
}

private void copyOrReplace(String resource, File destination) throws IOException {
Expand Down

0 comments on commit 6c475c7

Please sign in to comment.