Skip to content

Commit

Permalink
TOMEE-4261 - JakartaEE 10 APIs + OWB4 (#1066)
Browse files Browse the repository at this point in the history
* OWB 4.0.0

* OWB 4.0.0

* Compile issue with EE9.1 api (is dropped in EE10)

* Compile issue with EE9.1 api (is dropped in EE10)

* BOM Fixes

* Move to EE-10 APIs as required by OWB-10
Updates Tomcat to 10.1.x to be compatible with EE-10 APIs

* BOM regeneration after EE10 API move

* Upgrade bval to 3.0.0-SNAPSHOT

* Use BatchEE 2.0.0-SNAPSHOT which is Jakarta converted now

* Remove Jakarta qualifier from arquillian config

* Update arquillian

* MyFaces 4 (picked from #1019)

* Regenerate BOMs

* Use Jakarta 10.0-M1 API consistently

* Update htmlunit, fixes some 9.1.1 api references

* Update htmlunit, fixes some 9.1.1 api references

* Fix tomcat version

* LegacyCookieProcessor does not exist in 10.1.x anymore (cf. apache/tomcat@d78c719)

* Fixes some compile issues

* This method got deprecated in CDI-1.1 and removed in CDI-4.0.Use #getInjectionTargetFactory(AnnotatedType)} instead.

* Fixes related to htmlunit

* Use EE 10.0-M2

* Servlet 5 -> 6 changes

* Servlet 5 -> 6 changes

* Servlet 5 -> 6 changes

* Use 10.0-M2 staging repo

* Use 10.0-M2 staging repo

* Use the 10.0-SNAPSHOT for now to avoid having build resolution issues due to different repos used for resolution in a full build

* Use latest CDI TCK (4.0.10)

* Use latest CDI TCK 4.0.11

* Use correct eclipse compiler version (we relied on a super old version incompatible with 10.1.x)

* Update BOMs with ECJ

* Comments out examples, which require a EE10-capable CXF impl (jakarta.xml.bind.Validator is removed in EE10)

* Fix compile error in scheduler example

* Switch to a SNAPSHOT version, which isn't deployed to ASF repositories from main branch. Otherwise, debugging certain branch states is impossible or extremely painful as SNAPSHOT artifacts might not contain OWB4 dependencies, etc.

* Comments out examples, which require a EE10-capable CXF impl (jakarta.xml.bind.Validator is removed in EE10)

* Revert ECJ upgrade to 3.33.0 (starting from 3.34.0 it requires J17+)

* Examples: Resolving the EL expression does not seem to work in EE10 anymore (deprecation??). For now, setting it to EN only to avoid build errors.

* Exclude JAX-WS tests in arquillian for now as CXF cannot deal with Jakarta XML Binding 4.0 at the moment. This release removed jakarta.xml.bind.Validator (cf. https://jakarta.ee/specifications/xml-binding/4.0/) which is required by CXF.

* Example: Fails due to CXF4 / XML-Bind

* Fixes EE10-related compile issues

* Fixes EE10-related compile issues

* Use Johnzon 2.0.0-SNAPSHOT (native Jakarta)

* Remove excludes as they are no longer required. We can savely use transient deps here

* Use released 10.0-M2 JakartaEE API

* Remove these tests as per discussion on the list (faces is using CDI now)

* OpenJPA 4.0.0-SNAPSHOT (Jakarta, EE9.1) without serp

* Transaction Manager 4.0.0-SNAPSHOT

* Fix up archetype and examples due to OpenJPA 4.0.0-SNAPSHOT

* Remove Staging Repo as artifact is now released

* Add a profile "tck-cdi" to avoid breaking the build for now, we can create issues + enable the profile to be run by default

* Fix mp-rest-jwt-principal after EE10 related upgrades

* Version fixes in arquillian-tomee-moviefun-example

* Upgrade JAXB Runtime to comply with EE10 spec

* Fix JAX-WS related examples

* Fix JAX-WS related arquillian tests

* Fix SoapBinding12ClientTest

* Use BVAL 3.0.0

* This test seems to fail due to a apache/openwebbeans@4e4962a changed needed in OWB 4.0.0 to pass a test in the CDI TCK. Until OWB adds a workaround, we ignore the test on our side to avoid being blocked.

* Geronimo TX Manager 4.0.0
Tomcat 10.1.15

* JAXB Runtime 4.0.4

* Regenerate BOMs (BVAL, TX Manager)

* TOMEE-4264 - Update Apache Santuario Java (xmlsec) to 3.0.3

* Fix checkstyle / rat for TOMEE-4268

* Fix-up after merge of TOMEE-4268

* Fix rest of examples

* Johnzon 2.0.0

---------

Co-authored-by: Jean-Louis Monteiro <[email protected]>
  • Loading branch information
rzo1 and jeanouii authored Nov 8, 2023
1 parent f15c485 commit bc8f54e
Show file tree
Hide file tree
Showing 501 changed files with 2,409 additions and 3,320 deletions.
2 changes: 1 addition & 1 deletion arquillian/arquillian-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<artifactId>arquillian</artifactId>
<groupId>org.apache.tomee</groupId>
<version>10.0.0-SNAPSHOT</version>
<version>10.0.0-M1-SNAPSHOT</version>
</parent>

<artifactId>arquillian-common</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion arquillian/arquillian-openejb-embedded/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>arquillian</artifactId>
<groupId>org.apache.tomee</groupId>
<version>10.0.0-SNAPSHOT</version>
<version>10.0.0-M1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public void enrich(final Object testInstance) {
try {
final BeanManager bm = appContext.getWebBeansContext().getBeanManagerImpl();
final AnnotatedType<?> at = bm.createAnnotatedType(clazz);
bm.createInjectionTarget(at);
bm.getInjectionTargetFactory(at);
final CreationalContext<Object> cc = bm.createCreationalContext(null);
OWBInjector.inject(bm, testInstance, cc);
cc.release();
Expand Down
2 changes: 1 addition & 1 deletion arquillian/arquillian-openejb-transaction-provider/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>arquillian</artifactId>
<groupId>org.apache.tomee</groupId>
<version>10.0.0-SNAPSHOT</version>
<version>10.0.0-M1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion arquillian/arquillian-tck/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<artifactId>arquillian</artifactId>
<groupId>org.apache.tomee</groupId>
<version>10.0.0-SNAPSHOT</version>
<version>10.0.0-M1-SNAPSHOT</version>
</parent>

<artifactId>arquillian-tck</artifactId>
Expand Down
3 changes: 1 addition & 2 deletions arquillian/arquillian-tomee-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<artifactId>arquillian</artifactId>
<groupId>org.apache.tomee</groupId>
<version>10.0.0-SNAPSHOT</version>
<version>10.0.0-M1-SNAPSHOT</version>
</parent>
<artifactId>arquillian-tomee-common</artifactId>
<packaging>jar</packaging>
Expand Down Expand Up @@ -54,7 +54,6 @@
<dependency>
<groupId>org.apache.openwebbeans</groupId>
<artifactId>openwebbeans-impl</artifactId>
<classifier>jakarta</classifier>
<scope>provided</scope>
</dependency>

Expand Down
2 changes: 1 addition & 1 deletion arquillian/arquillian-tomee-embedded/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<artifactId>arquillian</artifactId>
<groupId>org.apache.tomee</groupId>
<version>10.0.0-SNAPSHOT</version>
<version>10.0.0-M1-SNAPSHOT</version>
</parent>
<artifactId>arquillian-tomee-embedded</artifactId>
<packaging>jar</packaging>
Expand Down
12 changes: 6 additions & 6 deletions arquillian/arquillian-tomee-moviefun-example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<parent>
<groupId>org.apache.tomee</groupId>
<artifactId>arquillian</artifactId>
<version>10.0.0-SNAPSHOT</version>
<version>10.0.0-M1-SNAPSHOT</version>
</parent>
<artifactId>arquillian-tomee-moviefun-example</artifactId>
<packaging>war</packaging>
Expand Down Expand Up @@ -71,7 +71,7 @@
<artifactItem>
<groupId>jakarta.servlet.jsp.jstl</groupId>
<artifactId>jakarta.servlet.jsp.jstl-api</artifactId>
<version>2.0.0</version>
<version>3.0.0</version>
</artifactItem>
<artifactItem>
<groupId>log4j</groupId>
Expand All @@ -81,12 +81,12 @@
<artifactItem>
<groupId>org.apache.myfaces.core</groupId>
<artifactId>myfaces-api</artifactId>
<version>3.0.1</version>
<version>4.0.1</version>
</artifactItem>
<artifactItem>
<groupId>org.apache.tomee</groupId>
<artifactId>taglibs-shade</artifactId>
<version>10.0.0-SNAPSHOT</version>
<version>10.0.0-M1-SNAPSHOT</version>
</artifactItem>
</artifactItems>
<outputDirectory>
Expand Down Expand Up @@ -116,12 +116,12 @@
<dependency>
<groupId>jakarta.servlet.jsp.jstl</groupId>
<artifactId>jakarta.servlet.jsp.jstl-api</artifactId>
<version>2.0.0</version>
<version>3.0.0</version>
</dependency>
<dependency>
<groupId>org.apache.tomee</groupId>
<artifactId>taglibs-shade</artifactId>
<version>10.0.0-SNAPSHOT</version>
<version>10.0.0-M1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>junit</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
import org.superbiz.moviefun.util.PaginationHelper;

import jakarta.ejb.EJB;
import jakarta.faces.bean.ManagedBean;
import jakarta.faces.bean.SessionScoped;
import jakarta.enterprise.context.SessionScoped;
import jakarta.inject.Named;
import jakarta.faces.component.UIComponent;
import jakarta.faces.context.FacesContext;
import jakarta.faces.convert.Converter;
Expand All @@ -32,7 +32,7 @@
import java.io.Serializable;
import java.util.ResourceBundle;

@ManagedBean(name = "movieController")
@Named("movieController")
@SessionScoped
public class MovieController implements Serializable {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import org.apache.tomee.embedded.EmbeddedTomEEContainer;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;

import jakarta.ejb.embeddable.EJBContainer;
Expand Down Expand Up @@ -75,6 +76,21 @@ private static File createWebApp() throws IOException {
}

@Test
@Ignore("This test fails due to a change in OWB-4 to pass the TCK related to dotted EL names: " +
"https://github.com/apache/openwebbeans/commit/4e4962a69064585d146c71bb387a8395455e88b5" +
"Until this is fixed, we disable this test. Related stacktrace is added below.")
/*
jakarta.el.PropertyNotFoundException: The class 'org.apache.webbeans.el22.WrappedValueExpressionNode' does not have the property 'title'.
at jakarta.el.BeanELResolver.getBeanProperty(BeanELResolver.java:626)
at jakarta.el.BeanELResolver.getValue(BeanELResolver.java:338)
at org.apache.jasper.el.JasperELResolver.getValue(JasperELResolver.java:129)
at org.apache.el.parser.AstValue.getValue(AstValue.java:169)
at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:190)
at org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:701)
at org.apache.jsp.WEB_002dINF.setup_jsp._jspx_meth_c_005fout_005f0(setup_jsp.java:247)
at org.apache.jsp.WEB_002dINF.setup_jsp._jspx_meth_c_005fforEach_005f0(setup_jsp.java:198)
at org.apache.jsp.WEB_002dINF.setup_jsp._jspService(setup_jsp.java:150)
*/
public void testShouldMakeSureWebappIsWorking() throws Exception {
WebClient webClient = new WebClient();
HtmlPage page = webClient.getPage("http://localhost:9999/moviefun/setup");
Expand Down
9 changes: 4 additions & 5 deletions arquillian/arquillian-tomee-remote/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<artifactId>arquillian</artifactId>
<groupId>org.apache.tomee</groupId>
<version>10.0.0-SNAPSHOT</version>
<version>10.0.0-M1-SNAPSHOT</version>
</parent>
<artifactId>arquillian-tomee-remote</artifactId>
<packaging>jar</packaging>
Expand Down Expand Up @@ -95,7 +95,7 @@
<groupId>${project.groupId}</groupId>
<artifactId>apache-tomee</artifactId>
<type>zip</type>
<version>10.0.0-SNAPSHOT</version>
<version>10.0.0-M1-SNAPSHOT</version>
<classifier>webprofile</classifier>
<scope>provided</scope>
</dependency>
Expand Down Expand Up @@ -124,7 +124,7 @@
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>arquillian-tomee-common</artifactId>
<version>10.0.0-SNAPSHOT</version>
<version>10.0.0-M1-SNAPSHOT</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
Expand All @@ -151,13 +151,12 @@
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>arquillian-common</artifactId>
<version>10.0.0-SNAPSHOT</version>
<version>10.0.0-M1-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>org.apache.openwebbeans</groupId>
<artifactId>openwebbeans-impl</artifactId>
<classifier>jakarta</classifier>
<version>${version.openwebbeans}</version>
<scope>provided</scope>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
<property name="appWorkingDir">target/arquillian-test-working-dir</property>
<property name="properties">
openejb.classloader.forced-load=org.apache.openejb
tomee.tomcat.cookieProcessor = org.apache.tomcat.util.http.LegacyCookieProcessor
</property>
</configuration>
</container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<artifactId>arquillian-tomee-tests</artifactId>
<groupId>org.apache.tomee</groupId>
<version>10.0.0-SNAPSHOT</version>
<version>10.0.0-M1-SNAPSHOT</version>
</parent>

<artifactId>arquillian-tomee-config-tests</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<artifactId>arquillian-tomee-tests</artifactId>
<groupId>org.apache.tomee</groupId>
<version>10.0.0-SNAPSHOT</version>
<version>10.0.0-M1-SNAPSHOT</version>
</parent>

<artifactId>arquillian-tomee-jaxrs-tests</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<artifactId>arquillian-tomee-tests</artifactId>
<groupId>org.apache.tomee</groupId>
<version>10.0.0-SNAPSHOT</version>
<version>10.0.0-M1-SNAPSHOT</version>
</parent>

<artifactId>arquillian-tomee-jaxws-tests</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<artifactId>arquillian-tomee-tests</artifactId>
<groupId>org.apache.tomee</groupId>
<version>10.0.0-SNAPSHOT</version>
<version>10.0.0-M1-SNAPSHOT</version>
</parent>

<artifactId>arquillian-tomee-jms-tests</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
package org.apache.openejb.arquillian.tests.jms;

import jakarta.annotation.Resource;
import jakarta.faces.bean.ManagedBean;
import jakarta.enterprise.context.Dependent;
import jakarta.jms.ConnectionFactory;
import jakarta.jms.Queue;
import jakarta.jms.Topic;

@ManagedBean
@Dependent
public class DummyManagedBean {
@Resource
private Queue queue;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<artifactId>arquillian-tomee-tests</artifactId>
<groupId>org.apache.tomee</groupId>
<version>10.0.0-SNAPSHOT</version>
<version>10.0.0-M1-SNAPSHOT</version>
</parent>

<artifactId>arquillian-tomee-webprofile-tests</artifactId>
Expand Down Expand Up @@ -87,13 +87,6 @@
<groupId>org.apache.openjpa</groupId>
<artifactId>openjpa</artifactId>
<version>${version.openjpa}</version>
<classifier>jakarta</classifier>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ public static WebArchive archive() {
@Test
public void test() throws Exception {
final Orange orange = new Orange();
beanManager.fireEvent(orange);
beanManager.getEvent().fire(orange);

final Green green = new Green();
beanManager.fireEvent(green);
beanManager.getEvent().fire(green);

Assert.assertEquals(2, painter.getObserved().size());
Assert.assertSame(orange, painter.getObserved().get(0));
Expand Down
Loading

0 comments on commit bc8f54e

Please sign in to comment.