Docs / Modules

Module system

S8-meta-env

S8 modules do not nest. They are siblings under a stack root. The overlay is which root you are standing on: a git checkout (DEV) or a built tree of jars (PROD).

Layout

Typical checkout at {dev.stack}/{target}/:

PathRole
sources/Java sources and module-info.java
build.propertiesIdentity and dependencies
web-sources/Front JS/CSS (optional)
static-assets/Static/service assets (optional)
demos/, tools/, dev-ops/Extra Java folded in at compile
guidelines/Copied to prod when present
forge/Build scratch, cleaned each build

Required wiring

  1. A root class with public static final S8Module MODULE.
  2. module-info.java annotated @S8ModuleDescriptor(def = RootClass.class).
  3. build.properties.

Runtime resolution: S8Module.getMode() looks at whether the code source path sits under the prod root or the dev root. Web sources resolve to web-sources in DEV and web-classes in PROD.

Continue with S8Module and S8Env.