Skip to content

Commit

Permalink
fix #2788 bump up to tomcat 10.1
Browse files Browse the repository at this point in the history
  • Loading branch information
marevol committed Dec 23, 2023
1 parent 642d96a commit 90d6af1
Show file tree
Hide file tree
Showing 287 changed files with 790 additions and 745 deletions.
10 changes: 5 additions & 5 deletions deps.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
<mkdir dir="${suggest.dir}/lib" />
<delete dir="${thumbnail.dir}/lib" />
<mkdir dir="${thumbnail.dir}/lib" />
<!-- javax.annotation-api -->
<!-- annotation-api -->
<antcall target="install.env.jar">
<param name="repo.url" value="${maven.release.repo.url}" />
<param name="jar.groupId" value="javax/annotation" />
<param name="jar.artifactId" value="javax.annotation-api" />
<param name="jar.version" value="1.3.2" />
<param name="file.version" value="1.3.2" />
<param name="jar.groupId" value="jakarta/annotation" />
<param name="jar.artifactId" value="jakarta.annotation-api" />
<param name="jar.version" value="2.1.1" />
<param name="file.version" value="2.1.1" />
</antcall>
<!-- kopf -->
<get dest="${target.dir}/kopf.zip">
Expand Down
39 changes: 27 additions & 12 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<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>
<artifactId>fess</artifactId>
<version>14.12.0-SNAPSHOT</version>
<version>15.0.0-SNAPSHOT</version>
<packaging>war</packaging>
<name>Fess</name>
<description>Fess is Full tExt Search System.</description>
Expand Down Expand Up @@ -30,7 +30,7 @@
<parent>
<groupId>org.codelibs.fess</groupId>
<artifactId>fess-parent</artifactId>
<version>14.12.0-SNAPSHOT</version>
<version>15.0.0-SNAPSHOT</version>
<relativePath />
</parent>
<properties>
Expand Down Expand Up @@ -939,16 +939,31 @@

