# Gecko Runtime
**THIS PROJECT IS DEPRECATED AND NOT USED ANYMORE**
A current version can be found here:
https://github.com/geckoprojects-org/org.gecko.utils
The artifacts are available under:
https://repo1.maven.org/maven2/org/geckoprojects/utils/
## Components
- API
- Boot
- Config
- Resources
- Gecko Project Templates
- Gecko Exporter
The Maven Repository is currently available under:
https://devel.data-in-motion.biz/nexus/repository/dim-release/
A *bndtools* repository configuration can look like this:
```
-plugin.10.gecko: \
aQute.bnd.repository.maven.provider.MavenBndRepository;\
releaseUrl=https://devel.data-in-motion.biz/nexus/repository/dim-release/; \
index=${.}/gecko.maven; \
readOnly=true; \
name='Gecko.io'
```
The GAV coordinates are:
```
org.gecko.runtime
org.gecko.runtime.bnd
1.0.15
org.gecko.runtime
org.gecko.templates
1.0.28
org.gecko.runtime
org.gecko.runtime.api
1.0.0
org.gecko.runtime
org.gecko.runtime.boot
1.1.4
org.gecko.runtime
org.gecko.runtime.resources
1.0.4
org.gecko.runtime
org.gecko.runtime.config
1.0.6
```
## Gecko Runtime API
This bundle contains all interfaces, annotations and other stuff, that is useful for using the gecko runtime.
```
org.gecko.runtime
org.gecko.runtime.api
1.0.0
```
## Gecko Runtime Boot
This component registers three major paths, given as system properties or environment variables as service. The service class is java.net.URL. All properties are defined in GeckoBootConstants.
These properties are:
- gecko.base.dir - The Gecko Runtime base directory, usually, the folder where the gecko runtime runs from. It defaults to *user.home/.gecko*
- gecko.conf.dir - The Gecko Runtime configuration folder. It defaults to *gecko.base.dir/etc*
- gecko.data.dir - THe Gecko Runtime data directory. It defaults to *gecko.base.dir/data*
The services are marked with properties like *gecko.base.dir=true*. This is for all 3 properties.
The capability is namespace: **gecko.addons**, name: **runtime**
```
org.gecko.runtime
org.gecko.runtime.boot
1.1.4
```
## Gecko Runtime Config
This component contains a file watcher for all files in the gecko.conf.dir. These files are registered as File service too. Beside that all
changes are watched and the service registration is updated. The constants are available in the GeckoConfigurationConstants.
The services that are made out of the files are marked as *gecko.configuration.file=true*. They also contain the file name properties *gecko.configuration.fileName=* and a
property for the last-change timestamp: *gecko.configuration.timestamp*.
Currently all files with file-extensions:
- *.config
- *.properties
- *.conf
The capability is namespace: **gecko.addons**, name: **configuration**
```
org.gecko.runtime
org.gecko.runtime.config
1.0.6
```
## Gecko Runtime Resource
The resources component is a configurable component, to register file locations in the systems. This component uses the Configurator or ConfigurationAdmin.
The configuration PID is *ResourcesConfiguration*. The configuration properties are
- *gecko.resource.name* - The name of the resource
- *gecko.resource.path* - the file path for this resource
As a result a GeckoResourceProvider will be registered. This service provides the resource name, URI and file.
It is also possible to link a resource to the runtimes data directory just putting *gecko.data.dir* as first part of the resource path, like this: *gecko.resource.path=gecko.data.dir/test*
The files or folders won't be created. So each consumer is responsible for doing that.
The capability is namespace: **gecko.addons**, name: **resources**
```
org.gecko.runtime
org.gecko.runtime.resources
1.0.4
```
## Gecko Project Templates
This project provides *bndtools* project templates
The bndtools project templates come from:
https://gitlab.com/gecko.io/geckoRuntime/-/tree/master/org.gecko.templates
```
org.gecko.runtime
org.gecko.templates
1.0.28
```
## Gecko Exporter
Gecko exporter is a small toolset to create a configurable environment to run OSGi applications natively or using docker. Using the corresponding **bndtools** project template, increases the ramp-up time for an application.
The *Gecko Exporter* reshapes an OSGi application into zip file that can be extracted and run. We also re-use this shape for the docker image build.
*Bndtools* create as default a monolithic jar file or a corresponding deflated folder. The *Gecko Exporter* extends this a little bit. You end up with a folder like this:
- /bin/gecko.conf - Configuration to add some JVM fine tuning and additional Java properties
- /bin/gecko.sh - Run this script to run your application
- /lib/launch.jar - THe monolithic jar from the default *bnd* exporter
- /docker/Dockerfile
- /etc/ - Folder to place configuration files
- /logs/ - Folder where log files can end up
- /data/ - A data location
When additionally using **org.gecko.runtime.boot** all the location for *data*, *etc* and the installation dir are also published as an OSGi service in form of a *java.net.URL*
```
org.gecko.runtime
org.gecko.runtime.bnd
1.0.15
```
There are templates for the exporter. Or follow our Gecko Exporter tutorial [here](docs/Gecko_Exporter.md)