Skip to content

Commit

Permalink
build(deps): Make JBang script actually use Enola's brand new shiny M…
Browse files Browse the repository at this point in the history
…aven repo distro
  • Loading branch information
vorburger committed Feb 7, 2025
1 parent 79a07ef commit 4e38518
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
13 changes: 5 additions & 8 deletions docs/dev/jbang.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,17 @@

# JBang

Java developers (not end-users) can use Enola via [JBang](https://www.jbang.dev/).
Java developers (not end-users) can also use Enola via [JBang](https://www.jbang.dev/).

[`learn/jbang`](https://github.com/enola-dev/enola/tree/main/learn/jbang)
has an example project illustrating how this works; clone and go there, and then:

1. `tools/maven/install.bash`
1. `cd learn/jbang`
1. `./jbang hello.java` will run an example using Enola
1. `./jbang edit --sandbox --open=code hello.java` opens an IDE

<!-- TODO Improve JBang integration:
1. Build Enola on JitPack, and remove the need for step #1.
2. Move `learn/jbang` out into a separate Git repo?
(But then how to test it in CI?
A Monorepo is very nice for that.
Perhaps just write a script to automagically extract (copy) it into a small repo?
<!-- TODO Move `learn/jbang` out into a separate Git repo?
(But then how to test it in CI? A Monorepo is very nice for that.
Perhaps just write a script to automagically extract (copy) it into a small repo?)
-->
1 change: 1 addition & 0 deletions docs/dev/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ If you do still want to try, here's how to manually install what the development

sudo apt update
sudo apt install golang-go
go install github.com/bazelbuild/bazelisk@latest

You should now be able to proceed as above (but without requiring _Docker)._

Expand Down
6 changes: 5 additions & 1 deletion java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<!-- This POM is currently not actually used to build this project (which uses Bazel as build tool).
This is really only here to get version bumps from Dependabot & Renovate bots (because that's "convenient").
The published POM of this project is entirely generated by Bazel, from its deps, NOT this file. -->

<groupId>dev.enola</groupId>
<artifactId>enola</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>0.0.0-SNAPSHOT</version>
<packaging>jar</packaging>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion learn/jbang/hello.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
//JAVA 21+
//PREVIEW
//DEPS dev.enola:enola:0.0.1-SNAPSHOT
//REPOS mavencentral,jitpack
//REPOS enola=https://docs.enola.dev/maven-repo/,mavencentral,jitpack

import static java.lang.System.out;

Expand Down

0 comments on commit 4e38518

Please sign in to comment.