Supported libraries for Quarkus AWS S3 - quarkus

Good evening,
I was redirected to ask my question here instead of Quarkus github.
I would like to check which AWS S3 library is supported by Quarkus?
Searching through the maven repository:
https://mvnrepository.com/search?q=quarkus+s3
The closest I could find was the Camel Quarkus :: AWS S3 :: Runtime but I believe that's not the right one. Thank you!

There is a PR, under review at the moment, that introduces AWS S3 extension both JVM & Native.
AWS clients are fully Quarkified, meaning configured via application.properties and enabled for dependency injection. In a longer term it will enable other AWS clients too.

I've used the S3 client from Amazon SDK in JVM mode without any problem with this dependency:
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>s3</artifactId>
<version>${amazon.sdk.version}</version>
</dependency>
But it won't work in native mode though.

software.amazon.awssdk.services.s3.S3AsyncClient works out of the box for Quarkus/JVM application.
Add this to your Dependency Management section of your pom.xml file:
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>bom</artifactId>
<version>2.10.70</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Then add the S3 dependencies:
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>s3</artifactId>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>netty-nio-client</artifactId>
</dependency>
However in order to work in Native mode you have to register for reflection some filters.
I've created a simple AWS S3 extension about it.
Just add this dependency to your pom.xml:
<dependency>
<groupId>com.github.tpenakov.otaibe-commons-quarkus</groupId>
<artifactId>otaibe-commons-quarkus-aws-extension</artifactId>
<version>00.00.07.01</version>
</dependency>
Then add the Jitpack repository:
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>

Related

DistributedMap feature: how to use it

How to use the Liberty's distributedmap feature in a Java application?
Where I can find the required Maven dependencies (com.ibm.websphere.cache..)?
The Maven dependencies for WebSphere features like the DistributedMap are defined in the https://github.com/WASdev/ci.maven.tools repository and they are published on Maven central.
The following dependency loads all APIs:
<dependency>
<groupId>net.wasdev.maven.tools.targets</groupId>
<artifactId>liberty-apis</artifactId>
<version>${liberty.dependency.version}</version>
<scope>provided</scope>
<type>pom</type>
</dependency>
The Maven coordinates for the distributedMap API would be:
<dependency>
<groupId>com.ibm.websphere.appserver.api</groupId>
<artifactId>com.ibm.websphere.appserver.api.distributedMap</artifactId>
<version>2.0.68</version>
</dependency>
Each release of Liberty will have a different version, but that is from 22.0.0.9 the latest version as of this response. I found this by using search.maven.org and searching for distributedMap. This should work for other features APIs as well.

Is there a link between org.wildfly.bom and the version of the wildfly server used?

I'm currently developing some applications and I'm using wildfly 9.0.2.Final as the application server. Currently I'm using bom version 8.2.2.Final for the following artifacts:
jboss-javaee-7.0-with-tools
jboss-javaee-7.0-with-hibernate
jboss-javaee-7.0-with-security
I've started using these versions while following a tutorial. However I've seen that now wildfly 10 is out and probably some other dependencies also have dependencies. Maybe in the future javaee-8.0 will be available.
Is there some documentation on what the different artifacts include and maybe what should be kept in mind when upgrading the parent bom version?
With WildFly 9+ boms we changed structure a bit, so now we only have 2 boms.
Where most of them were merged into one.
wildfly-javaee7
wildfly-javaee7-with-tools
Where second one includes not only APIs but also tools that are useful for testing like arquillian, junit, etc...
so best for your needs would be to use this in your pom.xml
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.wildfly.bom</groupId>
<artifactId>wildfly-javaee7-with-tools</artifactId>
<scope>import</scope>
<type>pom</type>
<version>10.0.0.Final</version>
</dependency>
</dependencies>
</dependencyManagement>
you can always find latest info and docs on how to use it at github at repository https://github.com/wildfly/boms
Your BOM version should match your deployment Wildfly version.
Assuming you use provided scope for dependencies that are provided by Wildfly, you want to ensure you're using the correct versions. If you use a wrong version, your application might not work as expected or even fail to start, because some API might be deprecated/removed, or because some features might not be available yet.
Side note: Wildfly BOMs lack some dependencies, so we're using parent as BOM:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-parent</artifactId>
<version>9.0.2.Final</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

Web Application using JavaCV and deployed on SAP HANA Cloud Platform error

I'm currently working on a face recognition web application using JavaCV. I send snapshots of a live webcam stream on a client's browser over websockets and the face recognition system does all the rest on the server side. However, I receive the following error when deploying my application on HCP.
no jniopencv_core in java.library.path
I have added all the jar files related to javacv/javacpp in my project lib folder and
this is my pom.xml
<dependency>
<groupId>org.bytedeco</groupId>
<artifactId>javacv</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>org.bytedeco.javacpp-presets</groupId>
<artifactId>opencv</artifactId>
<version>3.0.0-1.1</version>
</dependency>
<dependency>
<groupId>org.bytedeco</groupId>
<artifactId>javacpp</artifactId>
<version>1.1</version>
</dependency>
Any ideas? Thanks in advance.
For some reason, Maven isn't picking up the platform dependencies properly. Add something like the following to fix that error:
<dependency>
<groupId>org.bytedeco.javacpp-presets</groupId>
<artifactId>opencv</artifactId>
<version>3.0.0-1.1</version>
<classifier>linux-x86_64</version>
</dependency>

How can i find which release of OSGI is supported by CQ5.5 .?

How can we find which release of OSGi is supported by CQ5.5 version, Is there any log file where i can find out the OSGi release in the CQ5 product?
CQ5.5 uses Apache Felix which is
... a community effort to implement the OSGi R4 Service Platform and other interesting OSGi-related technologies under the Apache license
The references to OSGI in the javadocs at dev.day.com point to R4 v4.2 specifically. This matches the compliance tests for the felix project
If you're building against the OSGI APIs in your application, then you'll need to add the following to your project pom.xml (assuming you're using maven):
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
<version>4.2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.compendium</artifactId>
<version>4.2.0</version>
<scope>provided</scope>
</dependency>
in CQ 5.6 we don't use the org.ogsi dependencies anymore. instead we have (amongst others)
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.commons.osgi</artifactId>
<version>2.2.0</version>
<scope>provided</scope>
</dependency
also you have (again in 5.6, not sure about 5.5) a depfinder
http://localhost:4502/system/console/depfinder
here you can see which package/version a certain class you need belongs to.
The implementation of OSGi used by CQ is Apache Felix, which implements OSGi Service Platform Release 4.
You can find out more detail about CQ's Technical Foundation at http://dev.day.com/docs/en/cq/5-5/exploring/concepts.html

Looking for Tomcat6 customisation on Cloudbees to add 3rd party jars

I have been searching in the documentation for Clickstack and on the Cloudbees Community Github to create a custom container. There is a standard template for apps and one project for Tomcat7 but none forking the Cloudbees default Tomcat6.
I would like to add some dependencies into the Tomcat6 container instead of bundling them in the application WAR.
For example, an application could have AWS sdk as provided in pom.xml
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk</artifactId>
<version>1.4.5</version>
<scope>provided</scope>
</dependency>
this seems simple. However (in my little understanding of things) do I need to develop the container from scratch?
The tomcat6 one has a long history - and is called "staxcat"
https://github.com/CloudBees-community/staxcat-clickstack
You can certainly fork and base it off that. The approach with tomcat7 was to have a less customised stack - closer to vanilla tomcat7.
My recommendation is to use tomcat7 as a starting point - if you can at all (tomcat6 is becoming a tad old now!)- but if you really need tomcat6, staxcat might be the repo to look at!

Resources