How to install and use openEHR libraries with maven
I need to use these libraries https://github.com/openEHR/java-libs with netbeans and the installation guide says:
REQUIREMENTS:
Java 1.6 or higher
Maven 3.0.4 or higher
INSTALATION INSTRUCTIONS:
INSTALLATION:
java-libs/mvn clean install
I am Java compliant and my NetBeans is bundled with Maven 3.0.5, but I cannot find a way to install and use the libraries in a Java project, can anyone help me?
+3
source to share
1 answer
These instructions are for installing the java-libs artifact into your local maven artifact repository, so your project can be referenced by your project.
Installation
- Actually you first need to clone the java-libs repo to your machine.
- Then run
mvn clean install
inside the new directory created by the cloned repo.
Using
After installing the artifact, you can use it in your project by adding a dependency to the project pom.xml file:
<dependency>
<groupId>openehr</groupId>
<artifactId>ref_impl_java</artifactId>
<version>1.0.11-SNAPSHOT</version>
<dependency>
How can I find out the parameters above? Looking file java-libs' the pom.xml .
EDIT: As @Jack pointed out, one needs to reference the specific library needed as a dependency, e.g .:
<dependency>
<groupId>openehr</groupId>
<artifactId>archetype-validator</artifactId>
<version>1.0.11-SNAPSHOT</version>
<dependency>
+2
source to share