The datastore Maven project (datastore/pom.xml) is an integration and example layer: it contains hand-written tests that exercise generated persistence code (typically DataManager, *Store, and model types). It is not the same artifact as core or compiler; it does not implement the crawler or templates itself.
For Maven reactor notes (this module is not in the parent <modules> list), see Project structure.
groupId:org.exampleartifactId:datastoreversion: aligned with parent (1.0-SNAPSHOT)
The generated code used in tests is configured to live under the org.example Java package (see compiler tests’ rootPackage in CompilerTestUtil).
| Path | Role |
|---|---|
datastore/src/main/java/ |
Target for generated sources. Often empty until you run Application.compile(new JavaCompiler()) with srcFolder pointing here. |
datastore/src/test/java/org/example/ |
Hand-written tests: store/*StoreTest.java, repository/, storedprocedure/, util/ (DataSourceProvider, EncryptionUtil, …). |
Tests import generated types such as DataManager, AccountsStore, and Accounts from org.example after generation; see for example AccountsStoreTest.
-
Start a database (for example
docker compose up -dusing rootdocker-compose.yml— PostgreSQL on port 5432 withmoviedb/ scripts underinit.db/postgres). -
Ensure
database.propertiesmatches your JDBC URL, user, password, and schema. -
Run code generation so
datastore/src/main/javacontainsorg.examplesources (for example run compiler module tests, or a smallmainthat callsapplication.compile(new JavaCompiler())). -
Run datastore tests:
mvn -f datastore/pom.xml clean test
Because datastore is outside the default reactor, mvn clean install from the repository root does not compile or test this module unless you add it to the parent POM or invoke it with -f as above.
- PostgreSQL JDBC driver — Runtime database access for tests.
- Spring Data Commons — Used by tests (for example paging/specification-style helpers where applicable).
There is no direct Maven dependency from datastore onto core or compiler; the link is conceptual: generated code is expected to be compatible with the JDBC stack you use at test time.
- The parent and datastore POMs declare Java 17 for compilation.
- The root README.md mentions broader JDK support historically (minimum 11, tested up to 18). Treat the POM as the authoritative build level for this tree; use README for informal compatibility notes.
- Compiler module — How
srcFolderandrootPackageare set fororg.exampleoutput. - Core module — What
Applicationcarries before compile. - Project structure
- Documentation index