# DeviceAtlas Enterprise API Installation #
This section deals with installing the DeviceAtlas Enterprise API.
### Dependencies ###
This library does not depend on any third party libraries.
### Library ###
The DeviceAtlas Enterprise API consists of two libraries and each
library has a separate jar file.
#### DeviceAtlas Enterprise API (deviceatlas-enterprise-java-x.x.jar) ####
This library contains the DeviceAtlas Device and Carrier APIs.
Device detection is achieved by passing a set of request headers or a
user-agent along with optional Client-side properties. Carrier detection
is achieved by passing a set of request headers or an IP address.
#### DeviceAtlas Enterprise API Web (deviceatlas-enterprise-java-web-x.x.jar) ####
This is an extension to the above library where Device and Carrier detection
is achieved by passing a `HttpServletRequest` object. This library retrieves the
relevant headers from the `HttpServletRequest` object. Unless the `HttpServletRequest`
object is not available or when processing an off-line user-agent list or
header set, it is strongly recommended to use this library over the above library.
### Configuration ###
The DeviceAtlas Enterprise API can be added as a dependency to a project using either Maven or Gradle.
#### Gradle ####
The following configuration should be added to the build.gradle file in the project:
```
...
repositories {
maven {
url "https://java-api.deviceatlas.com/"
credentials {
username "LICENCE_KEY"
password "LICENCE_KEY"
}
}
}
dependencies {
implementation (group: "afilias.deviceatlas", name: "deviceatlas-enterprise-java", version: "2.4.3")
// OR
implementation (group: "afilias.deviceatlas", name: "deviceatlas-enterprise-java-web", version: "2.4.3")
}
```
For both username and password, the licence key should be used.
#### Maven ####
In order to setup Maven configuration, two steps are necessary:
- configure authentication credentials
- add the DeviceAtlas dependency to the pom.xml file
##### Configure the credentials ####
The credentials can be configured in two different ways.
###### 1. Add a configuration local to the project ######
Create an .mvn folder in the root of the project containing two files
- maven.config
- settings.xml
The .mvn/maven.config file should contain:
```
--settings ./.mvn/settings.xml
```
The .mvn/settings.xml file should contain:
```xml
deviceatlas
LICENCE_KEY
LICENCE_KEY
```
For both username and password, the licence key should be used.
###### 2. Add to the user or global configuration ######
Alternatively, the settings.xml file could be placed in one of the following locations, with the same content as above:
- ${maven.home}/conf/settings.xml
- ${user.home}/.m2/settings.xml
##### Configure the dependency ####
Add the DeviceAtlas dependency to the pom.xml file in the project as follows:
```xml
...
deviceatlas
https://java-api.deviceatlas.com
afilias.deviceatlas
deviceatlas-enterprise-java
2.4.3
afilias.deviceatlas
deviceatlas-enterprise-java-web
2.4.3
```
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
_ Copyright (c) DeviceAtlas Limited 2021. All Rights Reserved. _
_ https://deviceatlas.com _