Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
941f557
For issues #478, break ground on a tool that will identify project su…
DavidWhitlock Jul 20, 2025
fa539c7
A submission made in after the previous grade needs to be graded.
DavidWhitlock Jul 31, 2025
4a02446
Test output with a grade needs to be graded.
DavidWhitlock Jul 31, 2025
c4a45d2
Use records instead of classes for JavaBeans.
DavidWhitlock Jul 31, 2025
6e9bd41
A submission that was graded after it was submitted graded.
DavidWhitlock Jul 31, 2025
8891f0c
Provide more nuance about what about what to do with a submission (te…
DavidWhitlock Jul 31, 2025
e2b7f3a
Do a better job of finding zip file. Still very much a work in progr…
DavidWhitlock Aug 20, 2025
010fa6f
Create the snapshot versions for Winter 2026.
DavidWhitlock Aug 21, 2025
2aeb357
Merge branch 'Winter2026-SNAPSHOT' into issue-478/find-ungraded-submi…
DavidWhitlock Aug 21, 2025
2305f05
Integrate Winter 2026 artifact versions.
DavidWhitlock Aug 21, 2025
ff1c55a
Fix the URLs for the Central Portal Snapshots used by archetype proje…
DavidWhitlock Aug 21, 2025
7afde59
Finally figured out how to get Files.walk() method to do what I want.
DavidWhitlock Aug 21, 2025
9deed2c
Use the stream API even though we can't use a try-with-resources.
DavidWhitlock Aug 21, 2025
dd9be16
Merge branch 'Winter2026-SNAPSHOT' into issue-478/find-ungraded-submi…
DavidWhitlock Aug 21, 2025
406088d
Realized that we need the path to the directory containing the submis…
DavidWhitlock Aug 21, 2025
82e65fb
Implement a lot of logic.
DavidWhitlock Aug 21, 2025
e3fd3cb
Add submission path to analysis.
DavidWhitlock Aug 21, 2025
7a22458
Add FindUngradedSubmissions to GraderTools.
DavidWhitlock Aug 21, 2025
59042a5
Fix some things found while working with real project submissions.
DavidWhitlock Aug 21, 2025
443a3c6
If the " out of " grade line appears after line 7 of the test output,…
DavidWhitlock Aug 21, 2025
b2896c6
Optionally print out the reason that the submission needs testing/gra…
DavidWhitlock Aug 21, 2025
1de2cee
When generating letter grades, add a salutation to the grade report t…
DavidWhitlock Aug 21, 2025
f5d4d9b
Merge pull request #514 from JoyOfCodingPDX/issue-478/find-ungraded-s…
DavidWhitlock Aug 21, 2025
b028eac
Write the grade percentage totals for each student to a file (in addi…
DavidWhitlock Aug 21, 2025
0f40a20
If the me.xml file already exists, have the Survey program issue a er…
DavidWhitlock Aug 21, 2025
ad025d0
Merge pull request #517 from JoyOfCodingPDX/issue-515/salutation-in-g…
DavidWhitlock Aug 22, 2025
981ad4e
Merge branch 'Winter2026-SNAPSHOT' into issue-498/letter-grades-to-file
DavidWhitlock Aug 22, 2025
b449105
Merge pull request #518 from JoyOfCodingPDX/issue-498/letter-grades-t…
DavidWhitlock Aug 22, 2025
1d4bffb
Fix some typos in the Student class and clarify the error message pri…
DavidWhitlock Aug 22, 2025
50995af
Prevent Project0, the Student project, from being submitted.
DavidWhitlock Aug 22, 2025
7e122dc
Adjust a test now that Project0 can't be submitted.
DavidWhitlock Aug 22, 2025
8214bbc
Merge pull request #519 from JoyOfCodingPDX/improve-student-project
DavidWhitlock Aug 22, 2025
7140087
Upgrade to version 3.3.4 of the Maven wrapper and version 3.9.11 of M…
DavidWhitlock Nov 27, 2025
6aaf2ac
Merge pull request #520 from JoyOfCodingPDX/maven-3.9.11
DavidWhitlock Nov 27, 2025
3ffd519
Add example XML parsing code for the Phone Bill project.
DavidWhitlock Nov 27, 2025
3f5f201
Update third-party library dependencies to their latest versions.
DavidWhitlock Nov 27, 2025
acc4dcc
Merge pull request #521 from JoyOfCodingPDX/phonebill-xml-project
DavidWhitlock Nov 27, 2025
7d77e6c
Merge pull request #522 from JoyOfCodingPDX/update-dependencies-for-w…
DavidWhitlock Nov 28, 2025
030e476
Include XML parsing example in the Phone Bill archetype.
DavidWhitlock Nov 28, 2025
ba7c4cb
Do not use the --no-fonts option for javadoc because it doesn't work …
DavidWhitlock Nov 28, 2025
763da56
Fix field description
DavidWhitlock Nov 28, 2025
01842a4
Initial plan
Copilot Nov 28, 2025
6e22655
Fix consecutive blank lines in PhoneBillXmlHelperTest.java
Copilot Nov 28, 2025
9891c4a
Merge pull request #523 from JoyOfCodingPDX/phone-bill-xml-example-in…
DavidWhitlock Nov 28, 2025
f7201d4
Merge branch 'Winter2026-SNAPSHOT' into copilot/sub-pr-523
DavidWhitlock Nov 28, 2025
c50c9f4
Rename the method that attempts to parse an invalid XML file.
DavidWhitlock Nov 28, 2025
de942a1
Merge pull request #524 from JoyOfCodingPDX/copilot/sub-pr-523
DavidWhitlock Nov 28, 2025
4dfe1f3
Refactor duplicate code for creating an XML DocumentBuilder into a si…
DavidWhitlock Nov 28, 2025
fb41a3b
Merge branch 'Winter2026-SNAPSHOT' into refactor-xml-helper-tests
DavidWhitlock Nov 28, 2025
ba03a07
Merge pull request #525 from JoyOfCodingPDX/refactor-xml-helper-tests
DavidWhitlock Nov 28, 2025
42e5210
Added a simple Course class that we'll eventually persist to a database.
DavidWhitlock Dec 14, 2025
c6533f7
A simple Data Access Object for persisting Course objects to an embed…
DavidWhitlock Dec 14, 2025
c1010e2
Move code to create and drop database to the DAO.
DavidWhitlock Dec 14, 2025
c8ce0c4
Create an integration test that validates how to persist an H2 databa…
DavidWhitlock Dec 14, 2025
94f11c7
Refactor code that creates the connection to the H2 database to a H2D…
DavidWhitlock Dec 14, 2025
98a6597
Added a Department domain object that is persisted to the database.
DavidWhitlock Dec 14, 2025
209f501
Use the Department class as an example for persisting objects to a fi…
DavidWhitlock Dec 14, 2025
e647012
Make a Course's "departmentId" a foreign key to the "id" field of the…
DavidWhitlock Dec 14, 2025
fdc208a
Automatically generate the "id" for Department objects.
DavidWhitlock Dec 14, 2025
306bcd2
Re-added the one-arg constructor to the Department class.
DavidWhitlock Dec 14, 2025
2657813
Write a simple command line program that persists a Department object…
DavidWhitlock Dec 21, 2025
9b1b8f0
If the name of the department to create isn't provided, then print al…
DavidWhitlock Dec 21, 2025
86690f1
Make the ManageDepartments main method more fully-featured.
DavidWhitlock Dec 21, 2025
98325b5
Run the integration tests as part of the Maven build.
DavidWhitlock Dec 21, 2025
82b6ae4
Added a "credit" property to the Course class.
DavidWhitlock Dec 24, 2025
716b076
Added an "id" property to the Course object that is populated from th…
DavidWhitlock Dec 24, 2025
283b37d
Added an AcademicTerm to show off how dates are persisted to the data…
DavidWhitlock Dec 24, 2025
a897fab
An example of how prepared statements can prevent SQL injection attacks.
DavidWhitlock Dec 28, 2025
8be0347
Use the JDBC Meta Data API to
DavidWhitlock Dec 28, 2025
4056e4e
Introduce DAO interfaces
DavidWhitlock Dec 28, 2025
8e1220b
Inline the createTable() and dropTable() methods from the DAO interfa…
DavidWhitlock Dec 28, 2025
916abff
Data Access Objects (DAOs) for persisting FamilyTree objects to a rel…
DavidWhitlock Dec 30, 2025
ec12cbd
Move the FamilyTree DAO code to the family tree project.
DavidWhitlock Dec 30, 2025
44d9c8e
Move the Family Tree XML example to the resources directory.
DavidWhitlock Dec 30, 2025
9000adb
Added an ExecuteH2DatabaseStatement command line program that execute…
DavidWhitlock Dec 30, 2025
e7295b1
Now that the examples jar no longer depends on the family jar, the we…
DavidWhitlock Dec 30, 2025
dca0b44
With the addition of JDBC content, increment the minor version of the…
DavidWhitlock Jan 1, 2026
eb987c9
Extract the version of H2 into the top-level pom.xml.
DavidWhitlock Jan 1, 2026
ba1a19c
Beginnings of a DAO example for a PhoneBill.
DavidWhitlock Jan 1, 2026
001b574
Extract a skeletal DAO for phone bills.
DavidWhitlock Jan 1, 2026
cd18d82
Only print "interesting" tables in PrintH2DatabaseSchema. That is, i…
DavidWhitlock Jan 1, 2026
2b25be1
Rename the phone bill table names.
DavidWhitlock Jan 1, 2026
84b0ec0
Add a main method to PhoneBillDAO that smoked out a couple of problem…
DavidWhitlock Jan 1, 2026
98f8d75
Increment minor version of phonebill artifacts due to inclusion of JD…
DavidWhitlock Jan 1, 2026
8836530
Remove XML examples from phone bill project. They'll just confuse pe…
DavidWhitlock Jan 1, 2026
e2a2334
Add PhoneBillDAO classes to phone bill archetype project.
DavidWhitlock Jan 1, 2026
d9aea0f
Merge pull request #527 from JoyOfCodingPDX/issue-526/jdbc-with-h2-da…
DavidWhitlock Jan 1, 2026
a7159a1
Improve the out-of-the-box error message for the main methods in the …
DavidWhitlock Jan 1, 2026
4728f07
Oops. Use the Winter2026 koans-lib artifact.
DavidWhitlock Jan 1, 2026
ce593e0
Update some libraries to remove CVEs.
DavidWhitlock Jan 1, 2026
0d8f166
Merge pull request #528 from JoyOfCodingPDX/better-missing-arguments-…
DavidWhitlock Jan 1, 2026
76e8909
Update some libraries to remove CVEs.
DavidWhitlock Jan 1, 2026
b234e9b
Use the old version of greenmail.
DavidWhitlock Jan 1, 2026
f9f2d9c
A couple more dependency updates.
DavidWhitlock Jan 1, 2026
aa22469
Merge pull request #529 from JoyOfCodingPDX/update-dependencies
DavidWhitlock Jan 1, 2026
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ target
*/target
dependency-reduced-pom.xml

# H2 database files
*.db
20 changes: 2 additions & 18 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
# 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
wrapperVersion=3.3.4
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
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.11/apache-maven-3.9.11-bin.zip
38 changes: 26 additions & 12 deletions examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,23 @@
<parent>
<artifactId>joy</artifactId>
<groupId>io.github.davidwhitlock.joy</groupId>
<version>1.2.3</version>
<version>1.2.4-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>examples</artifactId>
<name>examples</name>
<version>1.3.4</version>
<version>1.4.0-SNAPSHOT</version>
<url>https://www.cs.pdx.edu/~whitlock</url>
<dependencies>
<dependency>
<groupId>io.github.davidwhitlock.joy</groupId>
<artifactId>family</artifactId>
<version>1.1.5</version>
</dependency>
<dependency>
<groupId>io.github.davidwhitlock.joy</groupId>
<artifactId>projects</artifactId>
<version>3.0.3</version>
<version>3.0.4-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>jakarta.mail</artifactId>
<version>2.0.1</version>
<version>2.0.2</version>
</dependency>
<dependency>
<groupId>com.google.inject</groupId>
Expand All @@ -34,20 +29,39 @@
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>4.0.2</version>
<version>4.0.4</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>4.0.5</version>
<version>4.0.6</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>${h2.version}</version>
</dependency>
<dependency>
<groupId>io.github.davidwhitlock.joy</groupId>
<artifactId>projects</artifactId>
<version>3.0.3</version>
<version>3.0.4-SNAPSHOT</version>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>${build-helper-maven-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${surefire.version}</version>
</plugin>
</plugins>
</build>
</project>
101 changes: 101 additions & 0 deletions examples/src/it/java/edu/pdx/cs/joy/jdbc/DepartmentDAOIT.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
package edu.pdx.cs.joy.jdbc;

import org.junit.jupiter.api.*;

import java.io.File;
import java.sql.Connection;
import java.sql.SQLException;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.*;

@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
public class DepartmentDAOIT {

private static final String TEST_DEPARTMENT_NAME = "Computer Science";
private static int generatedDepartmentId;

private static String dbFilePath;
private Connection connection;
private DepartmentDAO departmentDAO;

@BeforeAll
public static void createTable() throws SQLException {
// Create database file in temporary directory
String tempDir = System.getProperty("java.io.tmpdir");
dbFilePath = tempDir + File.separator + "DepartmentDAOIT.db";

// Connect to the file-based H2 database
Connection connection = H2DatabaseHelper.createFileBasedConnection(new File(dbFilePath));

// Create the departments table
DepartmentDAOImpl.createTable(connection);

connection.close();
}

@BeforeEach
public void setUp() throws SQLException {
// Connect to the existing database file
connection = H2DatabaseHelper.createFileBasedConnection(new File(dbFilePath));
departmentDAO = new DepartmentDAOImpl(connection);
}

@AfterEach
public void tearDown() throws SQLException {
if (connection != null && !connection.isClosed()) {
connection.close();
}
}

@AfterAll
public static void cleanUp() throws SQLException {
// Connect one final time to drop the table and clean up
Connection connection = H2DatabaseHelper.createFileBasedConnection(new File(dbFilePath));
DepartmentDAOImpl.dropTable(connection);
connection.close();

// Delete the database files
deleteIfExists(new File(dbFilePath + ".mv.db"));
deleteIfExists(new File(dbFilePath + ".trace.db"));
}

private static void deleteIfExists(File file) {
if (file.exists()) {
assertThat(file.delete(), is(true));
}
}

@Test
@Order(1)
public void testPersistDepartment() throws SQLException {
// Create and persist a department (ID will be auto-generated)
Department department = new Department(TEST_DEPARTMENT_NAME);
departmentDAO.save(department);

// Store the auto-generated ID for use in subsequent tests
generatedDepartmentId = department.getId();

// Verify that an ID was auto-generated
assertThat(generatedDepartmentId, is(greaterThan(0)));

// Verify the department was saved by fetching it in the same test
Department fetchedDepartment = departmentDAO.findById(generatedDepartmentId);
assertThat(fetchedDepartment, is(notNullValue()));
assertThat(fetchedDepartment.getId(), is(equalTo(generatedDepartmentId)));
assertThat(fetchedDepartment.getName(), is(equalTo(TEST_DEPARTMENT_NAME)));
}

@Test
@Order(2)
public void testFindPersistedDepartment() throws SQLException {
// Search for the department that was persisted in the previous test
// using the auto-generated ID
Department fetchedDepartment = departmentDAO.findById(generatedDepartmentId);

// Validate that the department persisted between test methods
assertThat(fetchedDepartment, is(notNullValue()));
assertThat(fetchedDepartment.getId(), is(equalTo(generatedDepartmentId)));
assertThat(fetchedDepartment.getName(), is(equalTo(TEST_DEPARTMENT_NAME)));
}
}
Loading