Missing Dependencies of Jboss 5 in Jboss 7 - maven

I am trying to port a project from Jboss 5 to Jboss 7. I have these dependencies in Maven under dependency management in pom.xml:
<dependency>
<groupId>org.jboss.jbossas</groupId>
<artifactId>jboss-as-system-jmx</artifactId>
<version>5.1.0.GA</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.jbossas</groupId>
<artifactId>jboss-as-system</artifactId>
<version>5.1.0.GA</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.jbossas</groupId>
<artifactId>jboss-as-j2se</artifactId>
<version>5.1.0.GA</version>
<scope>provided</scope>
</dependency>
What would be the corresponding Jboss 7 dependencies?
It seems that the name of the groupid has changed to org.jboss.as but the included artifacts don't have the same names. Are they included in other artifacts?

The core of JBoss 7 was completely rewritten since JBoss 5.
If you had dependencies on jboss system, you'll probably need to re-evaluate them to see why you needed them in the first place and what it could correspondend to in JBoss 7.
Start with the nexus search at:
https://repository.jboss.org/nexus/index.html#nexus-search;gav~org.jboss.as~~~~
You can do a classname search there as well.

Related

Spring Boot 3 JSP Issue

I've been having issues with JSP since moving to Java 17 and Spring Boot 3. I know that we need to use jakarta.* instead of javax.*, but is there something I'm missing? I am using Spring Tools 4 and just running a basic web app using JSP. When using the following dependencies
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.glassfish.web</groupId>
<artifactId>jakarta.servlet.jsp.jstl</artifactId>
</dependency>
The project runs, but I get the following error
The superclass "javax.servlet.http.HttpServlet", determined from the Dynamic Web Module facet version (2.5), was not found on the Java Build Path
I can get rid of it by adding the javax servlet dependency
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>4.0.1</version>
<scope>provided</scope>
</dependency>
But that goes against using javax.* dependencies with Spring Boot 3.
I have read these articles and tried adding the jakarta.servlet.jsp dependency with no luck.
https://debugah.com/solved-tomcat10-error-jakarta-servlet-servletexception-class-com-kuang-servlet-helloservlet-is-not-a-servlet-22749/
https://howtodoinjava.com/java/exception-handling/solved-the-superclass-javax-servlet-http-httpservlet-was-not-found-on-the-java-build-path-in-eclipse/
Solved!
All I had to do was go into Project Properties and under Project Faces, change my Dynamic Web Module from 2.5 to 5.0
The JSTL warning can be suppressed under Properties->Web->JSP Files->Validation->Custom actions->Other problems with TagExtraInfo class (Just change from 'Warning' to 'Ignore')

Spring Boot - Cleaning up Tomcat dependencies when creating a non-executable war file

From the Spring Boot documentation:
To build a war file that is both executable and deployable into an external container you need to mark the embedded container dependencies as “provided”.
Which looks like this:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
However various tomcat packages still remain as dependencies (and thus show up in my /lib folder), namely:
tomcat-embed-el (a dependency of spring-boot-starter-validation)
tomcat-jdbc (a dependency of spring-boot-starter-jdbc)
Since I will only ever need to deploy my application inside a container and never to run it standalone, how should I proceed with disposing of these dependencies?
P.S. It seems that the first dependency issue is fixed in 1.4.0.M2, see
https://github.com/spring-projects/spring-boot/issues/5454

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

BoneCP JDK 5 Maven Depedendency

How do you have to configure maven to pull down the JDK5 version of BoneCP?
You need to specify a classifier in the dependency
<dependency>
<groupId>com.jolbox</groupId>
<artifactId>bonecp</artifactId>
<version>0.7.1.RELEASE</version>
<classifier>jdk5</classifier>
</dependency>
Version 0.8.0-rc1 works on JDK 5

Is there a maven JBOSS dependency that includes all JBOSS runtime jars?

I have a maven application that will be deployed to JBOSS 5.1 as a war. I want to know how to get it so that Maven can use the JBOSS 5.1 jars (i.e. all the jars in the common/lib folder and any other resources available to JBOSS at runtime) at compile time but not bundle them into the war file.
I thought I could just include some kind of JBOSS dependency with provided scope to do this however I can't find such a dependency. I have done a good bit of searching and can't really find such a dependency. There are a lot of references to pointing to a central JBOSS repository and pulling dependencies from there. I thought there would be just one global dependency that would include all JBOSS runtime jars. Os there such a thing?
If you need more than the standard Java EE API like JBoss packages or resolve some compatibility problems, you can use this dependency :
For JBoss / Java EE 7 Specification APIs
<dependency>
<groupId>org.jboss.spec</groupId>
<artifactId>jboss-javaee-7.0</artifactId>
<version>1.0.1.Final</version>
<type>pom</type>
<scope>provided</scope>
</dependency>
For JBoss / Java EE 6 Specification APIs
<dependency>
<groupId>org.jboss.spec</groupId>
<artifactId>jboss-javaee-6.0</artifactId>
<version>3.0.2.Final</version>
<type>pom</type>
<scope>provided</scope>
</dependency>
For JBoss WildFly 8.2.0.Final complete runtime dependencies
<dependency>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-parent</artifactId>
<version>8.2.0.Final</version>
<type>pom</type>
<scope>provided</scope>
</dependency>
Now, you can also use those POM files to extract the specific dependencies you need.
This could be useful in remote debug time to let your IDE resolve automatically the server dependencies jars and sources currently loaded, or appearing in stacktraces ... in development mode.
In a production MAVEN build, you probably just need this kind of configuration (depending on your JBoss version) :
http://www.mastertheboss.com/jboss-server/wildfly-8/maven-configuration-for-java-ee-7-projects-on-wildfly
Considering JBoss is an EE container, adding the JavaEE dependency should be enough.
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>6.0</version>
<scope>provided</scope>
</dependency>
Scope provided ensures that JBoss's own libraries are used once the application is deployed to the server.

Resources