You can download the latest distribution version from here. This needs Java 13 to run. After downloading it, you can symlink it to your /bin
directory to be always accessible:
For example on macOS run following to link:
$ sudo ln -s /path/to/distribution/of/jstatic/bin/jstatic /usr/local/bin/jstatic
This is right now out of the scope of this guide due to its complexity and variety for different systems.
We publish following images:
registry.gitlab.com/mohamnag/jstatic:0.4.0-the-branch-name-SNAPSHOT
)registry.gitlab.com/mohamnag/jstatic:78b6426bc7bd6bbde13ac563114bdfbab8e16cc8
)mohamnag/jstatic:0.4.0
)mohamnag/jstatic:78b6426bc7bd6bbde13ac563114bdfbab8e16cc8
)mohamnag/jstatic:latest
)Whereas:
Decide based on your use case, which tag and from where you want to consume.
To use the docker image you should:
/jstatic/home/
. This shall contain:
config.yaml
file. See default config for possible valuesconfig.yaml
Assuming using the latest release image and having your project files in current directory, the command would look like:
$ docker run -v $(pwd):/wrk -w /wrk mohamnag/jstatic
You can pass in any parameter that you would pass to CLI by appending it to above. For example to start watch mode:
$ docker run -v $(pwd):/wrk -w /wrk mohamnag/jstatic --watch
No surprise that you can include and use this library as a Java library too. Use coordinates in following sections to install the dependency.
Releases are published to maven central.
in Gradle:
repositories {
mavenCentral()
}
dependencies {
implementation 'com.mohamnag:jstatic:X.Y.Z'
}
in Maven:
<dependency>
<groupId>com.mohamnag</groupId>
<artifactId>jstatic</artifactId>
<version>X.Y.Z</version>
</dependency>
Snapshots are published to OSS Sonatype snapshot repository.
in Gradle:
repositories {
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
}
dependencies {
implementation 'com.mohamnag:jstatic:X.Y.Z'
}
in Maven (you need to add https://oss.sonatype.org/content/repositories/snapshots
as repository in your maven settings):
<dependency>
<groupId>com.mohamnag</groupId>
<artifactId>jstatic</artifactId>
<version>X.Y.Z</version>
</dependency>
Replace
X.Y.Z
with desired version.
You can use JStatic as a Gradle task to achieve a number of goals:
As the setup and usage are in this case more complicated, refer to its own dedicated page to find more and see the sample setup how JStatic has been used to generate POJOs from OpenAPI spec.