Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
9d08735
Break ground on code for Winter 2025 by introducing SNAPSHOT versions…
DavidWhitlock Sep 15, 2024
19219d7
Get the latest Koans library.
DavidWhitlock Sep 15, 2024
4a4d367
Address #474 by requiring Java language level 17.
DavidWhitlock Sep 15, 2024
01c5fa0
Address #475 by logging a message when the top-level servlet methods …
DavidWhitlock Sep 15, 2024
c6a9390
Move the servlet logging to the archetypes.
DavidWhitlock Sep 15, 2024
a43f3a8
Merge pull request #482 from JoyOfCodingPDX/issue-474/java-17-languag…
DavidWhitlock Sep 15, 2024
cceb741
Address #476 by only displaying a assignment's score if it has been g…
DavidWhitlock Sep 15, 2024
f889f90
Override the log method so that it can be invoked by a unit test (tha…
DavidWhitlock Sep 15, 2024
55bc62d
Merge branch 'Winter2025-SNAPSHOT' into issue-475/dictionary-logs-mes…
DavidWhitlock Sep 15, 2024
d8e8647
Merge pull request #483 from JoyOfCodingPDX/issue-475/dictionary-logs…
DavidWhitlock Sep 15, 2024
f0e1e4d
Merge branch 'Winter2025-SNAPSHOT' into issue-476/missing-grade-in-re…
DavidWhitlock Sep 15, 2024
ea8695b
Merge pull request #484 from JoyOfCodingPDX/issue-476/missing-grade-i…
DavidWhitlock Oct 13, 2024
51b5370
Use a SNAPSHOT version for the original project pom.xml files.
DavidWhitlock Oct 13, 2024
3119190
Merge remote-tracking branch 'origin/Winter2025-SNAPSHOT' into Winter…
DavidWhitlock Oct 13, 2024
99ce06a
Address #479 by validating that .gradle files are not submitted.
DavidWhitlock Nov 15, 2024
2cdc6cd
Address #473 by requiring an @pdx.edu email address for the survey.
DavidWhitlock Nov 15, 2024
1cc0dcb
Fix a test inherited in SubmitAndroidProjectIT from SubmitIT.
DavidWhitlock Nov 16, 2024
249f282
Merge pull request #486 from JoyOfCodingPDX/issue-473/survey-must-gat…
DavidWhitlock Nov 17, 2024
97d2ed9
Remove the DTD URL from example XML files because the URL returns a 4…
DavidWhitlock Nov 18, 2024
37a928a
Update the airline archetype project to no longer reference the DTD URL.
DavidWhitlock Nov 18, 2024
98ced21
Update the appointment book archetype project to no longer reference …
DavidWhitlock Nov 18, 2024
c09bb53
Update the appointment book archetype project to no longer reference …
DavidWhitlock Nov 18, 2024
ad75744
Merge pull request #485 from JoyOfCodingPDX/issue-479/dont-submit-dot…
DavidWhitlock Nov 21, 2024
9261fa2
Merge branch 'Winter2025-SNAPSHOT' into remove-dtd-urls
DavidWhitlock Nov 21, 2024
be1c157
Incremented the versions of the archetype projects.
DavidWhitlock Nov 21, 2024
a968f0b
Merge remote-tracking branch 'origin/remove-dtd-urls' into remove-dtd…
DavidWhitlock Nov 21, 2024
4050d52
Incremented the versions of the archetype parent project.
DavidWhitlock Nov 21, 2024
87ab29f
New version of examples project.
DavidWhitlock Nov 21, 2024
5ac3bbe
GitHub CI build is using an old version of the maven-site-plugin. Tr…
DavidWhitlock Nov 22, 2024
ebc5b1c
Restore some changes that I think broke things.
DavidWhitlock Nov 22, 2024
569cce4
Restore some changes that I think broke things.
DavidWhitlock Nov 22, 2024
a7e60c9
Merge pull request #487 from JoyOfCodingPDX/remove-dtd-urls
DavidWhitlock Nov 23, 2024
b786ffd
Begin updating third-party dependencies.
DavidWhitlock Nov 28, 2024
01af43f
Oops. Typo in version number.
DavidWhitlock Nov 28, 2024
fb3939e
More minor dependency updates.
DavidWhitlock Nov 28, 2024
4e7afca
Revert to greenmail 2.0.1.
DavidWhitlock Nov 28, 2024
0b01847
Upgrade hamcrest.
DavidWhitlock Nov 28, 2024
bbfede8
Update some Maven plugins.
DavidWhitlock Nov 28, 2024
2fabf0e
Update more Maven plugins.
DavidWhitlock Nov 28, 2024
ee2b6c2
Something about version 3.3.1 of the maven-archetype-plugin causes th…
DavidWhitlock Nov 28, 2024
1390720
Upgrade jetty-maven-plugin to latest 10.X.
DavidWhitlock Nov 28, 2024
98f5c42
Merge pull request #489 from JoyOfCodingPDX/Winter2025-update-depende…
DavidWhitlock Nov 29, 2024
23556bb
Begin migrating servlet code to Jetty 11. This includes replacing us…
DavidWhitlock Nov 29, 2024
cbafc32
Get the Phone Bill web project working with Jetty 11.
DavidWhitlock Nov 29, 2024
26e1206
Rename the servlet error message.
DavidWhitlock Nov 29, 2024
51cff54
Get original web projects working with Jetty 11.
DavidWhitlock Nov 29, 2024
2b57073
Adjust some imports so that there are fewer changes to the archetype …
DavidWhitlock Nov 29, 2024
ebd8e28
Apply changes for Jetty 11 to Airline Web archetype.
DavidWhitlock Nov 29, 2024
7989604
Increment the major version number for web-related projects.
DavidWhitlock Nov 29, 2024
e97ff10
Adjust some imports so that there are fewer changes to the archetype …
DavidWhitlock Nov 29, 2024
48748a7
Apply changes for Jetty 11 to Appointment Book Web archetype.
DavidWhitlock Nov 29, 2024
d77a1cc
Adjust some imports so that there are fewer changes to the archetype …
DavidWhitlock Nov 29, 2024
61fed68
Apply changes for Jetty 11 to Phone Bill Web archetype.
DavidWhitlock Nov 29, 2024
9ce2ae9
Oops. Restore the parent POM of the archetype-generated projects to …
DavidWhitlock Nov 29, 2024
09fef06
Use the official Maven Wrapper for the entire project.
DavidWhitlock Nov 29, 2024
a2bde47
Merge pull request #492 from JoyOfCodingPDX/issue-404/jetty-11
DavidWhitlock Nov 29, 2024
c2662e8
Use the official Maven Wrapper for the original projects.
DavidWhitlock Nov 29, 2024
5a43979
Use the official Maven Wrapper for the Airline archetype.
DavidWhitlock Nov 29, 2024
6486218
Use the official Maven Wrapper for the Airline Web archetype.
DavidWhitlock Nov 29, 2024
02a79f6
Use the official Maven Wrapper for the Appointment Book archetype.
DavidWhitlock Nov 29, 2024
ad9cbe9
Use the official Maven Wrapper for the Appointment Book Web archetype.
DavidWhitlock Nov 29, 2024
1f0fd85
Use the official Maven Wrapper for the Kata archetype.
DavidWhitlock Nov 29, 2024
beb22ff
Use the official Maven Wrapper for the Phone Bill archetype.
DavidWhitlock Nov 29, 2024
cb5a836
Use the official Maven Wrapper for the Phone Bill Web archetype.
DavidWhitlock Nov 29, 2024
4c6623b
Use the official Maven Wrapper for the Student archetype.
DavidWhitlock Nov 29, 2024
9976bca
Merge pull request #493 from JoyOfCodingPDX/issue-335/official-maven-…
DavidWhitlock Nov 29, 2024
7dfc8ff
Upgrade to version 3 of CodeQL.
DavidWhitlock Nov 29, 2024
9ca714f
Merge pull request #494 from JoyOfCodingPDX/issue-488/codeq3-v3
DavidWhitlock Nov 29, 2024
1d7a422
Add the latest koans code to archetype.
DavidWhitlock Dec 1, 2024
2b08ba3
Oops. Deleted something I shouldn't have.
DavidWhitlock Dec 1, 2024
ba79886
Oops. Deleted something I shouldn't have. Again.
DavidWhitlock Dec 1, 2024
9d93511
Remove -SNAPSHOT from versions.
DavidWhitlock Dec 1, 2024
4cd061b
Oops. There was already a version 2.2.0 of the student project deplo…
DavidWhitlock Dec 1, 2024
d2aad41
Oops. The initial deployment of release artifacts didn't take. Incr…
DavidWhitlock Dec 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -64,7 +64,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -78,4 +78,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
2 changes: 1 addition & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '11', '17', '22' ]
java: [ '17', '22' ]
name: JDK ${{ matrix.Java }}
steps:
- uses: actions/checkout@v4
Expand Down
117 changes: 0 additions & 117 deletions .mvn/wrapper/MavenWrapperDownloader.java

