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!
Related
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>
I am converting an existing flex project to a maven project using the IntelliJ IDEA. As per the R&D on google, I have added the pom.xml file and I have resolved multiple issues by adding the required dependencies. However, I am stuck at one point now where despite adding the required dependency in pom file, the 'compile' goal keeps throwing error.
Error:
Failed to execute goal
net.flexmojos.oss:flexmojos-maven-plugin:7.1.0:compile-swf
(default-compile-swf) on project TA_UI_Test1:
java.lang.reflect.InvocationTargetException: Global artifact is not
available. Make sure to add 'playerglobal' or 'airglobal' to this
project. -> [Help 1]
pom.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.test</groupId>
<artifactId>TA_UI_Test1</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>swf</packaging>
<name>TA_UI_Test1 Flex</name>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<groupId>net.flexmojos.oss</groupId>
<artifactId>flexmojos-maven-plugin</artifactId>
<version>7.1.0</version>
<extensions>true</extensions>
<configuration>
<sourceFile>Main.mxml</sourceFile>
<debug>true</debug>
<!--<swfVersion>11</swfVersion>-->
<!--<targetPlayer>10.2</targetPlayer>-->
</configuration>
<dependencies>
<dependency>
<groupId>com.adobe.flex</groupId>
<artifactId>compiler</artifactId>
<version>4.6.b.23201</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>com.adobe.flex.compiler</groupId>
<artifactId>flex-compiler-oem</artifactId>
<version>4.1.0.16076</version>
</dependency>
<dependency>
<groupId>com.adobe.flex.compiler</groupId>
<artifactId>mxmlc</artifactId>
<version>4.1.0.16076</version>
</dependency>
<!--<dependency>-->
<!--<groupId>com.adobe.flex.framework</groupId>-->
<!--<artifactId>playerglobal</artifactId>-->
<!--<version>10-3.3.0.4852</version>-->
<!--<type>swc</type>-->
<!--</dependency>-->
<!--<dependency>-->
<!--<groupId>com.adobe.flex.framework</groupId>-->
<!--<artifactId>playerglobal</artifactId>-->
<!--<version>4.5.1.21328</version>-->
<!--<classifier>10</classifier>-->
<!--<type>2.swc</type>-->
<!--</dependency>-->
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>playerglobal</artifactId>
<version>3.2.0.3958</version>
<classifier>9</classifier>
<type>swc</type>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>flex-framework</artifactId>
<version>4.6.b.23201</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>com.adobe.flex.compiler</groupId>
<artifactId>asdoc</artifactId>
<version>4.6.b.23201</version>
</dependency>
<dependency>
<groupId>com.adobe.flex</groupId>
<artifactId>compiler</artifactId>
<version>4.6.b.23201</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>com.adobe.flex.compiler</groupId>
<artifactId>flex-compiler-oem</artifactId>
<version>3.6.0.16995</version>
</dependency>
<dependency>
<groupId>com.adobe.flexunit</groupId>
<artifactId>flexunit</artifactId>
<version>0.85</version>
<type>swc</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.adobe.flex.compiler</groupId>
<artifactId>mxmlc</artifactId>
<version>4.1.0.16076</version>
</dependency>
<!--<dependency>-->
<!--<groupId>com.adobe.flex.framework</groupId>-->
<!--<artifactId>playerglobal</artifactId>-->
<!--<version>10-3.3.0.4852</version>-->
<!--<classifier>10.2</classifier>-->
<!--<type>swc</type>-->
<!--</dependency>-->
<!--<dependency>-->
<!--<groupId>com.adobe.flex.framework</groupId>-->
<!--<artifactId>playerglobal</artifactId>-->
<!--<version>4.5.1.21328</version>-->
<!--<classifier>10</classifier>-->
<!--<type>2.swc</type>-->
<!--</dependency>-->
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>playerglobal</artifactId>
<version>3.2.0.3958</version>
<classifier>9</classifier>
<type>swc</type>
</dependency>
</dependencies>
</project>
Things I have tried:
1. I have added the required dependency of artifact playerglobal as seen in above pom.xml file, and I have tried with 3 different versions of it (seen above in pom). However, none of them helps.
2. I have tried adding playerglobal dependency inside the 'plugin' node, and also inside the common 'dependencies' node separately in pom. However, any of them are not helping. [Reason to try both these things is that for other couple of dependencies of flex-compiler-oem and mxmlc, it was not recognizing required classes when the dependencies were added just in the common 'dependencies' node. When I added them inside the 'plugin dependencies', then it moved on from those errors.]
3. As per this article, I have also tried keeping the 'com.adobe.flex > compiler' right after 'configuration' node. However, that also doesn't help.
4. I am using Maven 3.2.5 right now, but I have tried with various other maven versions like 3.3.9, 3.0.5, 3.1.1 too. They are also not helping. (3.3.9 is not supported for flexmojos-maven-plugin 7.1.0 as per this article. It also says that maven 3.2.5 is working fine though. Using maven 3.0.5 says that minimum required maven version is 3.1.1. And using maven 3.1.1 gives same error as I am getting right now with maven 3.2.5.)
My SDK/IDE versions:
Maven: 3.2.5
Flex: 3.2.0
JDK: 1.8
IntelliJ IDEA: Ultimate 2017.1
Any help would be greatly appreciated. Thanks in advance.
I don't know to what extent you’re familiar with using Flex in the Maven world, but there were many discussions on what to do with Flex in a post-Flash world (I haven’t had to deal with setting up and maintaining Flex Maven-based projects in about 5-6 years now). Basically, Adobe didn’t want to publish their artifacts to Maven Central, they used to have their own repositories. Then Adobe disowned their Flex project and contributed it to Apache (if I recall correctly, not all of it, but most of it). The guys at Apache re-worked things to a large extent and have been the ones developing it now.
To be honest, I haven’t followed up on Flex over the years, as I think there is no point in using it anymore, as with HTML5, Flex seems as an obsolete technology. The world is no longer using Flash and this has brought a lot benefits to everyone. However, this is just my opinion and I’m not a UI expert.
The guys at Apache decided not to reset the versions and continue where Adobe left – just the artifact coordinates were changed. The groupId-s are now org.apache.flex* (you can check the Apache Flex dependencies published here), instead of com.apache.*. These artifacts are now available via Maven Central. You should switch to a newer version of Maven and use at least 3.3.9.
For more on the history of the project (which is actually quite important, if you’d like to get a better understanding of the dependency mess and what’s now a point of truth and what’s not, please check here and here). The Flex documentation is now on the Apache site. This page is perhaps the most recent and detailed one that I could find, although I’m not 100% sure it’s up-to-date.
You will have to do some further reading up and investigation, but based on your example above, it looks like you're using very, very old versions of the Flex libraries. I would recommend using Maven Central's search engine and searching for each of the artifactId-s and replacing them with the most recent ones and seeing how that goes...
Good luck! :)
I have addressed above issue now. I came across some links which talked about mavenizing the Flex SDK, such as this and this. The second link is the one suggested by carlspring in his above answer; however, I could not follow its steps fully since the git URL mentioned in it is blocked in my company network. So I downloaded the code from the former link and created the mavenizer, and executed it as per the steps given in the link to generate the mavenized SDK. (I faced an issue in the mavenizer where the connection to external maven repository is done to check for updates, so I commented that code and created mavenized SDK successfully after that.)
After generating the Mavenized SDK, you just have to copy it in your local maven repository, and then the playerglobal/airglobal dependencies will successfully get resolved.
Note: In addition to the first link mentioned above, refer to this link as well, which has more detailed steps of mavenizing the Flex SDK. It helped me a lot in creating the folder structure properly.
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>
I get vaadin-client-compiler artifact (which brings Jetty with it) included with my production project. Am I supposed to ?
To reproduce I'm starting from scratch and letting Maven generate a Vaadin multimodule project for me:
mvn
-DarchetypeGroupId=com.vaadin
-DarchetypeArtifactId=vaadin-archetype-application-multimodule
-DarchetypeVersion=7.6.2
-DarchetypeRepository=http://repo.maven.apache.org/maven2/
-DgroupId=com.acme
-DartifactId=VaadinTest1
-Dversion=1.0.0-SNAPSHOT
-Dpackage=com.acme.vaadintest1
-Dbasedir=D:\\dev\\java
-DthemeName=mytheme
-DwidgetsetName=MyAppWidgetset
-DuiName=MyUI
-Darchetype.interactive=false
--batch-mode archetype:generate
Then in the parent project I execute:
mvn -Pproduction clean install
After this is done I look into the WAR file generated in the "xxx-production" project and notice it contains vaadin-client-compiler, Jetty, and what not.
I've found this ticket and by looking at the last comment it seems I shouldn't have anything like that in my production WAR. I hesitate to change my POMs as they are generated by the archetype and I guess at some level supposed to represent kind of a Vaadin best-practice approach. I wouldn't want to second guess that. Or ?
The problem with these artifacts being part of the classpath is that
it balloons the size of the WAR
it creates some problems wrt Atmosphere which supposedly gets confused because it finds Jetty on the classpath. (Atmosphere is used under the hood by Vaadin)
The result is that you'll get SEVERE error like this in the log when deploying on Tomcat 8:
14-Feb-2016 16:42:30.368 SEVERE [localhost-startStop-1] org.atmosphere.cpr.DefaultAsyncSupportResolver.newCometSupport Failed to create comet support class: class org.
atmosphere.container.JettyServlet30AsyncSupportWithWebSocket, error: null
To sum up:
Is it correct that I'm not supposed to have these artifacts in a
Vaadin 7.6.2 production project ?
How to solve ?
I believe I've found the answer. It seems Vaadin team was/is fully aware of this but it is kind of a left-over from the old days when there was some kind of annoying bug.
In your xxx-widgetset project you'll see something like this in the POM for that project:
<dependencies>
<!-- Versions for these are configured in the parent POM -->
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-client</artifactId>
<!-- TODO this should have scope provided once http://dev.vaadin.com/ticket/14788 is resolved -->
<!-- <scope>provided</scope> -->
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-client-compiler</artifactId>
<!-- TODO this should have scope provided once http://dev.vaadin.com/ticket/14788 is resolved -->
<!-- <scope>provided</scope> -->
</dependency>
... you'll see more deps here if you've added
... Vaadin add-ons to your project.
</dependencies>
See the TODO comments ??
Well, it just so happens that the bug mentioned in ticket 14788 doesn't happen anymore, at least not on 7.6.2. So you can now safely do what the TODO comment says.
This has reduced my WAR size by 50-70 pct.
It seems to me there's no longer any good reason why this archetype generation doesn't actually do what TODO comment says. Currently you'll have to manually correct it every time you generate a new project skeleton.
If you work with a different webserver (in your case Tomcat 8) you don't need the provided jetty-plugin.
As the archetype has some jetty-dependencies you can exclude them with the
exclusions tag in the Maven POM file.
Example
<groupId>com.vaadin</groupId>
<artifactId>vaadin-client-compiler</artifactId>
<version>${vaadin.version}</version>
<exclusions>
<exclusion>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlets</artifactId>
</exclusion>
<exclusion>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-annotations</artifactId>
</exclusion>
<exclusion>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-util</artifactId>
</exclusion>
</exclusions>
Moreover delete/comment out all unnecessary "jetty" dependencies found in the module POM files.
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