I'm running an embedded elasticsearch with attachment plugin inside one big spring-boot application ( as a stand-alone JAR). I have defined a contents field with the type = attachment and everything works fine when I run the app using mvn spring-boot:run command. If I build the final JAR using mvn clean install (or mvn package) and run it using java -jar this field will not get indexed at all! I have extended the Node class as follows :
public class NodeWithPlugins extends Node {
private Version version;
private Collection<Class<? extends Plugin>> plugins;
public NodeWithPlugins(Environment environment, Version version, Collection<Class<? extends Plugin>> classpathPlugins) {
super(environment, version, classpathPlugins);
this.version = version;
this.plugins = classpathPlugins;
}
public Collection<Class<? extends Plugin>> getPlugins() {
return plugins;
}
public Version getVersion() {
return version;
}
}
...and I'm creating the node inside the @PostConstruct annotated method like this :
Collection plugins = new ArrayList<>();
Collections.<Class<? extends Plugin>>addAll(plugins, MapperAttachmentsPlugin.class);
node = new NodeWithPlugins(environment, Version.CURRENT, plugins);
node.start();
Hi,
I'm running an embedded elasticsearch with attachment plugin inside one big spring-boot application ( as a stand-alone JAR). I have defined a contents field with the type = attachment and everything works fine when I run the app using mvn spring-boot:run command. If I build the final JAR using mvn clean install (or mvn package) and run it using java -jar this field will not get indexed at all! I have extended the Node class as follows :
...and I'm creating the node inside the @PostConstruct annotated method like this :
My pom.xml has the following :
...and I can see that the mapper plugin gets embedded inside the final JAR (inside libs).
Am I missing something? Please advise.