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

build: Transition from Java EE to Jakarta EE #80

Merged
merged 19 commits into from
Sep 13, 2021
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
<groupId>org.eclipse.che</groupId>
<version>7.36.0-SNAPSHOT</version>
</parent>
<artifactId>assembly-che-tomcat8</artifactId>
<artifactId>assembly-che-tomcat</artifactId>
<packaging>jar</packaging>
<name>Che Assembly :: Assemblies Che Tomcat8</name>
<name>Che Assembly :: Assemblies Che Tomcat</name>
<build>
<finalName>assembly-che-tomcat8</finalName>
<finalName>assembly-che-tomcat</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version='1.0' encoding='utf-8'?>
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
Expand Down Expand Up @@ -32,7 +32,6 @@
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />


<!-- Global JNDI resources
Documentation at /docs/jndi-resources-howto.html
-->
Expand Down Expand Up @@ -63,18 +62,17 @@

<!-- A "Connector" represents an endpoint by which requests are received
and responses are returned. Documentation at :
Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
Java AJP Connector: /docs/config/ajp.html
APR (HTTP/AJP) Connector: /docs/apr.html
HTTP Connector: /docs/config/http.html
AJP Connector: /docs/config/ajp.html
Define a non-SSL/TLS HTTP/1.1 Connector on port 8080
-->
<Connector port="${port.http}" protocol="org.apache.coyote.http11.Http11NioProtocol"
<Connector port="${port.http:-8080}" protocol="HTTP/1.1"
connectionTimeout="20000"
maxThreads="300"
compression="on"
compressionMinSize="2048"
noCompressionUserAgents=".*MSIE 6.*"
compressableMimeType="text/html,text/xml,text/plain,text/css,text/javascript,application/json,application/javascript"
compressibleMimeType="text/html,text/xml,text/plain,text/css,text/javascript,application/json,application/javascript"
redirectPort="8443"/>
<!-- A "Connector" using the shared thread pool-->
<!--
Expand All @@ -83,20 +81,32 @@
connectionTimeout="20000"
redirectPort="8443" />
-->
<!-- Define a SSL/TLS HTTP/1.1 Connector on port 8443
This connector uses the NIO implementation that requires the JSSE
style configuration. When using the APR/native implementation, the
OpenSSL style configuration is required as described in the APR/native
documentation -->
<!-- Define an SSL/TLS HTTP/1.1 Connector on port 8443 with HTTP/2
This connector uses the NIO implementation. The default
SSLImplementation will depend on the presence of the APR/native
library and the useOpenSSL attribute of the
AprLifecycleListener.
Either JSSE or OpenSSL style configuration may be used regardless of
the SSLImplementation selected. JSSE style configuration is used below.
-->
<!--
<Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" />
maxThreads="150" SSLEnabled="true">
<UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" />
<SSLHostConfig>
<Certificate certificateKeystoreFile="conf/localhost-rsa.jks"
type="RSA" />
</SSLHostConfig>
</Connector>
-->

<!-- Define an AJP 1.3 Connector on port 8009 -->
<!--Connector port="8009" protocol="AJP/1.3" redirectPort="8443" /-->

<!--
<Connector protocol="AJP/1.3"
address="::1"
port="8009"
redirectPort="8443" />
-->

<!-- An Engine represents the entry point (within Catalina) that processes
every request. The Engine implementation for Tomcat stand alone
Expand Down Expand Up @@ -135,6 +145,13 @@
<!--
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
-->

<!-- Access log processes all example.
Documentation at: /docs/config/valve.html
Note: The pattern used is equivalent to using pattern="common" -->
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log" suffix=".txt"
pattern="%h %l %u %t &quot;%r&quot; %s %b" />
<Valve className="org.apache.catalina.valves.RemoteIpValve" protocolHeader="X-Forwarded-Proto"
internalProxies="\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}"/>