This file was deleted.

21 changes: 19 additions & 2 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,19 @@
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.6/apache-maven-3.8.6-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
wrapperVersion=3.3.2
distributionType=only-script
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip
10 changes: 5 additions & 5 deletions examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@
<parent>
<artifactId>joy</artifactId>
<groupId>io.github.davidwhitlock.joy</groupId>
<version>1.1.1</version>
<version>1.2.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>examples</artifactId>
<name>examples</name>
<version>1.2.1</version>
<version>1.3.0</version>
<url>https://www.cs.pdx.edu/~whitlock</url>
<dependencies>
<dependency>
<groupId>io.github.davidwhitlock.joy</groupId>
<artifactId>family</artifactId>
<version>1.1.1</version>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>io.github.davidwhitlock.joy</groupId>
<artifactId>projects</artifactId>
<version>2.1.1</version>
<version>3.0.0</version>
</dependency>
<dependency>
<groupId>com.sun.mail</groupId>
Expand All @@ -45,7 +45,7 @@
<dependency>
<groupId>io.github.davidwhitlock.joy</groupId>
<artifactId>projects</artifactId>
<version>2.1.1</version>
<version>3.0.0</version>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
Expand Down
6 changes: 3 additions & 3 deletions family/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
<parent>
<artifactId>joy</artifactId>
<groupId>io.github.davidwhitlock.joy</groupId>
<version>1.1.1</version>
<version>1.2.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>family</artifactId>
<packaging>jar</packaging>
<version>1.1.1</version>
<version>1.1.2</version>
<name>Family Tree Application</name>
<description>An Family Tree application for The Joy of Coding</description>
<url>https://www.cs.pdx.edu/~whitlock</url>
<dependencies>
<dependency>
<groupId>io.github.davidwhitlock.joy</groupId>
<artifactId>projects</artifactId>
<version>2.1.1</version>
<version>3.0.0</version>
</dependency>
</dependencies>
<build>
Expand Down
6 changes: 3 additions & 3 deletions grader/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<parent>
<artifactId>joy</artifactId>
<groupId>io.github.davidwhitlock.joy</groupId>
<version>1.1.1</version>
<version>1.2.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>grader</artifactId>
Expand All @@ -19,7 +19,7 @@
<dependency>
<groupId>io.github.davidwhitlock.joy</groupId>
<artifactId>projects</artifactId>
<version>2.1.1</version>
<version>3.0.0</version>
</dependency>
<dependency>
<groupId>com.opencsv</groupId>
Expand All @@ -29,7 +29,7 @@
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.5.6</version>
<version>1.5.12</version>
</dependency>
<dependency>
<groupId>com.google.inject</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,24 @@
package edu.pdx.cs.joy.grader;

