Skip to content

Commit

Permalink
SAK-33595 Java 11 (sakaiproject#8974)
Browse files Browse the repository at this point in the history
  • Loading branch information
ern committed Sep 24, 2021
1 parent 8635a3e commit ffcc4f7
Show file tree
Hide file tree
Showing 79 changed files with 318 additions and 1,913 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ jobs:
git pull --ff-only origin $GITHUB_BASE_REF
echo "Commits after pull"
git log --oneline $GIT_MERGE_BASE_SHA~1..HEAD
- name: JDK 8
- name: JDK 11
uses: actions/setup-java@v1
with:
java-version: 8
java-version: 11
architecture: x64
- name: Cache local Maven repository
uses: actions/cache@v2
Expand Down
2 changes: 1 addition & 1 deletion .mvn/jvm.config
Original file line number Diff line number Diff line change
@@ -1 +1 @@
-Xms168m -Xmx1536m -XX:NewSize=64m -Djava.awt.headless=true
-Djava.awt.headless=true
4 changes: 2 additions & 2 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.1/apache-maven-3.6.1-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.1/apache-maven-3.8.1-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar
1 change: 0 additions & 1 deletion assignment/impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@
<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>jakarta.mail</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
Expand Down
6 changes: 0 additions & 6 deletions basiclti/basiclti-impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,5 @@
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
4 changes: 4 additions & 0 deletions basiclti/tsugi-util/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
<dependencies>
<!-- This pom should *never* add any "org.sakaiproject" dependencies - any
Sakai-specific code needs to be placed in the basiclti-common folder -->
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
Expand Down
10 changes: 4 additions & 6 deletions calendar/calendar-impl/impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito2</artifactId>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-junit4</artifactId>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-junit4-common</artifactId>
Expand All @@ -141,12 +145,6 @@
<version>${sakai.powermock.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-junit4</artifactId>
<version>${sakai.powermock.version}</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
import org.powermock.api.mockito.PowerMockito;
import org.powermock.core.classloader.annotations.PowerMockIgnore;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
import org.sakaiproject.authz.api.SecurityService;
Expand Down Expand Up @@ -78,6 +79,7 @@
*/
@PrepareForTest(ComponentManager.class)
@RunWith(PowerMockRunner.class)
@PowerMockIgnore({"com.sun.org.apache.xerces.*", "javax.xml.*", "org.xml.*", "javax.management.*"})
public class BaseExternalCalendarSubscriptionTest {


Expand Down
39 changes: 4 additions & 35 deletions cloud-content/impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,17 @@
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
</dependency>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</dependency>

<!-- jclouds dependencies -->
<!-- Package these directly in the impl/component -->
<dependency>
<groupId>org.apache.jclouds.driver</groupId>
<artifactId>jclouds-slf4j</artifactId>
<version>${jclouds.version}</version>
<exclusions>
<exclusion>
<groupId>aopalliance</groupId>
<artifactId>aopalliance</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- jclouds-sl4j needs jclouds-core which needs guice which needs aopalliance which is already provided in lib -->
<dependency>
Expand All @@ -71,34 +69,5 @@
<build>
<sourceDirectory>src/main/java</sourceDirectory>
<testSourceDirectory>src/test/java</testSourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.4.2</version>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>swift-tests</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.4.2</version>
<configuration>
<skipTests>false</skipTests>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;

import org.springframework.util.FileCopyUtils;
Expand Down Expand Up @@ -157,7 +158,8 @@ public void testInvalidChars() throws Exception{
SwiftFileSystemHandler.ContainerAndName can = getContainerAndName(ID2, ROOT0, PATH_INVALID);
assertEquals(PATH_VALID, can.name);
}


@Ignore("Setup a mock http listener to respond to http call")
@Test
public void testValid() throws IOException {
long contentSize = swift.saveInputStream(ID2, ROOT1, PATH2, getInputStream());
Expand All @@ -173,7 +175,8 @@ public void testValid() throws IOException {
assertNotNull(e);
}
}


@Ignore("Setup a mock http listener to respond to http call")
@Test
public void testValidText() throws IOException {
long contentSize = swift.saveInputStream(ID3, ROOT1, PATH3, getInputStream());
Expand All @@ -183,7 +186,8 @@ public void testValidText() throws IOException {
assertEquals(MESSAGE, message);
swift.delete(ID3, ROOT1, PATH3);
}


@Ignore("Setup a mock http listener to respond to http call")
@Test
public void testValidBinary() throws IOException {
long contentSize = swift.saveInputStream(ID4, ROOT1, PATH4, getBinaryInputStream());
Expand Down
12 changes: 0 additions & 12 deletions commons/impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -111,18 +111,6 @@
</resource>
</resources>
<!-- unit testing -->
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<!--
By default, the surefire plugin will automatically include all test classes with the following wildcard patterns:
"**/Test*.java" - includes all of its subdirectory and all java filenames that start with "Test".
"**/*Test.java" - includes all of its subdirectory and all java filenames that end with "Test".
"**/*TestCase.java" - includes all of its subdirectory and all java filenames that end with "TestCase".
-->
</plugin>
</plugins>
<testResources>
<testResource>
<directory>${basedir}/src/test</directory>
Expand Down
4 changes: 4 additions & 0 deletions content-review/impl/compilatio/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
</parent>

<dependencies>
<dependency>
<groupId>jakarta.xml.soap</groupId>
<artifactId>jakarta.xml.soap-api</artifactId>
</dependency>
<!-- Content Review dependencies -->
<dependency>
<groupId>org.sakaiproject.contentreview</groupId>
Expand Down
52 changes: 44 additions & 8 deletions deploy/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,42 @@
</profiles>

<dependencies>
<!-- JDK 9+ -->
<dependency>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>jakarta.activation</groupId>
<artifactId>jakarta.activation-api</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.sun.activation</groupId>
<artifactId>jakarta.activation</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>jakarta.xml.soap</groupId>
<artifactId>jakarta.xml.soap-api</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.sun.istack</groupId>
<artifactId>istack-commons-runtime</artifactId>
<scope>compile</scope>
</dependency>
<!-- database -->
<dependency>
<groupId>org.hsqldb</groupId>
Expand Down Expand Up @@ -715,15 +751,20 @@
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator-annotation-processor</artifactId>
<scope>compile</scope>
</dependency>

<!-- hibernate related -->
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<groupId>jakarta.validation</groupId>
<artifactId>jakarta.validation-api</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -782,11 +823,6 @@
<artifactId>jakarta.mail</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>jakarta.activation</groupId>
<artifactId>jakarta.activation-api</artifactId>
<scope>compile</scope>
</dependency>
<!-- caching -->
<dependency>
<groupId>javax.cache</groupId>
Expand Down
4 changes: 2 additions & 2 deletions entitybroker/core-providers/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
</parent>
<dependencies>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<groupId>jakarta.validation</groupId>
<artifactId>jakarta.validation-api</artifactId>
</dependency>
<!-- internal dependencies -->
<dependency>
Expand Down
12 changes: 0 additions & 12 deletions external-calendaring-service/impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -94,18 +94,6 @@
</resources>

<!-- unit testing -->
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<!--
By default, the surefire plugin will automatically include all test classes with the following wildcard patterns:
"**/Test*.java" - includes all of its subdirectory and all java filenames that start with "Test".
"**/*Test.java" - includes all of its subdirectory and all java filenames that end with "Test".
"**/*TestCase.java" - includes all of its subdirectory and all java filenames that end with "TestCase".
-->
</plugin>
</plugins>
<testResources>
<testResource>
<directory>${basedir}/src/test</directory>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
import java.util.Locale;
import java.util.Map;

import jakarta.mail.internet.AddressException;
import jakarta.mail.internet.InternetAddress;
import javax.mail.internet.AddressException;
import javax.mail.internet.InternetAddress;

import lombok.extern.slf4j.Slf4j;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import org.apache.commons.fileupload.FileItem;
import org.apache.commons.io.FilenameUtils;

import jakarta.activation.DataSource;
import javax.activation.DataSource;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
Expand Down
12 changes: 0 additions & 12 deletions hierarchy/impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -171,18 +171,6 @@
</resources>

<!-- unit testing -->
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<!--
By default, the surefire plugin will automatically include all test classes with the following wildcard patterns:
"**/Test*.java" - includes all of its subdirectory and all java filenames that start with "Test".
"**/*Test.java" - includes all of its subdirectory and all java filenames that end with "Test".
"**/*TestCase.java" - includes all of its subdirectory and all java filenames that end with "TestCase".
-->
</plugin>
</plugins>
<testResources>
<testResource>
<directory>${basedir}/src/webapp/WEB-INF</directory>
Expand Down
1 change: 0 additions & 1 deletion jobscheduler/scheduler-component-shared/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.6</version>
<configuration>
<excludes>
<exclude>org/sakaiproject/component/app/scheduler/jobs/*.java</exclude>
Expand Down
4 changes: 0 additions & 4 deletions kernel/api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,5 @@
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<dependency>
<groupId>jakarta.activation</groupId>
<artifactId>jakarta.activation-api</artifactId>
</dependency>
</dependencies>
</project>
Loading

0 comments on commit ffcc4f7

Please sign in to comment.