Traefik. Embedding plugins beforehand to avoid on-startup compiling - traefik

I like the idea of Traefik plugins, but I'm not sure that downloading dependencies and compiling plugins on every Traefik startup is a good idea.
Are there any way to embed plugins beforehand, so Traefik will download and compile nothing on startup.
I know there is always a way to fork traefik repo and add whatever you want but I want to avoid it if possible.

Related

Possible to create a kotlin js app gradle config without webpack/npm/yarn?

Is it possible to create a gradle config that uses the kotlin multiplatform plugin to create a project with a kotlin js client (and ktor/jvm back end) that does required the webpack/npm/yarn gymnastics which I have little use for? Even if I remove the webpack element from the config the build still seems to fail because of the yarn lock problem. (Can be worked around of course, but it just seems for simple apps all this complexity ideally could be avoided.)
Solutions that don't use gradle at all - like just calling the compiler(s) and other tools directly in a script - would also be welcome!

To use ServiceMix my project has to be an OSGi bundle?

I' starting to use ServiceMix and Camel and I've run through many examples.
It seems that the examples that are OSGi can be deployed in ServiceMix via hot deploy or via console, but I don't know how to deploy a project that is not an OSGI. Can it be done?
For example, I'm looking at the example project from Camel 2.10.0 called camel-example-cxf-proxy. I did some alterations and now I wanted to load it in ServiceMix. If I copy/paste to the deploy directory it is loaded but when I try to run it via osgi:start id it fails.
However if I run it from the IDE as a standalone it runs just fine and I can send and receive requests via SoapUI.
When I'm done with the examples I'll want to create my own project in eclipse and do tests in the IDE and in ServiceMix. I don't really understand the advantage of OSGi yet. SO I'm not too compelled to use OSGi for my project.
My main question is: Can I deploy a non-OSGi non-JBI compliant project in servicemix? Something like the camel-example-cxf-proxy. If yes, how can I do it? If no, how can I OSGi-fy the camel-example-cxf-proxy?
Thank you :)
Apache ServiceMix which uses Apache Karaf as its kernel, support pluggable deployment units. Though OSGi is the main unit.
You can deploy JBI artifacts (eg JBI was used as deployment units for Apache ServiceMix 3.x). So we offer that as a migration path to run JBI in SMX 4.x.
A plain WAR file can be deployed as well. You can for example just drop a .war file in the deploy directory. If you deploy from the shell, you need to prefix the deployer with war so it knows to use the war deployer.
There is some documentation about the various pluggable deployers here
http://fusesource.com/docs/esbent/7.0/esb_deploy_osgi/UrlHandlers.html
For example to install an Apache Wicket WAR example using Maven you can do from the shell:
osgi:install war:mvn:org.apache.wicket/wicket-examples/1.4.7/war?Web-ContextPath=wicket
The Apache documentation about deployer is mainly documented at Apache Karaf
http://karaf.apache.org/manual/2.2.9/users-guide/deployer.html
Now to deploy OSGi applications can be a bit of pain to assemble. And that is why FuseSource created FAB to make it much easier. I blogged about this a bit, which references to videos and more material: http://www.davsclaus.com/2012/08/osgi-deployment-made-easy-with-fab.html
With FAB you can just deploy regular Maven projects out of the box without any OSGi pain.
If your project is a maven project, you can try :
mvn install
Then start your servicemix, and in servicemix command line :
install mvn:groupId/artifactId/version
This will prompt a bundle ID. Then, juste start the bundle :
start <bundle_id>
You can check the state of your bundle with command "list"
The project has to be a bundle to be installed in servicemix / karaf. So the steps to make a camel project work in OSGi are the following.
Use the maven bundle plugin in the pom and configure it to import / export the necessary packages if necessary.
Make sure your camel context is defined in a way that OSGi can start. This is either in the activator of the bundle or in a spring config in the right location or with a blueprint config in the right location.
See two of my karaf tutorials for the details:
CXF: http://www.liquid-reality.de/x/EoBk
Camel: http://www.liquid-reality.de/x/G4Bk

use zeromq inside an eclipse plugin

