Skip to content

Commit

Permalink
Merge branch 'feat/java11-upgrade'
Browse files Browse the repository at this point in the history
  • Loading branch information
loulou2u committed Jan 19, 2023
2 parents 56505b1 + fa66796 commit a7071b9
Show file tree
Hide file tree
Showing 9 changed files with 105 additions and 24 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@ on:

jobs:
test:
name: '${{ matrix.platform }} with Java 8'
name: '${{ matrix.platform }} with Java ${{ matrix.java-version }}'
strategy:
matrix:
platform:
- ubuntu-latest
- windows-latest
- macos-latest
java-version:
- 8
- 11
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout
Expand All @@ -24,7 +27,7 @@ jobs:
uses: actions/setup-java@v3
with:
distribution: adopt-hotspot
java-version: 8
java-version: ${{ matrix.java-version }}
- name: Install
run: mvn clean install -DskipTests=true -D"maven.javadoc.skip=true" -B -V -D"javax.xml.accessExternalSchema=all"
- name: Test
Expand Down
11 changes: 9 additions & 2 deletions courses-portlet-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,15 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>


<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>1.3.2</version>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Expand Down
5 changes: 4 additions & 1 deletion courses-portlet-dao/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@
<artifactId>log4j-over-slf4j</artifactId>
</dependency>

<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
Expand All @@ -85,7 +89,6 @@
<scope>provided</scope>
</dependency>


<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

import java.util.List;

import javax.annotation.Resource;
import javax.portlet.PortletRequest;

import org.apache.commons.logging.Log;
Expand All @@ -29,6 +28,8 @@
import org.jasig.portlet.courses.model.xml.TermList;
import org.jasig.portlet.courses.model.xml.personal.Course;
import org.jasig.portlet.courses.model.xml.personal.CoursesByTerm;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;

/**
* MergingCoursesDaoImpl merges together information from multiple data sources.
Expand All @@ -54,7 +55,8 @@ public class MergingCoursesDaoImpl implements ICoursesDao {
*
* @param courseDaos
*/
@Resource(name="courseDaos")
@Autowired
@Qualifier("courseDaos")
public void setCourseDaos(List<ICoursesDao> courseDaos) {
this.courseDaos = courseDaos;
}
Expand Down
7 changes: 7 additions & 0 deletions courses-portlet-webapp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,13 @@
<version>${resource-server.version}</version>
<configuration>
</configuration>
<dependencies>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.3.3</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>aggregate-resources</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import org.jasig.portlet.degreeprogress.model.ProgramComponent;
import org.jasig.portlet.degreeprogress.model.xml.DegreeProgressReport;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.dao.EmptyResultDataAccessException;
import org.springframework.jdbc.UncategorizedSQLException;
import org.springframework.stereotype.Controller;
Expand Down Expand Up @@ -65,6 +66,7 @@ public void setDegreeProgramDao(IDegreeProgramDao degreeProgramDao) {
private ICoursesDao coursesDao;

@Autowired(required = true)
@Qualifier("finalGradesServiceDao")
public void setCoursesDao(ICoursesDao coursesDao) {
this.coursesDao = coursesDao;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public void setViewSelector(IViewSelector viewSelector) {
this.viewSelector = viewSelector;
}
@Autowired
@Qualifier("finalGradesServiceDao")
public void setCoursesDao(ICoursesDao coursesDao) {
this.coursesDao = coursesDao;
}
Expand Down
66 changes: 52 additions & 14 deletions courses-portlet-webapp/src/main/resources/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,31 +28,69 @@
<!-- -->
<configuration scan="true" scanPeriod="30 seconds">
<contextName>CoursesPortlet</contextName>


<!--
| Propagate log levels to java.util.logging
+-->
<contextListener class="ch.qos.logback.classic.jul.LevelChangePropagator">
<resetJUL>true</resetJUL>
</contextListener>


<!--
| Expose the logback configuration via JMX
+-->
<jmxConfigurator />


<!--
| Specify a local property that sets up the logging directory (to tomcat's logs directory).
+-->
<property scope="local" name="LOG_DIR" value="${catalina.base}/logs" />

<!--
| Setup a file based logger that rolls
|
| http://logback.qos.ch/manual/appenders.html#RollingFileAppender
+-->
<appender name="LOG" class="ch.qos.logback.core.rolling.RollingFileAppender">
<!--See http://logback.qos.ch/manual/appenders.html#RollingFileAppender-->
<!--and http://logback.qos.ch/manual/appenders.html#TimeBasedRollingPolicy-->
<!--for further documentation-->
<File>${CoursesPortlet.webapp.root}/../../logs/CoursesPortlet.log</File>
<!--
| Name of the current log file
+-->
<File>${LOG_DIR}/${CONTEXT_NAME}.log</File>

<!--
| Log message pattern configuration
|
| http://logback.qos.ch/manual/layouts.html#conversionWord
+-->
<encoder>
<pattern>%-5level [%thread] %logger{36} %d{ISO8601} - %msg%n</pattern>
</encoder>

<!--
| Rolls the log file every 24 hours
| gzip the archived log file
| Delete archived log files older than 28 days
|
| http://logback.qos.ch/manual/appenders.html#TimeBasedRollingPolicy
+-->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${CoursesPortlet.webapp.root}/../../logs/CoursesPortlet.log.%d{yyyy-MM-dd}</fileNamePattern>
<fileNamePattern>${LOG_DIR}/${CONTEXT_NAME}.log.%d{yyyy-MM-dd}.gz</fileNamePattern>
<maxHistory>28</maxHistory>
</rollingPolicy>
</appender>

<root level="DEBUG">
<appender-ref ref="LOG"/>

<!--
| Setup default log level to INFO
+-->
<root level="INFO">
<appender-ref ref="LOG" />
</root>


<!--
| Turn up logging for portlet specific package
+-->
<logger name="org.jasig.portlet.courses" additivity="false" level="DEBUG">
<appender-ref ref="LOG"/>
</logger>
</configuration>
</logger>

</configuration>
24 changes: 21 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,11 @@
<mockito.version>4.11.0</mockito.version>
<spring.version>3.2.3.RELEASE</spring.version>
<jackson.version>2.14.1</jackson.version>
<jaxb-api.version>2.3.1</jaxb-api.version>
<jaxb-impl.version>2.3.3</jaxb-impl.version>
<jaxb2basics.version>0.6.4</jaxb2basics.version>
<resource-server.version>1.0.29</resource-server.version>
<slf4j.version>1.7.36</slf4j.version>
<slf4j.version>2.0.6</slf4j.version>

<project.build.sourceVersion>1.6</project.build.sourceVersion>
<project.build.targetVersion>1.6</project.build.targetVersion>
Expand Down Expand Up @@ -86,6 +88,16 @@
<artifactId>commons-lang</artifactId>
<version>2.6</version>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>${jaxb-api.version}</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>${jaxb-impl.version}</version>
</dependency>
<dependency>
<groupId>javax.portlet</groupId>
<artifactId>portlet-api</artifactId>
Expand Down Expand Up @@ -125,6 +137,12 @@
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.13</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
Expand Down Expand Up @@ -230,7 +248,7 @@
<dependency>
<groupId>org.springframework.ws</groupId>
<artifactId>spring-ws-security</artifactId>
<version>2.2.4.RELEASE</version>
<version>2.4.7.RELEASE</version>
</dependency>
<dependency>
<groupId>taglibs</groupId>
Expand Down Expand Up @@ -297,7 +315,7 @@
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.8.3</version>
<version>0.14.0</version>
<executions>
<execution>
<goals>
Expand Down

0 comments on commit a7071b9

Please sign in to comment.