ACS-1146 Replace *javax* dependencies with *jakarta* libraries (#254)

- group jakarta dependencies in the POMs
- define explicit version properties for the various jakarta APIs
- replace all *javax* libraries with their *jakarta* equivalent
- exclude all *javax* libraries brought in by our dependencies (they can't be handled through _dependencyManagement_ due to the different jar names)
- upgrade the *jakarta* libraries to the latest versions that still use the _javax_ package namespace
This commit is contained in:
CezarLeahu
2021-01-26 13:33:35 +02:00
committed by GitHub
parent 2b9ecf1ece
commit 6ef30c46e9
9 changed files with 275 additions and 269 deletions

View File

@@ -16,38 +16,13 @@
<artifactId>alfresco-repository</artifactId>
<version>${project.version}</version>
</dependency>
<!-- Jakarta... -->
<dependency>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-data-model</artifactId>
<version>${project.version}</version>
<exclusions>
<!-- Duplicate classes from com.sun.activation:jakarta.activation-->
<exclusion>
<groupId>com.sun.activation</groupId>
<artifactId>javax.activation</artifactId>
</exclusion>
<!-- REPO-4998 - Exclusion due to classpath conflicts between org.codehaus.woodstox:woodstox-core-asl and com.fasterxml.woodstox:woodstox-core -->
<exclusion>
<groupId>org.codehaus.woodstox</groupId>
<artifactId>woodstox-core-asl</artifactId>
</exclusion>
<!-- Duplicate classes from jakarta.annotation:jakarta.annotation-api-->
<exclusion>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
</exclusion>
<!-- REPO-5009 Excluded to avoid duplicated classes with javax.jws:javax.jws-api -->
<exclusion>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-ws-metadata_2.0_spec</artifactId>
</exclusion>
<!-- Duplicates classes from jakarta.transaction:jakarta.transaction-api -->
<exclusion>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jta_1.1_spec</artifactId>
</exclusion>
</exclusions>
<groupId>jakarta.xml.rpc</groupId>
<artifactId>jakarta.xml.rpc-api</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
@@ -79,23 +54,12 @@
<groupId>org.alfresco.surf</groupId>
<artifactId>spring-webscripts</artifactId>
</dependency>
<dependency>
<groupId>javax.xml</groupId>
<artifactId>jaxrpc-api</artifactId>
<version>1.1</version>
</dependency>
<!-- This is needed at runtime by Web Client, so not really a test dependency -->
<dependency>
<groupId>org.apache.chemistry.opencmis</groupId>
<artifactId>chemistry-opencmis-test-tck</artifactId>
<version>${dependency.opencmis.version}</version>
<exclusions>
<!-- Duplicate classes from com.sun.activation:jakarta.activation-->
<exclusion>
<groupId>com.sun.activation</groupId>
<artifactId>javax.activation</artifactId>
</exclusion>
<!-- REPO-5009 Excluded to avoid duplicated classes with javax.jws:javax.jws-api -->
<exclusion>
<groupId>org.apache.geronimo.specs</groupId>
@@ -141,18 +105,6 @@
<version>${project.version}</version>
<classifier>tests</classifier>
<scope>test</scope>
<exclusions>
<!-- Duplicates classes from jakarta.transaction:jakarta.transaction-api -->
<exclusion>
<groupId>javax.transaction</groupId>
<artifactId>jta</artifactId>
</exclusion>
<!-- Duplicates classes from jakarta.xml.bind:jakarta.xml.bind-api -->
<exclusion>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.alfresco.surf</groupId>
@@ -195,6 +147,11 @@
<version>2.0</version>
<scope>test</scope>
<exclusions>
<!-- Duplicates classes from jakarta.transaction:jakarta.transaction-api -->
<exclusion>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jta_1.1_spec</artifactId>
</exclusion>
<!-- REPO-5009 Excluded to avoid duplicated classes with javax.jws:javax.jws-api -->
<exclusion>
<groupId>org.apache.geronimo.specs</groupId>

View File

@@ -1,28 +1,28 @@
/*
* #%L
* Alfresco Remote API
* %%
* Copyright (C) 2005 - 2016 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
/*
* #%L
* Alfresco Remote API
* %%
* Copyright (C) 2005 - 2016 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
package org.alfresco.repo.webdav;
import java.io.IOException;
@@ -31,7 +31,6 @@ import java.util.List;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.UnavailableException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;