Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 8 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,16 @@ permissions:
on:
push:
branches: [ "main" ]
paths-ignore:
- "frontend/**"
- ".github/workflows/node.js.yml"
- ".github/workflows/npm-publish-packages.yml"
pull_request:
branches: [ "main" ]
paths-ignore:
- "frontend/**"
- ".github/workflows/node.js.yml"
- ".github/workflows/npm-publish-packages.yml"

jobs:
build:
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,16 @@ permissions:
on:
push:
branches: [ "main" ]
paths:
- "frontend/**"
- ".github/workflows/node.js.yml"
- ".github/workflows/npm-publish-packages.yml"
pull_request:
branches: [ "main" ]
paths:
- "frontend/**"
- ".github/workflows/node.js.yml"
- ".github/workflows/npm-publish-packages.yml"

jobs:
build:
Expand Down
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,11 +238,16 @@ aws sts get-session-token
![ui-config-screenshot](screen-grabs/local-ui-proxy.png)

## Run after project checkout (JDK 25 & Maven 4 required)
### Build frontend & server side, along with Java Code Coverage report.
### Build server side (backend only), along with Java Code Coverage report.
```shell
./mvnw clean package -U
```
Comment on lines +241 to 244

### Optional: bundle frontend into backend artifact (legacy single-repo flow)
```shell
./mvnw clean package -U -DbundleFrontend=true
```

#### View Java Code Coverage reports in Browser or Preview tab in IDE.
##### Path to reports is `target/site/jacoco/index.html`

Expand All @@ -266,6 +271,12 @@ npm run test

npm run test:coverage
```

## Frontend/backend split (spike output)
- Backend CI (`maven.yml`) now ignores frontend-only changes.
- Frontend CI (`node.js.yml`) now runs only for frontend/workflow changes.
- Backend Maven builds are backend-only by default; frontend bundling is opt-in via `-DbundleFrontend=true`.
- Recommended deployment coordination: publish backend and frontend with the same semantic version and promote both only after compatibility checks.
##### See the output below to verify the frontend test suite results.
![react-tests](screen-grabs/react-tests.png)

Expand Down
138 changes: 77 additions & 61 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -449,67 +449,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.5.0</version>
<executions>
<execution>
<id>copy-resources</id>
<phase>process-classes</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/target/classes/static</outputDirectory>
<resources>
<resource>
<directory>${basedir}/frontend/build</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>${frontend-maven-plugin.version}</version>
<configuration>
<workingDirectory>frontend</workingDirectory>
<installDirectory>target</installDirectory>
</configuration>
<executions>
<execution>
<id>install node and npm</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
<configuration>
<nodeVersion>${node.version}</nodeVersion>
<npmVersion>${npm.version}</npmVersion>
</configuration>
</execution>
<execution>
<id>npm install</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>install</arguments>
</configuration>
</execution>
<execution>
<id>npm run build</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>run build</arguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
Expand All @@ -536,4 +475,81 @@
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>bundle-frontend</id>
<activation>
<property>
<name>bundleFrontend</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.5.0</version>
<executions>
<execution>
<id>copy-resources</id>
<phase>process-classes</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/target/classes/static</outputDirectory>
<resources>
<resource>
<directory>${basedir}/frontend/build</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>${frontend-maven-plugin.version}</version>
<configuration>
<workingDirectory>frontend</workingDirectory>
<installDirectory>target</installDirectory>
</configuration>
<executions>
<execution>
<id>install node and npm</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
<configuration>
<nodeVersion>${node.version}</nodeVersion>
<npmVersion>${npm.version}</npmVersion>
</configuration>
</execution>
<execution>
<id>npm install</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>install</arguments>
</configuration>
</execution>
<execution>
<id>npm run build</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>run build</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
Loading