Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TomEE profile: switch to TomEE 10 M3, wildfly-arquillian-container 5.0.1 #243

Merged
merged 4 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 37 additions & 6 deletions build/ftest-base/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -188,22 +188,53 @@
</arquillian.container.distribution>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.tomee</groupId>
<artifactId>arquillian-tomee-remote</artifactId>
<version>${version.tomee}</version>
<scope>test</scope>
</dependency>
<!--The dependency on the servlet api must be declared for each profile, see detailed explanation in the
test "org.jboss.arquillian.warp.jsf.ftest.lifecycle.TestFacesLifecycleFailurePropagation" in "jsf-ftest" project.
Also, it must be declared before "org.apache.tomee:arquillian-tomee-remote", because the latter brings "org.apache.tomee:jakartaee-api",
which also contains a "ServletException", but with a different SerialVersionUID. Thus the error described in "TestFacesLifecycleFailurePropagation"
would occur.
If we declare the servlet api jar before the arquillian jar, the ServletException class is loaded from there.
-->
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-servlet-api</artifactId>
<scope>provided</scope>
<version>${version.tomee.tomcat}</version>
</dependency>
<dependency>
<groupId>org.apache.tomee</groupId>
<artifactId>arquillian-tomee-remote</artifactId>
<version>${version.tomee}</version>
<scope>test</scope>
</dependency>
</dependencies>

<!--This profile requires Java 17 to run, as this is required by TomEE -->
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.5.0</version>
<executions>
<execution>
<id>enforce-java</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireJavaVersion>
<version>17</version>
</requireJavaVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<!-- Don't run this profile on windows: the test performance will be incredibly poor (90 seconds per test).
Expand Down
5 changes: 4 additions & 1 deletion extension/jsf-ftest/src/main/webapp/WEB-INF/beans.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,8 @@
limitations under the License.
-->
<beans xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://docs.jboss.org/cdi/beans_1_0.xsd">
<beans version="4.0"
xmlns="https://jakarta.ee/xml/ns/jakartaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/beans_4_0.xsd"
bean-discovery-mode="annotated">
</beans>
7 changes: 4 additions & 3 deletions extension/jsf-ftest/src/main/webapp/WEB-INF/web.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@
limitations under the License.

-->
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://jakarta.ee/xml/ns/jakartaee"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd"
version="6.0">

<!-- Set the PROJECT_STAGE to 'Development' to receive constructive error messages during development.
Change the PROJECT_STAGE to 'Production' when putting the application into production -->
Expand Down
6 changes: 3 additions & 3 deletions extension/jsf-ftest/src/main/webapp/index.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core">
xmlns:ui="jakarta.faces.facelets"
xmlns:h="jakarta.faces.html"
xmlns:f="jakarta.faces.core">

<body>
<ui:composition template="/templates/template.xhtml">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import org.jboss.arquillian.warp.jsf.AfterPhase;
import org.jboss.arquillian.warp.jsf.BeforePhase;
import org.jboss.arquillian.warp.jsf.Phase;
import org.jboss.arquillian.warp.jsf.ftest.cdi.CdiBean;
import org.jboss.arquillian.warp.jsf.ftest.faces.FacesBean;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.WebArchive;
Expand All @@ -59,6 +60,8 @@ public static WebArchive createDeployment() {

return ShrinkWrap.create(WebArchive.class, "jsf-test.war")
.addClasses(FacesBean.class)
//Not required for a successful unit test, but it is used on "index.xhtml".
.addClasses(CdiBean.class)
.addAsWebResource(new File("src/main/webapp/index.xhtml"))
.addAsWebResource(new File("src/main/webapp/templates/template.xhtml"), "templates/template.xhtml")
.addAsWebInfResource(new File("src/main/webapp/WEB-INF/web.xml"))
Expand Down
8 changes: 6 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,14 @@
<modular.jdk.args />

<!-- Container Versions -->
<version.tomee>8.0.14</version.tomee>
<version.tomee>10.0.0-M3</version.tomee>
<!-- Tomcat version bundled with TomEE - see https://tomee.apache.org/comparison.html
The version can be found in "bin/servlet-api.jar"
It does not have to match exactly the version bundled with TomEE, but it should be at least the same JakartaEE spec version.-->
<version.tomee.tomcat>10.1.30</version.tomee.tomcat>
<version.glassfish>5.1.0</version.glassfish>
<version.wildfly>33.0.0.Final</version.wildfly>
<version.wildfly.arquillian.container>5.0.0.Final</version.wildfly.arquillian.container>
<version.wildfly.arquillian.container>5.0.1.Final</version.wildfly.arquillian.container>
</properties>

<modules>
Expand Down
Loading