Reputation: 3
Lets say I have utility jar called validation.jar which can validate some string to be forwarded.
How can I add this validation.jar along with camel-k integration in minkube.
example :
import com.validation.Util;
import org.apache.camel.builder.RouteBuilder;
public class MyRoute extends RouteBuilder {
@Override
public void configure() throws Exception {
//from("timer:tick").log(Util.validate("dummy message - new"));
from("timer:tick").log("dummy message - new");
}
}
to get com.validation.Util class we need validation.jar available with camel-k. How to provide that.
Upvotes: 0
Views: 1275
Reputation: 44995
Starting from camel-k 1.9.x, it is possible to provide a dependency located in the local filesystem by using the file://
prefix when specifying the dependency, like the next example:
kamel run -d file://path/to/validation.jar MyRoute.java
Upvotes: 0
Reputation: 11
There is just one way of achieving your goal. Store your java classses with pom.xml file for building jar in github repository. After that you can use Jitpack.io. Jitpack will build and store jar file in its registry. Finally, you can use as dependency on kamel run command.
Upvotes: 1