Skip to content

Commit c2ecce4

Browse files
authored
chore: standardize README and fix SECURITY.md (#12)
1 parent 5bcbfdb commit c2ecce4

4 files changed

Lines changed: 75 additions & 23 deletions

File tree

CLAUDE.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
Spawn is a Java 25 framework for programmatically launching and controlling processes, JVMs, and Docker containers. It provides a unified abstraction (`Platform` / `Application` / `Process`) over different execution environments. The core pattern: define a `Specification`, call `platform.launch(spec)`, get back an `Application` with `CompletableFuture`-based lifecycle hooks.
66

7-
**Stack**: Java 25, Maven, Jackson, junixsocket, proprietary `build.base.*` and `build.codemodel.injection`
7+
**Stack**: Java 25, Maven, Jackson, `build.base.*` and `build.codemodel.injection`
88

99
**Structure**: 8 Maven modules in a monorepo, each mapping to a JPMS module:
1010
- `spawn-option` → shared option types
@@ -14,7 +14,7 @@ Spawn is a Java 25 framework for programmatically launching and controlling proc
1414
- `spawn-local-platform` → local OS process launcher (`LocalMachine`)
1515
- `spawn-local-jdk` → JDK detection + `LocalJDKLauncher`
1616
- `spawn-docker` → Docker Engine API interfaces
17-
- `spawn-docker-jdk` → JDK HTTP Client-based Docker implementation (uses `java.net.http` + junixsocket)
17+
- `spawn-docker-jdk` → JDK HTTP Client-based Docker implementation (uses `java.net.http`)
1818

1919
For detailed architecture, see [docs/CODEBASE_MAP.md](docs/CODEBASE_MAP.md).
2020

@@ -32,5 +32,4 @@ Tests requiring Docker are gated by `@EnabledIf("isDockerAvailable")`. The `spaw
3232
- All option types are immutable with static `of(...)` factories and `@Default` annotated defaults
3333
- `Customizer` inner classes on `Application` interfaces are auto-discovered and applied at launch
3434
- Launcher registry: `META-INF/<PlatformClassName>` properties files map `Application=Launcher`
35-
- Use `Brian Oliver Java style` for all code in this repo (see `brian-oliver-java-style` skill)
3635
- Checkstyle enforced: no tabs, no star imports, final locals, no asserts, braces required

README.md

Lines changed: 71 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,96 @@
11
# spawn
2+
A Java framework for programmatically launching and controlling processes, JVMs, and Docker containers.
23

3-
build.spawn: A framework to programmatically launch and control processes, applications, services and containers
4+
[![CI](https://github.com/Workday/spawn.build/actions/workflows/main-pull-request.yml/badge.svg)](https://github.com/Workday/spawn.build/actions/workflows/main-pull-request.yml)
5+
[![Maven Central](https://img.shields.io/maven-central/v/build.spawn/spawn-application)](https://central.sonatype.com/artifact/build.spawn/spawn-application)
6+
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](LICENSE)
47

5-
When using this framework to launch Docker containers, the following JVM command-line argument must be added
6-
(with Java 25+):
8+
## Overview
79

8-
```bash
9-
--enable-native-access=ALL-UNNAMED
10+
`spawn` provides a unified abstraction over local processes, JVMs, and Docker containers. Define a
11+
`Specification`, call `platform.launch(spec)`, and get back an `Application` with
12+
`CompletableFuture`-based lifecycle hooks — regardless of the underlying execution environment.
13+
14+
## Modules
15+
16+
| Module | Purpose |
17+
|--------|---------|
18+
| `spawn-option` | Shared option types |
19+
| `spawn-application` | Core abstractions: Platform, Application, Process, Specification, Customizer |
20+
| `spawn-application-composition` | Multi-application topology management |
21+
| `spawn-jdk` | JDK launch abstractions and SpawnAgent for two-way JVM communication |
22+
| `spawn-local-platform` | Local OS process launcher (`LocalMachine`) |
23+
| `spawn-local-jdk` | JDK detection and `LocalJDKLauncher` |
24+
| `spawn-docker` | Docker Engine API interfaces |
25+
| `spawn-docker-jdk` | JDK HTTP Client-based Docker implementation |
26+
27+
## Requirements
28+
29+
- Java 25+
30+
- Maven (wrapper included — no separate install needed)
31+
- Docker (only required for `spawn-docker` / `spawn-docker-jdk` modules)
32+
33+
## Using this Library
34+
35+
Add individual modules as dependencies. All modules share the same version:
36+
37+
```xml
38+
<dependency>
39+
<groupId>build.spawn</groupId>
40+
<artifactId>spawn-application</artifactId>
41+
<version>VERSION</version>
42+
</dependency>
1043
```
1144

12-
On MacOS (and linux), local machine access to the Docker Engine may be restricted to prevent read and write access to
13-
the docker.socket. To ensure access to the Docker Engine, the permissions for the following files may need to be
14-
increase.
45+
Replace `VERSION` with the latest version shown in the Maven Central badge above.
46+
47+
When using the Docker modules, add the following JVM flag (Java 25+):
1548

1649
```
17-
sudo chmod 660 ~/Library/Containers/com.docker.docker/Data/docker.raw.sock
50+
--enable-native-access=ALL-UNNAMED
1851
```
1952

20-
and
53+
On macOS and Linux, access to the Docker socket may require a permissions adjustment:
2154

22-
```
55+
```bash
56+
sudo chmod 660 ~/Library/Containers/com.docker.docker/Data/docker.raw.sock
2357
sudo chmod 660 /var/run/docker.sock
2458
```
2559

26-
It's also possible that the symbolic link to `/var/run/docker.sock` may need to be recreated.
60+
If `/var/run/docker.sock` is missing, recreate the symlink:
2761

28-
```
62+
```bash
2963
sudo ln -s ~/Library/Containers/com.docker.docker/Data/docker.raw.sock /var/run/docker.sock
3064
```
3165

32-
## Running Tests
66+
## Building from Source
3367

34-
The Docker integration tests (`SessionTests`) require several images to be present in the local Docker cache before running.
68+
```bash
69+
./mvnw clean install
70+
```
3571

36-
Pre-pull them once using:
72+
To build a custom version:
73+
74+
```bash
75+
./mvnw -Drevision=x.y.z-SNAPSHOT-my-name clean install
76+
```
77+
78+
### Running Tests
79+
80+
Docker integration tests require several images to be present in the local cache. Pre-pull them once before running:
3781

3882
```bash
3983
docker pull alpine:latest && docker pull rabbitmq:latest && docker pull nginx:latest
4084
```
4185

42-
Without this step, the test setup (`@BeforeAll`) will attempt to pull these images on demand, which blocks the tests
43-
for several minutes and may fail due to transient registry (timeout) errors.
86+
## Contributing
87+
88+
Code style is enforced by Checkstyle: no tabs, no star imports, final locals and parameters, braces
89+
required on all blocks, no `assert` statements. Import order: third-party, standard Java, then
90+
static. IntelliJ configuration is at `config/intellij/CodeStyle.xml`.
91+
92+
Commit messages follow [Conventional Commits](https://www.conventionalcommits.org/).
93+
94+
## License
95+
96+
Apache 2.0 — see [LICENSE](LICENSE)

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ This is a Workday sponsored project hosted on GitHub.
1515

1616
To report a security vulnerability, please **do not** open a public GitHub issue. Instead:
1717

18-
1. Navigate to the [Security Advisories](https://https://github.com/workday/spawn.build/security/advisories) page for
18+
1. Navigate to the [Security Advisories](https://github.com/workday/spawn.build/security/advisories) page for
1919
this repository and click **Report a vulnerability**.
2020

2121
2. Alternatively, contact the project maintainers directly by emailing the developers.

docs/CODEBASE_MAP.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ Server (listens on spawn:// URI)
372372

373373
## Conventions
374374

375-
### Brian Oliver Java Style
375+
### Code Style
376376
- No tabs (spaces only), enforced by Checkstyle
377377
- No star imports
378378
- Final locals where possible

0 commit comments

Comments
 (0)