-
Notifications
You must be signed in to change notification settings - Fork 3
Installation
It is possible to download the JACIS jar files directly from the maven repository page (see below). However the easiest way to use JACIS is to use e.g. gradle or another build tool that can manage maven repositories. For JACIS the maven repository included in the GitHub packages is used. The URL of a this maven repository containing all JACIS releases is: https://maven.pkg.github.com/janwiemer/jacis
The gradle syntax for the maven coordinates is:
dependencies {
implementation group: 'org.jacis', name: 'jacis', version: '2.0.0-SNAPSHOT'
}A complete sample gradle build file may look like:
plugins {
id 'java'
id 'maven-publish'
}
group = 'org.jacisexampleproject'
version = '2.0.0'
ext {
projectName = "JacisExampleProject"
projectDescription = "Example Project using JACIS."
projectURL = "https://github.com/JanWiemer/jacisexampleproject"
author = "Jan Wiemer"
authorId = "JanWiemer"
authorPwd = System.properties.get("githubPAT") // read access token for GitHub package access.
jacisMavenUrl = "https://maven.pkg.github.com/janwiemer/jacis"
}
dependencies {
implementation group: 'org.jacis', name: 'jacis', version: '2.0.0-SNAPSHOT'
}
repositories {
mavenLocal()
mavenCentral()
maven {
credentials {
username authorId
password authorPwd
}
url jacisMavenUrl
}
}Note that the maven repository at gitHub can only be accesses using a security token (system property "githubPAT" above). Since it is anyway possible to download the artifacts it is safe to publish this security token here: "githubPAT=654f72dbc23aaeb0606c5fbff98c0a6e1406a506". If you are using the gradle file from above you have to pass this token as a JVM argument (starting with "-D") to gradle. If you use the Eclipse buildship plugin you can add this to the gradle preferences page under JVM Arguments (add entry "-DgithubPAT=654f72dbc23aaeb0606c5fbff98c0a6e1406a506").
A little example project based on gradle using JACIS can be found here: https://github.com/JanWiemer/jacisexampleprj
The maven coordinates (repository: https://maven.pkg.github.com/janwiemer/jacis) for a release look like:
<dependency>
<groupId>org.jacis</groupId>
<artifactId>jacis</artifactId>
<version>2.0.0</version>
</dependency>A maven settings file providing access to the repository could look like:
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<activeProfiles>
<activeProfile>github</activeProfile>
</activeProfiles>
<profiles>
<profile>
<id>github</id>
<repositories>
<repository>
<id>github</id>
<name>JanWiemer</name>
<url>https://maven.pkg.github.com/JanWiemer/jacis</url>
</repository>
</repositories>
</profile>
</profiles>
<servers>
<server>
<id>github</id>
<username>JanWiemer</username>
<password>654f72dbc23aaeb0606c5fbff98c0a6e1406a506</password>
</server>
</servers>
</settings>A little example project based on gradle using JACIS can be found here: https://github.com/JanWiemer/jacis-bank-demo
Next Chapter: Getting Started