<!-- J2EE -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>${jstl.version}</version>
<groupId>jakarta.servlet.jsp.jstl</groupId>
<artifactId>jakarta.servlet.jsp.jstl-api</artifactId>
<version>${jakarta.jstl.api.version}</version>
<!-- contains taglibs.standard -->
<!-- <scope>provided</scope> -->
<exclusions>
<exclusion>
<groupId>jakarta.el</groupId>
<artifactId>jakarta.el-api</artifactId>
</exclusion>
<exclusion>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.glassfish.web</groupId>
<artifactId>jakarta.servlet.jsp.jstl</artifactId>
<version>${jakarta.jstl.version}</version>
</dependency>
<dependency>
<groupId>javax.transaction</groupId>
<artifactId>javax.transaction-api</artifactId>
<version>${javax.transaction.api.version}</version>
<groupId>jakarta.transaction</groupId>
<artifactId>jakarta.transaction-api</artifactId>
<version>${jakarta.transaction.api.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
Expand Down Expand Up @@ -1314,7 +1329,7 @@
<version>${okhttp.version}</version>
</dependency>
<dependency>
<groupId>com.onelogin</groupId>
<groupId>org.codelibs</groupId>
<artifactId>java-saml</artifactId>
<version>${java.saml.version}</version>
<exclusions>
Expand All @@ -1339,8 +1354,8 @@

<!-- fileupload -->
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<groupId>org.apache.commons</groupId>
<artifactId>commons-fileupload2-jakarta</artifactId>
<version>${commons.fileupload.version}</version>
</dependency>

Expand Down Expand Up @@ -1528,7 +1543,7 @@
</dependency>
<dependency>
<groupId>org.dbflute.utflute</groupId>
<artifactId>utflute-lastaflute</artifactId>
<artifactId>utflute-lastaflute-jakarta</artifactId>
<version>${utflute.version}</version>
<scope>test</scope>
</dependency>
Expand Down
11 changes: 8 additions & 3 deletions src/main/java/org/codelibs/fess/FessBoot.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import org.apache.tomcat.util.http.CookieProcessorBase;
import org.apache.tomcat.util.http.Rfc6265CookieProcessor;
import org.apache.tomcat.util.net.SSLHostConfig;
import org.apache.tomcat.util.net.SSLHostConfigCertificate;
import org.codelibs.core.lang.StringUtil;
import org.codelibs.fess.tomcat.valve.SuppressErrorReportValve;
import org.codelibs.fess.tomcat.webresources.FessWebResourceRoot;
Expand Down Expand Up @@ -171,12 +172,16 @@ public void setupServerConfigIfNeeds(final BootLogger logger, final Tomcat serve
connector.setProperty("SSLEnabled", "true");
final SSLHostConfig sslHostConfig = new SSLHostConfig();
sslHostConfig.setHostName("_default_");
doSetupServerConfig(logger, props, "certificateKeystoreFile", v -> sslHostConfig.setCertificateKeystoreFile(v));
doSetupServerConfig(logger, props, "certificateKeystorePassword", v -> sslHostConfig.setCertificateKeystorePassword(v));
doSetupServerConfig(logger, props, "certificateKeyAlias", v -> sslHostConfig.setCertificateKeyAlias(v));
final SSLHostConfigCertificate certificate =
new SSLHostConfigCertificate(sslHostConfig, SSLHostConfigCertificate.Type.UNDEFINED);
doSetupServerConfig(logger, props, "certificateKeystoreFile", v -> certificate.setCertificateKeystoreFile(v));
doSetupServerConfig(logger, props, "certificateKeystorePassword", v -> certificate.setCertificateKeystorePassword(v));
doSetupServerConfig(logger, props, "certificateKeyAlias", v -> certificate.setCertificateKeyAlias(v));
doSetupServerConfig(logger, props, "sslProtocol", v -> sslHostConfig.setSslProtocol(v));
doSetupServerConfig(logger, props, "enabledProtocols", v -> sslHostConfig.setEnabledProtocols(v.trim().split(",")));
sslHostConfig.addCertificate(certificate);
connector.addSslHostConfig(sslHostConfig);

}
});
doSetupServerConfig(logger, props, "sameSiteCookies", value -> {
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/codelibs/fess/api/BaseApiManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
import java.io.PrintWriter;
import java.util.Locale;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.codelibs.core.exception.IORuntimeException;
import org.codelibs.fess.Constants;
import org.lastaflute.web.util.LaRequestUtil;
import org.lastaflute.web.util.LaResponseUtil;

import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;

public abstract class BaseApiManager implements WebApiManager {

private static final String API_FORMAT_TYPE = "apiFormatType";
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/org/codelibs/fess/api/WebApiManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@

import java.io.IOException;

import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import jakarta.servlet.FilterChain;
import jakarta.servlet.ServletException;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;

public interface WebApiManager {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import java.util.Collections;
import java.util.List;

import javax.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletRequest;

public class WebApiManagerFactory {

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/codelibs/fess/api/WebApiRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/
package org.codelibs.fess.api;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletRequestWrapper;

public class WebApiRequest extends HttpServletRequestWrapper {
protected String servletPath;
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/codelibs/fess/api/WebApiResponse.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponseWrapper;

import org.apache.commons.io.output.ByteArrayOutputStream;

import jakarta.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpServletResponseWrapper;

public class WebApiResponse extends HttpServletResponseWrapper {

public WebApiResponse(final HttpServletResponse response) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,6 @@
import java.util.Locale;
import java.util.UUID;

import javax.annotation.PostConstruct;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.ServletInputStream;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.catalina.connector.ClientAbortException;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
Expand All @@ -49,6 +41,14 @@
import org.lastaflute.web.servlet.request.RequestManager;
import org.lastaflute.web.servlet.session.SessionManager;

import jakarta.annotation.PostConstruct;
import jakarta.servlet.FilterChain;
import jakarta.servlet.ServletException;
import jakarta.servlet.ServletInputStream;
import jakarta.servlet.ServletOutputStream;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;

public class SearchEngineApiManager extends BaseApiManager {
private static final String ADMIN_SERVER = "/admin/server_";

Expand Down
12 changes: 6 additions & 6 deletions src/main/java/org/codelibs/fess/api/json/SearchApiManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@
import java.util.UUID;
import java.util.function.Supplier;

import javax.annotation.PostConstruct;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.text.StringEscapeUtils;
Expand Down Expand Up @@ -83,6 +77,12 @@
import org.lastaflute.web.util.LaResponseUtil;
import org.opensearch.script.Script;

import jakarta.annotation.PostConstruct;
import jakarta.servlet.FilterChain;
import jakarta.servlet.ServletException;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;

public class SearchApiManager extends BaseApiManager {

private static final Logger logger = LogManager.getLogger(SearchApiManager.class);
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/codelibs/fess/app/job/AllJobScheduler.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
*/
package org.codelibs.fess.app.job;

import javax.annotation.Resource;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.codelibs.core.lang.StringUtil;
Expand All @@ -36,6 +34,8 @@
import org.lastaflute.job.LaJobRunner;
import org.lastaflute.job.LaJobScheduler;

import jakarta.annotation.Resource;

public class AllJobScheduler implements LaJobScheduler {

private static final Logger logger = LogManager.getLogger(AllJobScheduler.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
*/
package org.codelibs.fess.app.logic;

import javax.annotation.Resource;

import org.codelibs.fess.mylasta.action.FessUserBean;
import org.dbflute.hook.AccessContext;
import org.dbflute.optional.OptionalThing;
import org.lastaflute.core.time.TimeManager;
import org.lastaflute.db.dbflute.accesscontext.AccessContextResource;

import jakarta.annotation.Resource;

public class AccessContextLogic {

// ===================================================================================
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@
import java.util.List;
import java.util.Set;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import org.codelibs.core.beans.util.BeanUtil;
import org.codelibs.core.lang.StringUtil;
import org.codelibs.fess.Constants;
Expand All @@ -38,6 +35,9 @@
import org.dbflute.cbean.result.PagingResultBean;
import org.dbflute.optional.OptionalEntity;

import jakarta.annotation.Resource;
import jakarta.servlet.http.HttpServletRequest;

public class AccessTokenService {

@Resource
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
import java.util.ArrayList;
import java.util.List;

import javax.annotation.Resource;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.codelibs.core.beans.util.BeanUtil;
Expand All @@ -43,6 +41,8 @@
import com.orangesignal.csv.CsvReader;
import com.orangesignal.csv.CsvWriter;

import jakarta.annotation.Resource;

public class BadWordService {

private static final String DELETE_PREFIX = "--";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@

import java.util.List;

import javax.annotation.Resource;

import org.codelibs.core.beans.util.BeanUtil;
import org.codelibs.core.lang.StringUtil;
import org.codelibs.fess.Constants;
Expand All @@ -30,6 +28,8 @@
import org.dbflute.cbean.result.PagingResultBean;
import org.dbflute.optional.OptionalEntity;

import jakarta.annotation.Resource;

public class BoostDocumentRuleService extends FessAppService {

@Resource
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
import java.util.Collections;
import java.util.List;

import javax.annotation.Resource;

import org.codelibs.core.beans.util.BeanUtil;
import org.codelibs.fess.Constants;
import org.codelibs.fess.app.pager.CharMappingPager;
Expand All @@ -30,6 +28,8 @@
import org.codelibs.fess.mylasta.direction.FessConfig;
import org.dbflute.optional.OptionalEntity;

import jakarta.annotation.Resource;

public class CharMappingService {
@Resource
protected DictionaryManager dictionaryManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
import java.util.Set;
import java.util.stream.Collectors;

import javax.annotation.Resource;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.codelibs.core.CoreLibConstants;
Expand All @@ -54,6 +52,8 @@
import com.orangesignal.csv.CsvReader;
import com.orangesignal.csv.CsvWriter;

import jakarta.annotation.Resource;

public class CrawlingInfoService {

private static final Logger logger = LogManager.getLogger(CrawlingInfoService.class);
Expand Down
Loading

0 comments on commit 90d6af1

Please sign in to comment.