I am trying to use zeromq inside an eclipse plugin.
The OSGi framework denies the use of normal external jars; thus, the solution is to bundle them into plugins themselves. Following a simple process (described also in
http://www.vogella.de/articles/EclipseJarToPlugin/article.html), I managed to use some of the external jars I needed without any suffering.
However, when I tried to bundle the jzmq.jar, I am having issues. The 'zmq plugin' is created easily but, once it is used, it freezes by looping into org.eclipse.ui.internal.Workbench.runEventLoop.
Anyone of you ever used zeromq inside an eclipse plugin successfully?
Any hint on how to solve this issue?

Problems with Maven 2

I recently started to use Maven2 in one of my Java web application projects. Now I had many issues with it, some times project fails to build for no apparent reason and then it suddenly starts to work when nothing was done at all to project. Or some times our project members must delete project from their harddrive and download project again from SVN. There seems to be many very odd bugs in Maven in eclipse, but there some issues I would like know if it is possible to solve this issues.
1) I have understood that Maven2 should be able to get dependencies for added jars, but when I add a new dependency in Eclipse, it fails when I build it, it says dependecies are missing. How can I make maven to download those missing dependecies automatically?
2) I have Tuckey UrlRewrite Filter in use, but public repositories have only old version of this dependecy, so when I use this old version (3.1 when I need 3.2). How can I include this to project? We have many programmers in this project, so setting up local repository would mean that all our programmers would have to install that local repository.
Now I had many issues with it, some times project fails to build for no apparent reason and then it suddenly starts to work when nothing was done at all to project. (...)
Ok and what is the point of this free rant? I use Maven and my builds are 100% reproducible, there are well known practices to follow to achieve this. Maybe you're just not following them. Anyway if you're not happy with it, what can I say, don't use it.
I have understood that Maven2 should be able to get dependencies for added jars, but when I add a new dependency in Eclipse, it fails when I build it, it says dependencies are missing. How can I make maven to download those missing dependencies automatically?
I think you misunderstood, Eclipse won't guess what Maven coordinates to add if you don't provide the required informations for them. Dependencies must be declared in the POM, either by editing the POM manually or by using m2eclipse wizards.
And if this is what you did (and if I misunderstood the question) then please provide the <dependency> declaration and the exact error trace.
I have Tuckey UrlRewrite Filter in use, but public repositories have only old version of this dependecy, so when I use this old version (3.1 when I need 3.2). How can I include this to project? We have many programmers in this project, so setting up local repository would mean that all our programmers would have to install that local repository.
This question has already been asked several times, see for example Maven, how to add additional libs not available in repo where I suggest two possible solutions (use a corporate repository like Nexus or a "file-based" repository, the former suggestion being the preferred one for a long term solution).

Maven Project - github

Is it possible to publish your site reports to github? For instance, I run Checkstyle, Findbugs, Cross Reference, and other plugins and would like to have that publicly available. Since my project is already there, I'd like to just keep it there.
With the state of the plugins that exist now, you'd have to do some shimming. The site command (per your comments: wanting to use mvn:site) has a mechanism (stage) for pushing the resulting site somewhere, but it's all mostly predicated on SCP'ing it around to some final destination. For github, I don't think there's any obvious place to land things like that.
The solution would be to write something that extended the site plugin to check in the results to Github using the github pages functionality. Details on the github pages bits are available at http://pages.github.com/. To get there, you'll be writing something that checks in your resulting site to a root branch "gh-pages" and going from there.
There are maven github plugins wich works fine for me.
feature:
deploy artifacts
download artifacts
deploy site to gh-pages
See: https://github.com/github/maven-plugins and fork the example project at https://github.com/kevinsawicki/github-maven-example to try out.
The Maven way to publish your reports would be to build the Maven site and to deploy it using FTP, SCP or DAV.
I don't know if GitHub provides hosting space and supports any of this protocol. If it does, then the following resources will help:
Deploying a Site in the site plugin Usage page
10.6. Deploying Your Project Website
Maven 2: Getting "mvn site:deploy" to work
Releasing Maven projects to Github
Site Distribution in the POM Reference
If it doesn't, better look for another place to host your site.
I'm using this plugin for that: http://synergian.github.com/wagon-git/