https://github.com/jbangdev/jbang-maven-plugin
Maven Plugin for running and downloading jbang
https://github.com/jbangdev/jbang-maven-plugin
Last synced: 11 months ago
JSON representation
Maven Plugin for running and downloading jbang
- Host: GitHub
- URL: https://github.com/jbangdev/jbang-maven-plugin
- Owner: jbangdev
- License: mit
- Created: 2020-09-17T18:03:12.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2025-03-26T13:43:41.000Z (12 months ago)
- Last Synced: 2025-04-19T12:09:43.692Z (11 months ago)
- Language: Java
- Size: 81.1 KB
- Stars: 16
- Watchers: 2
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## JBang Maven Plugin

[](https://search.maven.org/search?q=g:%22dev.jbang%22%20AND%20a:%22jbang-maven-plugin%22)
The JBang Maven plugin allows JBang scripts to be executed during a Maven build, or through `mvn` command-line (without pom file).
The plugin attempts to use an existing JBang installation. If no JBang installation is found, the plugin will install JBang by downloading and caching the latest version binaries (by default in your Maven project directory) for subsequent runs.
### Arguments
- `script`: The script to be executed by JBang
#### Example
From inside a Maven buid:
```xml
dev.jbang
jbang-maven-plugin
0.0.7
run
process-resources
run
hello.java
```
Or with command-line `$ mvn dev.jbang:jbang-maven-plugin:0.0.8:run -Djbang.script="helloworld/helloworld.java"`.
- `args` : The arguments to be used in the JBang script (if any)
#### Example
```xml
dev.jbang
jbang-maven-plugin
0.0.7
run
process-resources
run
hello.java
--option1=foo
```
- `trusts`: If the script resides in a remote location, this parameter specifies what URLs should be trusted. See [URLs from Trusted Sources](https://github.com/jbangdev/jbang#urls-from-trusted-sources) for more information
#### Example
```xml
dev.jbang
jbang-maven-plugin
0.0.7
run
process-resources
run
https://github.com/jbangdev/jbang-examples/blob/master/examples/lang.java
https://github.com
```
- `jbangargs`: Arguments for `jbang` (not the script)
#### Example
```xml
dev.jbang
jbang-maven-plugin
0.0.7
run
process-resources
run
--quiet
hello.java
```
- `jbangVersion`: If your envronment lacks the JBang binaries in the PATH, you can specify the JBang version to be installed. If not specified, the plugin will resolve to the latest JBang release available
#### Example
```xml
dev.jbang
jbang-maven-plugin
0.0.7
run
process-resources
run
hello.java
0.47.1
```
- `jbangInstallDir`: Alternative location of JBang installation. The default value is `${project.basedir}`
#### Example
```xml
dev.jbang
jbang-maven-plugin
0.0.7
run
process-resources
run
hello.java
${project.build.directory}
```
### Reporting bugs/issues/features
Please use https://github.com/jbangdev/jbang for reporting bugs/issues/features.
### Releasing
To release a new version of the plugin, run the following command:
```shell
mvn versions:set -DnewVersion=0.0.Z
git commit -a -m "release 0.0.Z"
git tag -a 0.0.Z -m "release 0.0.Z"
git push
```
When completed correctly, the new version will be available in Maven Central within some time (usually less than 30 minutes).
To prepare for the next development iteration, run the following command:
```shell```
mvn versions:set -DnewVersion=0.0.Z+1-SNAPSHOT
git commit -a -m "prepare for next development iteration"
git push
```