Into this repository are contained all sources for the JOD agent from the John O.S. Project
Artifact Name: jospJOD |
README | SPECS | IMPLS | CHANGELOG | TODOs | LICENCE
The JOSP Object Daemon is a simple daemon that provide a JOSP Object. When it is running, you can interact with it using a JSL Service or the JSL Shell itself.
NB: This repository, by default, executes the JOD with his interactive
shell as a foreground cmdline application. To change this behaviour, please set
the property isDaemon
to true
into gradle/artifacts.gradle
file.
This is a Java application and this repository use the Gradle build system. So you can run this app directly from the Gradle wrapper included into the sources.
Remember that you'll need Java installed on your machine.
$ ./gradlew run // for Linux/Mac
$ gradlew.bat run // for Windows
The run task will compile, assemble and run the JOD agent using the
envs/runnables/jod
folder as working dir. In this directory you'll find all
configs and log files used/generated by the JOD instance.
Next time, you'll execute the run
task, it will use the same files so any
changes against multiple execution will not be deleted.
To reset the JOD instance, remove his working dir.
It is possible also customize which file will be copied into the working dir.
Simply open the gradle/artifacts.gradle
files and edit the properties before
the run
task definition. More info on Build System > Run and clean
tasks section.
The JOD agent takes only one optional args from the command line: --configs
.
This arg allow defines another path for the configs/jod.yml
config file.
More details on Specs/CmdLine page.
The JOD agent use the following configuration files. All files must be relative to the JOD execution dir.
File | Specs | Description |
---|---|---|
configs/jod.yml |
Specs/jod.yml |
Main JOD agent config file. It's a YAML file that contains all configuration used by the agent: from the object's id to the workers' types. |
configs/struct.jod |
Specs/Structure | A JSON file that contains only the object's structure. |
configs/perms.jod |
Specs/Permissions | A ; -separated file that contains pairs key-values. It defines which permission must be applied to the object. It's not mandatory, and it can be managed entirely by the JOD Agent. By default, the JOD agent create a permissions file with right object's id that allows connections from any service via local communication. |
configs/log4j2.xml |
Specs/Logs | XML file containing Log4J2 configurations. |
Checkout the configs file examples on the Resources > Configs files section.
This project is based on Gradle build system and then include his X.X.X wrapper. It is possible execute the build system simply with the command:
PROJ_DIR$ ./gradlew # on Linux
PROJ_DIR$ ./gradlew.bat # on Windows
This project follow the JOSP Project convention starting from version 2.2.4.
That means the project configs are available in to the gradle/josp_project.gradle
file. In this file are defined all properties used along other Gradle scripts.
Others Gradle files help to keep consistency across all JOSP Project repositories.
gradle.build
: main Gradle filegradle/josp_definitions.gradle
: define JOSP versions and project modesgradle/josp_project.gradle
: define current project/repositorygradle/josp_versions.gradle
: define versions for current project and his dependenciesgradle/publications_repo.gradle
: add current project's publication urls as build system repositoriesgradle/artifacts.gradle
: project's artifacts' definitions from their sourceSets until their publicationsgradle/tests.gradle
: define project's tests (sourceSets and dependencies)gradle/publications.gradle
: configure the remote publications including archives signature (if private access enabled)gradle/wrapper.gradle
: add a "create wrapper" task
-
./gradlew run
Execute the JOD application with his shell as a foreground cmdline application. It can be customized editing thegradle/artifacts.gradle
file. -
./gradlew clean
Clean the project dir.
jar
: compile and assemble artifact's sources and resources.jarDeps
: collect all artifact's dependencies.jarDocs
: collect and compress all artifact's JavaDocsjarSrc
: collect and compress all artifact's source filesjavadoc
: (documentation) generate all artifact's JavaDocs
NB: All those jar
tasks' outputs will be included into the main project publication.
publishToMavenLocal
Copies all defined publications to the local Maven cache, including their metadata (POM files, etc.).publish
An aggregate task that publishes all defined publications to all defined repositories. It does not include copying publications to the local Maven cache.publishJospJODToMavenLocal
Copies the main project's publication to the local Maven cache along with the publication’s POM file and other metadata.publishJospJODToMavenRepository
Publishes the main project's publication to the repository named "Maven".
Local Maven cache, typically is placed into $HOME/.m2/repository
.
On other hands, the "Maven" repository is configured to upload artifacts to the
Nexus/Sonatype public repository. More info on
this repo at Resources > Publication repo section.
test
: run all test contained into thesrc/test/java
folder using the JUnit/Jupiter framework.
This repository include several configuration files as examples and for testing
purposes. Depending on the config file you can find examples into src/main/configs
.
dir.
This repo as part of the John OS Project, get
most of his dependencies from other JOSP packages. Those dependencies are
defined into the gradle/artifacts.gradle
file and their versions are defined
into the gradle/josp_versions.gradle
file.
- JOSP Commons
- JOSP APIs
The other, external, dependencies are also listed in the same files.
Artifact's remote publications allow publishing JOSP components to remote
repository and make them public available. Because of that artifact's remote
publications are available only if enablePrivate
config is true
.
All artifacts will be published with the base group com.robypomper.josp
.
Java JOSP components are published on the maven repository sonatype.org
where the com.robypomper
was registered with
OSSRH-45810
issue request. That means, specific Nexus/Sonatype's user and password are
required to publish JOSP components, those credentials must be stored in the
$USER_HOME/.gradle/gradle.properties
file.
Here an example of the gradle.properties
file, where sonatypeXY
props are
referred to the publication repo credentials; and the signing.XY
props to the
local signing key.
sonatypeUser={jira_username}
sonatypePassword={jira_password}
signing.keyId={last 8-digit of the GPG key}
signing.password={passphrase of the GPG key}
signing.secretKeyRingFile={file containing the GPG key}
Nexus/Sonatype's references:
- Nexus/Sonatype portal
- Staged artifacts
- Getting started
- GPG Keys
- Gradle configs (old gradle plugin 'maven')
- Confirm release
This repository was based on the version 2.2.3
.
Older version of JOSP source code:
Previous versions are hosted on com.robypomper.josp Git repository.
The JOD agent contained in the current repository is distributed using the GPLv3 licence.
Any kind of collaboration is welcome! This is an Open Source project, so we are happy to share our experience with other developers, makers and users. Bug reporting, extension development, documentation and guides etc... are activities where anybody can help to improve this project.
One of the John O.S. Project’s goals is to release more John Objects Utils & Apps to allow connecting even more connected objects from other standards and protocols. Checkout the Utils & Apps extensions list and start collaborating with a development team or create your own extension.
At the same time we are always looking for new use cases and demos. So, whether you have just an idea or are already implementing your IoT solution, don't hesitate to contact us. We will be happy to discuss with you about technical decisions and help build your solution with John’s component.
Please email tech@johnosproject.com.