Skip to content

Commit

Permalink
Adds Lite building from source instructions, early access builds, etc.
Browse files Browse the repository at this point in the history
  • Loading branch information
simonbrowndotje committed Nov 24, 2024
1 parent 9c197a7 commit 0f99d80
Show file tree
Hide file tree
Showing 6 changed files with 96 additions and 24 deletions.
29 changes: 29 additions & 0 deletions java/building.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
layout: default
title: Building from source
parent: Structurizr for Java
nav_order: 70
permalink: /java/building
---

# Building from source

To build from the sources (you'll need git and Java 17+ installed):

```
git clone https://github.com/structurizr/java.git structurizr-java
cd structurizr-java
./gradlew
```

This will create a number of `.jar` files. For example:

- `structurizr-client/build/libs/structurizr-client-{version}.jar`
- `structurizr-core/build/libs/structurizr-core-{version}.jar`
- etc

You can publish these `.jar` files to your local Maven repository with the following command:

```
./gradlew clean build publishToMavenLocal
```
22 changes: 0 additions & 22 deletions java/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,6 @@ permalink: /java/faq

# Frequently asked questions

## How do I build from source?

To build from the sources (you'll need git and Java 17+ installed):

```
git clone https://github.com/structurizr/java.git structurizr-java
cd structurizr-java
./gradlew
```

This will create a number of `.jar` files. For example:

- structurizr-client/build/libs/structurizr-client-{version}.jar
- structurizr-core/build/libs/structurizr-core-{version}.jar
- etc

You can publish these `.jar` files to your local Maven repository with the following command:

```
./gradlew clean build publishToMavenLocal
```

## Why is there no way to remove elements/relationships from the model?

The Structurizr for Java library is designed to be append-only, and removing elements is non-trivial.
Expand Down
51 changes: 51 additions & 0 deletions lite/70-building.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
layout: default
title: Building from source
parent: Structurizr Lite
nav_order: 70
permalink: /lite/building
---

# Building from source

Part of the UI is shared between the on-premises installation, cloud service, and Structurizr Lite
so you will need to additionally clone the [structurizr/ui](https://github.com/structurizr/ui) repo.

## Build

```
git clone https://github.com/structurizr/lite.git structurizr-lite
git clone https://github.com/structurizr/ui.git structurizr-ui
cd structurizr-lite
./ui.sh
./gradlew clean build
```

If successful, you will see a file named `structurizr-lite.war` in `structurizr-onpremises/build/libs`.

If you see an error message of the form `Could not find com.structurizr:structurizr-dsl:x.y.z`, you will need to
[build the Structurizr for Java repo from source, and publish to your local Maven repository](/java/building).

## Run

To run Structurizr Lite, you can then use:

```
java -jar build/libs/structurizr-lite.war /path/to/workspace
```

(replace `/path/to/workspace` with the path to the folder where your `workspace.dsl` file is)

## Docker

To build a Docker image:

```
docker build . -t mytag
```

And to start a Docker container from this image (replace `/path/to/dataDirectory`):

```
docker run -it --rm -p 8080:8080 -v /path/to/dataDirectory:/usr/local/structurizr mytag
```
14 changes: 14 additions & 0 deletions lite/71-early-access.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
layout: default
title: Early access features
parent: Structurizr Lite
nav_order: 71
permalink: /lite/early-access
---

# Early access features

You have two options to gain early access to new/in-progress features:

1. Build from source - follow the instructions at [Building from source](/lite/building).
2. Use the pre-built early access builds that are available via the [Structurizr Patreon](https://patreon.com/structurizr).
2 changes: 1 addition & 1 deletion lite/05-faq.md → lite/80-faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: default
title: FAQ
parent: Structurizr Lite
nav_order: 5
nav_order: 80
permalink: /lite/faq
---

Expand Down
2 changes: 1 addition & 1 deletion lite/06-troubleshooting.md → lite/81-troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: default
title: Troubleshooting
parent: Structurizr Lite
nav_order: 6
nav_order: 81
permalink: /lite/troubleshooting
---

Expand Down

0 comments on commit 0f99d80

Please sign in to comment.