Quarkus register for reflection external POJOs - native

i have an external lib with POJOs (about +100). I want to register all for reflection as i will use it on my rest client.
Is there a way to RegisterForReflection a whole package ? Should i do it programmatically ReflectiveClassBuildItem.

There is no GraalVM configuration or Quarkus build item that allows a complete package to be registered

Related

Calling Java dependency defined in one mule application from another application

I have a mule application where I have added the external jar files as dependencies and invoking java classes. Now I am working on a different application where I need to use the same external jar files as dependency.
Is there a way I could reuse the first application(with java code) in the second one without added the external jars again as dependencies?
Thanks in advance
You should not add the Mule application as a dependency if you only need to use the Jar files for the Java libraries. Just add the dependencies for the Java libraries to the second application.
If you want to reuse the dependency in an onprem Mule deployment you can add it to a common Mule domain.

MuleSoft: share custom component offline

I would like to build a custom component and share it with my team. I don't want to online upload the new component. Is there an offline way to share components?
I can define my github account instead of Mule's when creating a project. Will then it be private?
Adding details:
I created jars which I want to use in my Mule project. I added 2 Java classes in my project that uses the jars. I also have 3 apps on different computers that needs the jars.
Instead of duplicating these jars and the Java code, I would like to wrap it in a component/ connector and share the component between apps/developers in my team. As far as I understood from reading I can use both connector and component for my needs. However, I couldn't understand how can I share offline what I built.
The best option is to Maven-deploy your common JARs to a private Maven repository. This can be a simple as an S3 bucket or as refined as Nexus server.
This way, your different Mule projects will be able to pull these common JARs in their builds by simply adding them to their pom.xml files.

Web module from custom scratch in IntellijIDEA 11.1.3

When I create new project in the aforementioned IDE, I can select Web Module and then Web Module Type (HTML5 Boilerplate, Twitter Bootstrap, Node.js).
I want to write custom IntellijIDEA Plugin to add custom Web Module Type.
I expect following user action sequence:
User clicks File - New project
Then selects option Create project from scratch
Creates new Web Module
Chooses Custom Scratch web module type
Specifies some preferences (as on picture above)
Clicks Finish
Let say, that I have java class, which receives few arguments and generates all necessary files in new project folder.
How can I create an interface for passing some arguments to my java class, which will make all the rest? As it is made for Node.js Express App.
The documentation for tying into certain pieces of IntelliJ are in the format of "the code is the documentation". This is a bit difficult when you want to interface with commercial plugins only available in the Ultimate Edition.
For open-source integration, you should be able to download the source for the Community Edition and navigate to your heart's content.
For commercial plugin integration, you'll need to find the jar file for that plugin and take a look at the class/method structure to get a guage on what you'll need to call. As far as defining your components in the plugin.xml file, you'll need to look for extension points in the plugin's plugin.xml file and implement those interfaces. There is documentation on the IntelliJ site explaining how to define extension points and define implementations of extension points for other plugins.
I used both of these approaches when I wrote a plugin for configuring an internal framework where I work.

Mocking framework for osgi/eclipse applications?

I am looking for mocking framework to use in my osgi/eclipse test fragments. I have looked at:
http://www.jmock.org/download.html
but since its not osgi I need to convert it manually. I have tried to google for some mocking frameworks that works with osgi out of the box but have not been able to find any, does osgi developers not use mocking?
One solution will be to create mock objects of OSGi objects (like BundleContext and ServiceReference). You can use any mocking framework for this and of course you don't have to run the test in an OSGi container. This will be OK for simple scenarios.
If you want to test inside a container, you have the following options:
Pax-Exam
Spring DM Testing facilities
Actually Mockito works quite good with OSGI applications, since it has OSGI manifest. You can simply add it to your target platform from the latest orbit repository. I managed to make Powermock also working for Eclipse Plugins and it is available as well as update site at https://code.google.com/p/powermock-osgi/

I have servlet-api 2.5 provided, but want to use it during integration tests. Is this possible?

I am using the Jersey Test Framework, that includes servlet-api 2.5 in the test scope. Unfortunately, I have also written my own custom filter that requires me to have access to servlet-api at compile time. I don't want to elevate the scope to "compile" though, because I still don't want it in the war file. Is there any hope?
It is supposed to just work. To quote the reference:
This is much like compile, but
indicates you expect the JDK or a
container to provide the dependency at
runtime. For example, when building a
web application for the Java
Enterprise Edition, you would set the
dependency on the Servlet API and
related Java EE APIs to scope provided
because the web container provides
those classes. This scope is only
available on the compilation and test
classpath, and is not transitive.
Maven downloads the thing, adds it to test and compile classpaths, but does not include it in packaging.