Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/heremaps/here-artifact-maven-wagon

The HERE platform Maven Wagon plugin provides Java and Scala developers with access to platform artifacts via Maven
https://github.com/heremaps/here-artifact-maven-wagon

here-workspace java maven wagon

Last synced: 3 months ago
JSON representation

The HERE platform Maven Wagon plugin provides Java and Scala developers with access to platform artifacts via Maven

Awesome Lists containing this project

README

        

[![Build Status](https://github.com/heremaps/here-artifact-maven-wagon/actions/workflows/release.yml/badge.svg)](https://github.com/heremaps/here-artifact-maven-wagon/actions?query=workflow%3ARelease+branch%3Amaster)
[![Maven Central](https://img.shields.io/maven-central/v/com.here.platform.artifact/artifact-wagon)](https://search.maven.org/artifact/com.here.platform.artifact/artifact-wagon)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)

# HERE platform Maven Wagon plugin

## Introduction
The HERE platform Maven Wagon plugin provides Java and Scala developers with access to HERE platform artifacts via Maven. It uses your HERE platform credentials to generate tokens so it can pull your Maven project dependencies from the HERE platform.

This way Marketplace and Workspace users may [fetch platform schemas](https://www.here.com/docs/bundle/here-workspace-developer-guide-java-scala/page/proto-schema/README.html). In addition, Marketplace users may [fetch the Java / Scala Data Client Library](https://www.here.com/docs/bundle/data-client-library-developer-guide-java-scala/page/client/get-data.html) giving them access to data in the HERE Data API.

Go to [the HERE Developer portal](https://developer.here.com/products/platform) to learn more about the HERE platform.

To learn more about Maven Wagon visit [this page](https://maven.apache.org/wagon/).

## System requirements
Version numbers higher than specified are more likely to work properly.
* Operating system:
* Windows 10
* MAC OSX 10
* Linux (Ubuntu 16.04)
* Java 8
* Maven 3.6.3 or later

## Prerequisites
To access libraries and schemas from the HERE platform, you need a HERE Workspace and/or a HERE Marketplace account. If you don’t have an account yet, go to [Pricing and Plans](https://www.here.com/get-started/pricing) to apply for a free trial.

Once you have enabled your account you need to create the credentials and prepare your environment. Workspace users can find corresponding guidance [in the documentation for Java and Scala developers](https://www.here.com/docs/bundle/here-workspace-developer-guide-java-scala/page/topics/how-to-use-sdk.html). Marketplace users can find instructions [in the Marketplace Consumer user guide](https://www.here.com/docs/bundle/marketplace-consumer-user-guide/page/topics/link-catalogs.html#set-up-your-credentials).

Please note, by default the Maven Wagon plugin uses the `credentials.properties` file provided in the `.here` directory in the user home directory.
There are three options to override the credentials:

- The first option is the system property `hereCredentialsFile`, the property should be added to the maven command the following way `-DhereCredentialsFile=/full/path/to/credentials.properties`.
- The second option is the environment variable `HERE_CREDENTIALS_FILE`. The variable should contain the full file path to the `credentials.properties` file to be used. The variable is taken into account only if there is no system property provided.
- The third option is the environment variable `HERE_CREDENTIALS_STRING`, the variable should have the following format:
```
here.access.key.id=...
here.access.key.secret=...
here.client.id=...
here.user.id=...
here.token.endpoint.url=...
```
Note that providing credentials via `HERE_CREDENTIALS_STRING` variable have the lowest precedence

## How to use it?
This Maven Wagon plugin is published on [Maven Central](https://search.maven.org/artifact/com.here.platform.artifact/artifact-wagon) so you can conveniently use it from your Maven POM.

For example, to fetch the HERE Map Content - Topology Geometry - Protocol Buffers schema and the related Java and Scala bindings set the following dependencies:

```xml


com.here.schema.rib
topology-geometry_v2_java
${topology-geometry.library.version}
jar


com.here.schema.rib
topology-geometry_v2_proto
${topology-geometry.library.version}
zip


com.here.schema.rib
topology-geometry_v2_scala
${topology-geometry.library.version}
jar



HERE_PLATFORM_ARTIFACT
default
here+artifact-service://artifact-service



com.here.platform.artifact
artifact-wagon
${artifact.wagon.version}

```

As a Marketplace user you can add this dependency for fetching the Java / Scala Data Client Library:

```xml


com.here.platform.data.client
data-client_2.11
${data.client.library.version}



HERE_PLATFORM_ARTIFACT
default
here+artifact-service://artifact-service



com.here.platform.artifact
artifact-wagon
${artifact.wagon.version}

```

`here+artifact-service://artifact-service` is placeholder URL which will be replaced by plugin dynamically based on your credentials.
The latest versions of the Data Client Library and Schemas can be found in [SDK documentation](https://www.here.com/docs/bundle/here-workspace-developer-guide-java-scala/page/sdk-libraries.html)

#### Proxy Setup
To enable Maven and the HERE Maven Wagon Plugin to work behind a corporate proxy, you need to add the following proxy
settings in the Maven settings file (`settings.xml`), which is normally located at `~/.m2/settings.xml`:

```xml



proxy1
true
https
{enter your proxy host here}
{enter your proxy port here}
{enter your proxy username here}
{enter your proxy password here}


proxy2
true
here+https
{enter your proxy host here}
{enter your proxy port here}
{enter your proxy username here}
{enter your proxy password here}


proxy3
true
here+artifact-service
{enter your proxy host here}
{enter your proxy port here}
{enter your proxy username here}
{enter your proxy password here}

```

## License
Copyright (C) 2018-2024 HERE Europe B.V.

Unless otherwise noted in `LICENSE` files for specific files or directories, the [LICENSE](LICENSE) in the root applies to all content in this repository.