From 820fc47bb13fe3514a2b8cf1855e9f50ec597766 Mon Sep 17 00:00:00 2001 From: Thomas Mortagne Date: Thu, 15 Feb 2024 13:49:32 +0100 Subject: [PATCH] XWIKI-20477: Upgrade to Solr 9.4.1 and Lucene 9.8.0 XWIKI-12955: Upgrade to JAX-RS 2.1.6 (JSR370) XWIKI-12674: Replace Restlet with Jersey * change the target to 16.2.0RC1 as it's a bit late for 16.1.0RC1 --- .../internal/AbstractAnnotationsRESTResource.java | 2 +- .../rest/jersey/internal/JerseyReloadListener.java | 2 +- .../rest/jersey/internal/JerseyServletContainer.java | 2 +- .../internal/RestletJacksonContextResolver.java | 2 +- .../rest/jersey/internal/XWikiInjectionManager.java | 2 +- .../xwiki/rest/jersey/internal/XWikiRESTServlet.java | 2 +- .../src/main/java/org/xwiki/rest/JAXRSUtils.java | 2 +- .../org/xwiki/rest/internal/DefaultJAXRSUtils.java | 2 +- .../rest/internal/PreMatchingRequestFilter.java | 2 +- .../java/org/xwiki/rest/internal/ResponseFilter.java | 2 +- .../search/solr/AbstractSolrCoreInitializer.java | 4 ++-- .../src/main/java/org/xwiki/search/solr/Solr.java | 2 +- .../org/xwiki/search/solr/SolrCoreInitializer.java | 4 ++-- .../java/org/xwiki/search/solr/XWikiSolrCore.java | 2 +- .../org/xwiki/search/solr/internal/AbstractSolr.java | 2 +- .../search/solr/internal/DefaultXWikiSolrCore.java | 2 +- .../xwiki/search/solr/internal/SolrSchemaUtils.java | 12 ++++++------ 17 files changed, 24 insertions(+), 24 deletions(-) diff --git a/xwiki-platform-core/xwiki-platform-annotation/xwiki-platform-annotation-rest/src/main/java/org/xwiki/annotation/rest/internal/AbstractAnnotationsRESTResource.java b/xwiki-platform-core/xwiki-platform-annotation/xwiki-platform-annotation-rest/src/main/java/org/xwiki/annotation/rest/internal/AbstractAnnotationsRESTResource.java index 73effcbee685..e2971a6018b6 100644 --- a/xwiki-platform-core/xwiki-platform-annotation/xwiki-platform-annotation-rest/src/main/java/org/xwiki/annotation/rest/internal/AbstractAnnotationsRESTResource.java +++ b/xwiki-platform-core/xwiki-platform-annotation/xwiki-platform-annotation-rest/src/main/java/org/xwiki/annotation/rest/internal/AbstractAnnotationsRESTResource.java @@ -41,7 +41,7 @@ /** * @version $Id$ - * @since 16.1.0RC1 + * @since 16.2.0RC1 */ public abstract class AbstractAnnotationsRESTResource extends AbstractAnnotationRESTResource { diff --git a/xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-jersey/src/main/java/org/xwiki/rest/jersey/internal/JerseyReloadListener.java b/xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-jersey/src/main/java/org/xwiki/rest/jersey/internal/JerseyReloadListener.java index 16b505c17f14..5d6e217f54e3 100644 --- a/xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-jersey/src/main/java/org/xwiki/rest/jersey/internal/JerseyReloadListener.java +++ b/xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-jersey/src/main/java/org/xwiki/rest/jersey/internal/JerseyReloadListener.java @@ -41,7 +41,7 @@ * Reload Jersey when a XWikiResource component is uninstalled/installed. * * @version $Id$ - * @since 16.1.0RC1 + * @since 16.2.0RC1 */ @Component @Named(JerseyReloadListener.HINT) diff --git a/xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-jersey/src/main/java/org/xwiki/rest/jersey/internal/JerseyServletContainer.java b/xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-jersey/src/main/java/org/xwiki/rest/jersey/internal/JerseyServletContainer.java index 76c399a017e2..630611267ede 100644 --- a/xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-jersey/src/main/java/org/xwiki/rest/jersey/internal/JerseyServletContainer.java +++ b/xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-jersey/src/main/java/org/xwiki/rest/jersey/internal/JerseyServletContainer.java @@ -45,7 +45,7 @@ * registered/unregistered). * * @version $Id$ - * @since 16.1.0RC1 + * @since 16.2.0RC1 */ @Component(roles = JerseyServletContainer.class) @Singleton diff --git a/xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-jersey/src/main/java/org/xwiki/rest/jersey/internal/RestletJacksonContextResolver.java b/xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-jersey/src/main/java/org/xwiki/rest/jersey/internal/RestletJacksonContextResolver.java index b6e5d67d9efc..356ae92ef56f 100644 --- a/xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-jersey/src/main/java/org/xwiki/rest/jersey/internal/RestletJacksonContextResolver.java +++ b/xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-jersey/src/main/java/org/xwiki/rest/jersey/internal/RestletJacksonContextResolver.java @@ -33,7 +33,7 @@ * taking into account JAX-RS annotations). * * @version $Id$ - * @since 16.1.0RC1 + * @since 16.2.0RC1 */ @Provider @Produces(MediaType.APPLICATION_JSON) diff --git a/xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-jersey/src/main/java/org/xwiki/rest/jersey/internal/XWikiInjectionManager.java b/xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-jersey/src/main/java/org/xwiki/rest/jersey/internal/XWikiInjectionManager.java index 1764d89c328b..334983c9eeb6 100644 --- a/xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-jersey/src/main/java/org/xwiki/rest/jersey/internal/XWikiInjectionManager.java +++ b/xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-jersey/src/main/java/org/xwiki/rest/jersey/internal/XWikiInjectionManager.java @@ -58,7 +58,7 @@ * Wrap the regular Jersey {@link InjectionManager} to get some of the components as XWiki components. * * @version $Id$ - * @since 16.1.0RC1 + * @since 16.2.0RC1 */ @Component(roles = XWikiInjectionManager.class) @InstantiationStrategy(ComponentInstantiationStrategy.PER_LOOKUP) diff --git a/xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-jersey/src/main/java/org/xwiki/rest/jersey/internal/XWikiRESTServlet.java b/xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-jersey/src/main/java/org/xwiki/rest/jersey/internal/XWikiRESTServlet.java index dc9d386dc3bc..b433c07cbc31 100644 --- a/xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-jersey/src/main/java/org/xwiki/rest/jersey/internal/XWikiRESTServlet.java +++ b/xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-jersey/src/main/java/org/xwiki/rest/jersey/internal/XWikiRESTServlet.java @@ -39,7 +39,7 @@ * * * @version $Id$ - * @since 16.1.0RC1 + * @since 16.2.0RC1 */ public class XWikiRESTServlet extends HttpServlet { diff --git a/xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-server/src/main/java/org/xwiki/rest/JAXRSUtils.java b/xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-server/src/main/java/org/xwiki/rest/JAXRSUtils.java index 606ddd3fcf9f..00638f9258ce 100644 --- a/xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-server/src/main/java/org/xwiki/rest/JAXRSUtils.java +++ b/xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-server/src/main/java/org/xwiki/rest/JAXRSUtils.java @@ -36,7 +36,7 @@ * Provider various tools to help implement {@link MessageBodyWriter} and {@link MessageBodyReader}. * * @version $Id$ - * @since 16.1.0RC1 + * @since 16.2.0RC1 */ @Role @Unstable diff --git a/xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-server/src/main/java/org/xwiki/rest/internal/DefaultJAXRSUtils.java b/xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-server/src/main/java/org/xwiki/rest/internal/DefaultJAXRSUtils.java index 985ce26bd23c..1b286b6488e0 100644 --- a/xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-server/src/main/java/org/xwiki/rest/internal/DefaultJAXRSUtils.java +++ b/xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-server/src/main/java/org/xwiki/rest/internal/DefaultJAXRSUtils.java @@ -48,7 +48,7 @@ * Default implementation of {@link JAXRSUtils}. * * @version $Id$ - * @since 16.1.0RC1 + * @since 16.2.0RC1 */ @Component @Singleton diff --git a/xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-server/src/main/java/org/xwiki/rest/internal/PreMatchingRequestFilter.java b/xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-server/src/main/java/org/xwiki/rest/internal/PreMatchingRequestFilter.java index 77a13263737d..8393b61deb94 100644 --- a/xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-server/src/main/java/org/xwiki/rest/internal/PreMatchingRequestFilter.java +++ b/xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-server/src/main/java/org/xwiki/rest/internal/PreMatchingRequestFilter.java @@ -56,7 +56,7 @@ * * * @version $Id$ - * @since 16.1.0RC1 + * @since 16.2.0RC1 */ @Component @Named("org.xwiki.rest.internal.PreMatchingRequestFilter") diff --git a/xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-server/src/main/java/org/xwiki/rest/internal/ResponseFilter.java b/xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-server/src/main/java/org/xwiki/rest/internal/ResponseFilter.java index a937a4289836..2189a219edde 100644 --- a/xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-server/src/main/java/org/xwiki/rest/internal/ResponseFilter.java +++ b/xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-server/src/main/java/org/xwiki/rest/internal/ResponseFilter.java @@ -45,7 +45,7 @@ * * * @version $Id$ - * @since 16.1.0RC1 + * @since 16.2.0RC1 */ @Component @Named("org.xwiki.rest.internal.ResponseFilter") diff --git a/xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/AbstractSolrCoreInitializer.java b/xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/AbstractSolrCoreInitializer.java index 7c34763a9d81..1561c86e3a1a 100644 --- a/xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/AbstractSolrCoreInitializer.java +++ b/xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/AbstractSolrCoreInitializer.java @@ -402,7 +402,7 @@ private void migrateFields(XWikiSolrCore sourceCore, XWikiSolrCore targetCore, b /** * @return the number of document to retrieve at the same time when migrating the data - * @since 16.1.0RC1 + * @since 16.2.0RC1 */ @Unstable protected int getMigrationBatchRows() @@ -1106,7 +1106,7 @@ protected void commit() throws SolrException /** * @param core the client to commit * @throws SolrException when failing to commit - * @since 16.1.0RC1 + * @since 16.2.0RC1 */ protected void commit(XWikiSolrCore core) throws SolrException { diff --git a/xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/Solr.java b/xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/Solr.java index f6f23c8f4bb1..80f8f2c591f7 100644 --- a/xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/Solr.java +++ b/xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/Solr.java @@ -48,7 +48,7 @@ public interface Solr * solr core specific to the setup) * @return the cached {@link SolrCore} instance to use to manipulate the core * @throws SolrException when failing to create the solr client - * @since 16.1.0RC1 + * @since 16.2.0RC1 */ @Unstable default XWikiSolrCore getCore(String name) throws SolrException diff --git a/xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/SolrCoreInitializer.java b/xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/SolrCoreInitializer.java index f396df433bb0..e14526ced832 100644 --- a/xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/SolrCoreInitializer.java +++ b/xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/SolrCoreInitializer.java @@ -52,7 +52,7 @@ public interface SolrCoreInitializer * * @param core to manipulate the core * @throws SolrException when failing to initialize the core - * @since 16.1.0RC1 + * @since 16.2.0RC1 */ default void initialize(XWikiSolrCore core) throws SolrException { @@ -76,7 +76,7 @@ default boolean isCache() * @param sourceCore the core to copy from * @param targetCore the core to copy to * @throws SolrException when failing to migrate the core - * @since 16.1.0RC1 + * @since 16.2.0RC1 */ @Unstable default void migrate(XWikiSolrCore sourceCore, XWikiSolrCore targetCore) throws SolrException diff --git a/xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/XWikiSolrCore.java b/xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/XWikiSolrCore.java index 5edaeba50158..8f6ad59108da 100644 --- a/xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/XWikiSolrCore.java +++ b/xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/XWikiSolrCore.java @@ -26,7 +26,7 @@ * The main entry point to manipulate a Solr core in XWiki. * * @version $Id$ - * @since 16.1.0RC1 + * @since 16.2.0RC1 */ @Unstable public interface XWikiSolrCore diff --git a/xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/internal/AbstractSolr.java b/xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/internal/AbstractSolr.java index b362cca8aa62..5966373d77a9 100644 --- a/xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/internal/AbstractSolr.java +++ b/xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/internal/AbstractSolr.java @@ -247,7 +247,7 @@ protected String toXWikiCoreName(String solrCoreName) protected abstract SolrClient getInternalSolrClient(String solrCoreName) throws SolrException; /** - * @since 16.1.0RC1 + * @since 16.2.0RC1 */ protected abstract SolrClient createSolrClient(String solrCoreName, boolean isCache) throws SolrException; } diff --git a/xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/internal/DefaultXWikiSolrCore.java b/xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/internal/DefaultXWikiSolrCore.java index b8ba9afa5187..0a583aced037 100644 --- a/xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/internal/DefaultXWikiSolrCore.java +++ b/xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/internal/DefaultXWikiSolrCore.java @@ -26,7 +26,7 @@ * Default implementation of {@link XWikiSolrCore}. * * @version $Id$ - * @since 16.1.0RC1 + * @since 16.2.0RC1 */ public class DefaultXWikiSolrCore implements XWikiSolrCore { diff --git a/xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/internal/SolrSchemaUtils.java b/xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/internal/SolrSchemaUtils.java index fe8577c5b804..0cef52c55576 100644 --- a/xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/internal/SolrSchemaUtils.java +++ b/xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/internal/SolrSchemaUtils.java @@ -87,7 +87,7 @@ private SolrCoreSchema getSchema(XWikiSolrCore core) * @param force if {@code true} reloads all information, else gets the information from the cache * @return the map of all fields * @throws SolrException in case of problem to request fields information - * @since 16.1.0RC1 + * @since 16.2.0RC1 */ public Map getFieldTypes(XWikiSolrCore core, boolean force) throws SolrException { @@ -115,7 +115,7 @@ public Map getFieldTypes(XWikiSolrCore core, bo * @param force if {@code true} reloads all information, else gets the information from the cache * @return the map of all fields * @throws SolrException in case of problem to request fields information - * @since 16.1.0RC1 + * @since 16.2.0RC1 */ public Map> getFields(XWikiSolrCore core, boolean force) throws SolrException { @@ -171,7 +171,7 @@ public Map> getDynamicFields(XWikiSolrCore core, boo * @param definition the definition of the field to add * @param add true if the field type should be added, false for replace * @throws SolrException when failing to add the field - * @since 16.1.0RC1 + * @since 16.2.0RC1 */ public void setFieldType(XWikiSolrCore core, FieldTypeDefinition definition, boolean add) throws SolrException { @@ -225,7 +225,7 @@ public void setField(XWikiSolrCore core, Map fieldAttributes, bo * @param dynamic true to create a dynamic field * @param add true if the field type should be added, false for replace * @throws SolrException when failing to add the field - * @since 16.1.0RC1 + * @since 16.2.0RC1 */ public void setField(XWikiSolrCore core, Map fieldAttributes, boolean dynamic, boolean add) throws SolrException @@ -308,7 +308,7 @@ public void setField(XWikiSolrCore core, String name, String type, boolean dynam * @param name the name of the field to delete * @param dynamic true to delete a dynamic field * @throws SolrException when failing to delete the field - * @since 16.1.0RC1 + * @since 16.2.0RC1 */ public void deleteField(XWikiSolrCore core, String name, boolean dynamic) throws SolrException { @@ -333,7 +333,7 @@ public void deleteField(XWikiSolrCore core, String name, boolean dynamic) throws * @param source the source field name * @param dest the collection of the destination field names * @throws SolrException when failing to add the field - * @since 16.1.0RC1 + * @since 16.2.0RC1 */ public void addCopyField(XWikiSolrCore core, String source, String... dest) throws SolrException {