Shared library (not a runnable app) holding the scanner-driving engine that
bScanner, blScanner, and scanner all need.
com.mjtrac.scanner.entity.ScannerUser/repository.ScannerUserRepositorycom.mjtrac.scanner.model.ScanSessioncom.mjtrac.scanner.config.ScannerConfig— all scan settings (backend, paths, output dir, dpi, duplex, source, filename prefix, batch-log dir), plussupportsDpi()/supportsDuplex()(true only for backends that actually forward those settings — seeScanService's command builders) and the flag-page-printing toggle (printFlagPages/printerName).com.mjtrac.scanner.service.ScanService— drives the configured backend (NAPS2 console,scanimage, or a custom shell command) as a background process, tracks progress viaScanSession, and writes the human-readablebatch_log.txt. Also owns start/end notes:startScan(comment)logs the comment immediately as a "Start note" (its own timestamp, separate from the batch-completion summary that already existed).saveEndNote(note)logs a note against the most recently completed batch (ScanSession.lastBatchId) — for anything discovered after the fact, e.g. a misfeed found while reviewing the physical stack.
com.mjtrac.scanner.service.FlagPagePrinter(package-private) — optionally prints a note as a physical page viajava.awt.print. Off by default; every failure is caught and logged internally, never propagated — a missing/broken printer must never stop a scan.
ScannerUserDetailsService (implements Spring Security's
UserDetailsService for bScanner's web login) and SecurityConfig stay
local to bScanner — blScanner's FX login and scanner's Swing login
(LoginDialog) both authenticate directly against
ScannerUserRepository + PasswordEncoder instead, so neither needs a
copy of ScannerUserDetailsService. A DataInitializer (seeds the
default admin user on an empty scanner_users table) also stays local to
each app — bScanner's and blScanner's are byte-identical
(com.mjtrac.scanner.service.DataInitializer); scanner's own
(com.mjtrac.scannerui.ScannerDataInitializer) does the same thing but
isn't literally the same file, since it lives in a different package.
Same reasoning as counter's own CounterDataInitializer: app bootstrap
policy, not shared engine logic.
<dependency>
<groupId>com.mjtrac</groupId>
<artifactId>scanner-core</artifactId>
<version>0.9.13</version>
</dependency>Run mvn install in this directory before building any consumer for the
first time, and again after any change here:
cd scanner-core
mvn install -DskipTestscd scanner-core && mvn test # ScanServiceNotesTest (4 tests)
cd bScanner && ./mvnw compile # no automated test suite (yet)
cd blScanner && ./mvnw compile # no automated test suite (yet)
cd scanner && ./mvnw compilebScanner/blScanner have no automated tests (a pre-existing gap, not
introduced by this extraction) — verify them with a real boot smoke test
(./mvnw spring-boot:run / ./mvnw javafx:run) after any scanner-core
change that touches ScanService or ScannerConfig.
Kept at 3.2.5 Spring Boot / in lockstep with the pbss release version
(0.9.13), matching bScanner/blScanner's own parent version — this is a
separate lineage from counter-core (which tracks bCounter/blCounter's
newer 3.3.0), not something that needs to match it.