Expand Down
6 changes: 3 additions & 3 deletions assembly/assembly-main/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<dependencies>
<dependency>
<groupId>org.eclipse.che</groupId>
<artifactId>assembly-che-tomcat8</artifactId>
<artifactId>assembly-che-tomcat</artifactId>
<type>zip</type>
</dependency>
<dependency>
Expand Down Expand Up @@ -86,10 +86,10 @@
<artifactItems>
<artifactItem>
<groupId>org.eclipse.che</groupId>
<artifactId>assembly-che-tomcat8</artifactId>
<artifactId>assembly-che-tomcat</artifactId>
<type>zip</type>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/dependency/assembly-che-tomcat8</outputDirectory>
<outputDirectory>${project.build.directory}/dependency/assembly-che-tomcat</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
Expand Down
2 changes: 1 addition & 1 deletion assembly/assembly-main/src/assembly/assembly.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
</dependencySets>
<fileSets>
<fileSet>
<directory>${project.build.directory}/dependency/assembly-che-tomcat8</directory>
<directory>${project.build.directory}/dependency/assembly-che-tomcat</directory>
<outputDirectory>tomcat/</outputDirectory>
<excludes>
<exclude>bin/*.bat</exclude>
Expand Down
21 changes: 8 additions & 13 deletions assembly/assembly-root-war/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,8 @@
<artifactId>logback-classic</artifactId>
</dependency>
<dependency>
<groupId>com.google.inject.extensions</groupId>
<artifactId>guice-servlet</artifactId>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<groupId>jakarta.inject</groupId>
<artifactId>jakarta.inject-api</artifactId>
</dependency>
<dependency>
<groupId>net.logstash.logback</groupId>
Expand All @@ -62,20 +58,19 @@
</exclusions>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<groupId>org.everrest</groupId>
<artifactId>everrest-guice-servlet</artifactId>
</dependency>
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.eclipse.che.core</groupId>
<artifactId>che-core-api-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
*/
package org.eclipse.che;

import jakarta.servlet.Filter;
import jakarta.servlet.FilterChain;
import jakarta.servlet.FilterConfig;
import jakarta.servlet.ServletException;
import jakarta.servlet.ServletRequest;
import jakarta.servlet.ServletResponse;
import jakarta.servlet.http.HttpServletResponse;
import java.io.IOException;
import javax.inject.Singleton;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletResponse;

/**
* Returns internal server error when request is supposed to be handled by API war. Situation occurs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@
*/
package org.eclipse.che;

import jakarta.servlet.Filter;
import jakarta.servlet.FilterChain;
import jakarta.servlet.FilterConfig;
import jakarta.servlet.ServletException;
import jakarta.servlet.ServletRequest;
import jakarta.servlet.ServletResponse;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.regex.Pattern;
import javax.inject.Singleton;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
* Redirect user to dashboard if request wasn't made to namespace/workspaceName or app resources.
Expand Down
7 changes: 4 additions & 3 deletions assembly/assembly-root-war/src/main/webapp/WEB-INF/web.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@
Red Hat, Inc. - initial API and implementation

-->
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
<web-app xmlns="https://jakarta.ee/xml/ns/jakartaee"
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"
version="3.0">
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee
https://jakarta.ee/xml/ns/jakartaee/web-app_5_0.xsd"
version="5.0">

<listener>
<listener-class>org.eclipse.che.inject.CheBootstrap</listener-class>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
import static org.mockito.Mockito.verifyNoMoreInteractions;
import static org.mockito.Mockito.when;

import javax.servlet.FilterChain;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import jakarta.servlet.FilterChain;
import jakarta.servlet.ServletOutputStream;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.testng.MockitoTestNGListener;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;

import javax.servlet.FilterChain;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import jakarta.servlet.FilterChain;
import jakarta.servlet.ServletRequest;
import jakarta.servlet.ServletResponse;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import org.eclipse.che.commons.env.EnvironmentContext;
import org.eclipse.che.commons.subject.SubjectImpl;
import org.mockito.InjectMocks;
Expand Down
Loading