import edu.pdx.cs.joy.grader.gradebook.Assignment;
import edu.pdx.cs.joy.grader.gradebook.Grade;
import edu.pdx.cs.joy.grader.gradebook.GradeBook;
import edu.pdx.cs.joy.grader.gradebook.Student;
import jakarta.mail.MessagingException;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import java.io.File;
import java.io.IOException;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;

public class SubmitAndroidProjectIT extends SubmitIT {
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.*;
import static org.hamcrest.Matchers.equalTo;

public class SubmitAndroidProjectIT extends SubmitIT {

@BeforeEach
@Override
Expand All @@ -32,6 +44,8 @@ public void createFilesToSubmit() throws IOException {
this.filesToSubmit.add(createEmptyFile(wrapperDir, fileName));
}

File dotGradleDir = createDirectories(".gradle");
this.filesToSubmit.add(createEmptyFile(dotGradleDir, "config.properties"));
}

@Override
Expand All @@ -45,4 +59,37 @@ protected Submit getSubmitProgram() {
return new SubmitAndroidProject(() -> submitTime);
}
}

@Test
void dotGradleFilesAreNotSubmitted() throws MessagingException, IOException {
submitter().submitFiles();

GradeBook gradeBook = new GradeBook("SubmitIT");
gradeBook.addStudent(new Student(studentLoginId));
gradeBook.addAssignment(new Assignment(projectName, 3.5));

GraderEmailAccount account = new GraderEmailAccount(emailServerHost, imapsPort, graderEmail, imapPassword, true, m -> { });
FetchAndProcessGraderEmail.fetchAndProcessGraderEmails("projects", account, this.tempDirectory, gradeBook);

Grade grade = gradeBook.getStudent(studentLoginId).get().getGrade(projectName);
assertThat(grade, is(notNullValue()));
assertThat(grade.getScore(), equalTo(Grade.NO_GRADE));
assertThat(grade.getSubmissionTimes().size(), equalTo(1));

File zipFile = findNewestZipFileInTempDirectory();
assertThat(zipFile, is(notNullValue()));
List<String> entryNames = getZipFileEntryNames(zipFile);
assertThat(entryNames, not(empty()));

assertThat(entryNames, not(hasItem(".gradle")));
assertThat(entryNames, not(hasItem(".gradle/config.properties")));
}

