You will need to use your favourite java tooling to take the code that you have
written and package it as a jar file. In my case, we use maven so I have set
my custom extensions up as a maven project, and in my POM file (which tells
maven what dependencies your project has), I declare:
<dependencies>
<dependency>
<groupId>org.apache.solr</groupId>
<artifactId>solr-core</artifactId>
<version>6.4.0</version>
<scope>provided</scope>
</dependency>
<dependencies>
This puts the Solr core classes on my classpath when I am compiling, but does
not package them up when I am building my jar file (scope=provided).
Once you have written your extension class, running mvn clean install will
create your jar file for you. You then need to copy that jar file into the
solr/server/solr/lib directory so that Solr can find it and put it on the
classpath. You should then be able to reference your custom extension in the
Solr config.
See https://maven.apache.org/ for details on maven.
See https://docs.oracle.com/javase/tutorial/deployment/jar/basicsindex.html for
the basics on jar files.
If you use a tool like IntelliJ or Exclipse, they have maven and jar file
support built in.
Regards,
David
David Howe
Java Domain Architect
Postal Systems
Level 16, 111 Bourke Street Melbourne VIC 3000
T 0391067904
M 0424036591
E [email protected]
W auspost.com.au
W startrack.com.au
Australia Post is committed to providing our customers with excellent service.
If we can assist you in any way please telephone 13 13 18 or visit our website.
The information contained in this email communication may be proprietary,
confidential or legally professionally privileged. It is intended exclusively
for the individual or entity to which it is addressed. You should only read,
disclose, re-transmit, copy, distribute, act in reliance on or commercialise
the information if you are authorised to do so. Australia Post does not
represent, warrant or guarantee that the integrity of this email communication
has been maintained nor that the communication is free of errors, virus or
interference.
If you are not the addressee or intended recipient please notify us by replying
direct to the sender and then destroy any electronic or paper copy of this
message. Any views expressed in this email communication are taken to be those
of the individual sender, except where the sender specifically attributes those
views to Australia Post and is authorised to do so.
Please consider the environment before printing this email.