0

I am setting up an environment for Overledger in Java. How to install the Overledger SDK as a maven dependency. In documentation, only this information is given: Source: Documentation

I have never installed SDK in Java using maven, so it would be great if you'd explain me from scratch.

Himanshu Suthar
  • 437
  • 2
  • 9
  • 22
  • 1
    do you know what a maven dependency is/does? all you need to do is run a build/install and the dependencies are downloaded and made available for your project – Stultuske Apr 02 '19 at 09:01
  • Possible duplicate of [Maven: Command to update repository after adding dependency to POM](https://stackoverflow.com/questions/8563960/maven-command-to-update-repository-after-adding-dependency-to-pom) – Ondra K. Apr 02 '19 at 09:01
  • 1. Open the POM.xml file for your project 2. Add your desired dependency, inside the tag which is already present there 3. Right click on the project >> Maven >> Update Project. This will download all the dependencies. You can validate the same by checking the Maven Dependencies section got created for the project. – VSB Apr 02 '19 at 09:04

2 Answers2

3

The documentation should read "Developers have to declare ..." instead of "Developers have to install ...".

See Maven POM Reference, Dependencies for how to declare the dependency in your project's POM (i.e. pom.xml):

<project ...>

  ...

  <dependencies>

    ...

    <dependency>
      <groupId>network.quant</groupId>
      <artifactId>overledger-sdk-bundle</artifactId>
      <version>1.0.0-alpha.2</version>
    </dependency>

    ...

  </dependencies>

  ...

<project>

At the next Maven build (or project update in your IDE) it will be downloaded from the Maven Central repository to your local repository (located in ~/.m2/repository by default). From then on the dependency's classes can be used in your project's code.

Gerold Broser
  • 14,080
  • 5
  • 48
  • 107
-2

Add the provided Maven dependency to your pom.xml in your Maven project.

<project xmlns="http://maven.apache.org/POM/4.0.0"
    ...>

    ...

    <build>
        ...
    </build>

    <dependencies>

        ...

        <dependency>
            <groupId>network.quant</groupId>
            <artifactId>overledger-sdk-bundle</artifactId>
            <version>1.0.0-alpha.2</version>
        </dependency>

        ...

    </dependencies>
</project>

more Maven Getting Started: https://maven.apache.org/guides/getting-started/

MOTIVECODEX
  • 2,624
  • 14
  • 43
  • 78