Apache Commons CLI Color Support - apache-commons-cli

I'm building a new CLI tool with java / gradle, and from looking around it seemed like Apache Commons CLI was the way to go (please correct me if that's wrong).
I have a command which outputs some text and eventually progress bars etc.
Does Apache Commons CLI have support to add color? Or is there a framework which I can add which does?

Since your requirements are Java and ANSI color, picocli is the actively maintained choice.
https://github.com/remkop/picocli
There are other options from the answer here:
https://softwarerecs.stackexchange.com/questions/16450/what-library-should-i-use-for-handling-cli-arguments-for-my-java-program

Related

Does Eclipse based graphical Camel editor from JBoss - RedHat codeready work only for camel in xml?

I have been looking for a visualizer for apache camel and found Eclipse based graphical Camel editor from JBoss. But after installation of RedHat codeready studio and using the sample project in it, seems like it supports only camel-context.xml. My routes are in Java DSL. Is there no tool available for visualizing Java routes
No there is no visual tools for editing Java DSL.
Usually a real programming language such as Java is best used by developers whom can write code.
And for visual tools with drag/drop etc then its high level where such tool generates the "code" in a markup language such as XML, YAML or custom format.
The Java DSL is high level and non savy Java developers can get comforable with just coding. Also users that have started with the visual XML editor would after some time get used to working directly with the XML code.
You can use Hawtio with the Camel plugin to visualize your Java DSL routes graphically. It also exposes a UI for viewing/downloading (and even editing) Java routes as XML, enabling you to bring them into the Eclipse-based FUSE Tooling, if you wanted to.
According to the Hawtio website, JBoss FUSE already includes Hawtio.

Converting from Red Hat Fuse 3.x to 7.4 - JBI

We currently have a JBI app running on Red Hat Fuse ESB 3.x and intend to transition to a supported version of Fuse ESB 7.4
I am looking for some type of document or guidance on converting our JBI app... as I understand JBI packaging has been deprecated in favor of OSGI ...I am just looking for some documents that may shed some light on the process required to transition the JBI app to OSGI... I am wondering if this is a matter of using straight up Camel for what we need or if there are deeper considerations.
Yes, the best practice is to refactor to Apache Camel for integration and Apache Karaf replaces the ServiceMix runtime.
Tons of sample code here: Apache Karaf Examples
Specifically, a Camel Example

Eclipse with Red Hat Codeready (Fuse Integration) developing for Wildfly Application Server

I'm a little bit con-fuse-d with Red Hats Fuse tooling.
Here's what I'd like to do: Design Camel Routes with Eclipse (2020-03) and then deploy them to a Wildfly server (16 or 18) with the wildfly-camel patch applied.
This generally works, BUT:
The version of Fuse in the tool is 7.6 (latest) with a highest available camel version of 2.21(!) which is very old. The wildfly-camel patch already supports camel 3.0. on wildfly 18. Question: Is it possible to "update" Fuse Tooling within Codeready to newer versions of camel?
Fuse itself supports lots of camel components / connectors as can be seen here. But not all of them are available in Codeready. Plus that some of the components state to be compatible for example with camel versions greater than 2.8. Question: How to add these components to the visual design UI of Fuse Tooling?
I fear that it all is a matter of the outdated version of camel, but I want to be sure that I didn't miss anything. To those who know: Are there any plans of updating the Tool for Eclipse?
Fuse Tools for Eclipse is primarily designed to work with Red Hat Fuse which, as you rightly point out, aligns to specific supported versions of Apache Camel.
But, you should be able to create your own Wildfly-Camel project (or use one of the examples) and still use the graphical route editor to add newer components. You'll need to drag a Generic component from the palette and then untick Show only palette components, which should show you all the components available, including ones from newer releases of Camel:
Just tested this with:
Fresh install of Eclipse 2020.03 with Fuse Tools installed
Latest clone of Wildfly-Camel-Examples repo
Opening camel-jms-spring project in Eclipse
Opening src/main/webapp/WEB-INF/camel-context.xml with the graphical route editor
Dragging a new Generic component, XSLT-Saxon, from the Palette.

auto-updating JavaFX/ScalaFX client installation

Is there any ready-made installer, component, api or any combination, that would let a JavaFX application, or any JVM based client for that matter, automatically and securely check for a new version of itself, and get, install and re-launch the new version?
Although not ideal, is it doable at least with sbt?
in the Moment there is only a feature request for Java 9
Take a Look at this aproach which seems straight forward
AutoUpdate by Reportmill
Install4J is a a tool for creating installers for JVM applications, it provides for creation of auto-updates
https://www.ej-technologies.com/products/install4j/features.html
You can also build Install4J projects from SBT using the sbt-install4j plugin (disclaimer: I am the author of the plugin).
I have come to believe that the most practical (partial) solution is Java Web Start. Mature, documented, and comes along with the JRE and JDK. I wonder if anyone had experience with it for ScalaFX or JavaFX applications.

How to use Jersey with Eclipse Helios?

My base need is to use the Jersey framework to develop very basic REST webservices.
I've read several tutorials regarding Jersey (JAX-RS framework) and writing webervices but so for I've not found an easy way to setup a development environment based on Eclipse Helios and Glassfish (Open Source Edition). When creating a Webservice in Eclipse, it seems to use JAX-WS, or when creating a Dynamic Web App, Eclipse reports a credentials error (I use admin/admin) or a wrong user name / password.
The tutorials I've found either use myEclipse, or Tomcat, or Maven. The later works pretty well but I wish I could avoid using the command line because creating the web.xml and other files like that one is really scary, and I'm not sure these files are supposed to be human-written. So I suppose (maybe I'm wrong) using a IDE will make things easier.
What do guys use ? How do you generate these files ? Do you use Eclipse only for writting code or also use the deploy facilities?
Any pointers are appreciated !
Thank you
SCO
You DO need to modify web.xml whenever it's needed. Especially with JAX-RS, you will have to define your servlet in web.xml.
I recommand you to use Maven. There are plenty of exemple in the web to do so. Good luck, JAX-RS is really great ! Maven is also nice.
I also use eclipse for creating and consuming web service based applications. In addition to WTP, I also use Axis plugins to make things easier (through wizards, highlighting as well as for schema verification).
The bottomline is to find the plugins that suit you the best