@Override
protected Collection<File> getExpectedFilesToSubmit() {
Collection<File> allFiles = super.getExpectedFilesToSubmit();
return allFiles.stream()
.filter(file -> !file.getPath().contains(".gradle"))
.toList();
}
}
16 changes: 10 additions & 6 deletions grader/src/it/java/edu/pdx/cs/joy/grader/SubmitIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ public class SubmitIT extends EmailSenderIntegrationTestCase {
private final String studentName = studentFirstName + " " + studentLastName;
protected final Collection<File> filesToSubmit = new ArrayList<>();
protected final String studentLoginId = "student";
private final String projectName = "Project";
private final String graderEmail = TA_EMAIL.getAddress();
protected final String projectName = "Project";
protected final String graderEmail = TA_EMAIL.getAddress();

@BeforeEach
public void createFilesToSubmit() throws IOException {
Expand Down Expand Up @@ -145,13 +145,17 @@ private void assertZipFileContainsFilesInProjectDirectories() throws IOException
List<String> entryNames = getZipFileEntryNames(zipFile);
assertThat(entryNames, not(empty()));

filesToSubmit.forEach(file -> {
getExpectedFilesToSubmit().forEach(file -> {
String filePath = file.getPath().substring(this.tempDirectory.getPath().length() + 1);
assertThat(entryNames, hasItem(filePath));
});
}

private List<String> getZipFileEntryNames(File zipFile) throws IOException {
protected Collection<File> getExpectedFilesToSubmit() {
return filesToSubmit;
}

protected List<String> getZipFileEntryNames(File zipFile) throws IOException {
List<String> entryNames = new ArrayList<>();
FileInputStream stream = new FileInputStream(zipFile);
try (
Expand All @@ -166,7 +170,7 @@ private List<String> getZipFileEntryNames(File zipFile) throws IOException {
return entryNames;
}

private File findNewestZipFileInTempDirectory() {
protected File findNewestZipFileInTempDirectory() {
File[] zipFiles = this.tempDirectory.listFiles((dir, name) -> name.endsWith(".zip"));
if (zipFiles == null) {
return null;
Expand Down Expand Up @@ -201,7 +205,7 @@ public ProjectSubmitter setSendReceipt(boolean sendReceipt) {
return this;
}

private void submitFiles() throws IOException, MessagingException {
protected void submitFiles() throws IOException, MessagingException {
Student student = new Student(studentLoginId);
student.setEmail(studentEmail);
student.setFirstName(studentFirstName);
Expand Down
Loading