# Setting Up
source: https://developer.mastercard.com/donations/tutorial/sample-project-creation/setup/index.md
## Setting Up {#setting-up}
### a) Pre-requisites {#a-pre-requisites}
To complete this tutorial, you need:
* Maven 3.6 or later
* JDK 1.8.0 or later
* IntelliJ IDEA (or any other IDE of your choice)
* [Mastercard Developers Account](https://developer.mastercard.com/tutorial/how-to-sign-up-for-mastercard-developers?lang=#overview) with access to Mastercard Donate API.
* Mastercard Donate Open API specification (Retrieve by clicking on the expandable section on the Donate API) [Donation-API-OAS5.7-Spec.yml](https://static.developer.mastercard.com/content/donations/swagger/Donation-API-OAS5.7-Spec.yml) (123KB)
* Using [OAuth 1.0a](https://developer.mastercard.com/platform/documentation/using-oauth-1a-to-access-mastercard-apis) to Access Mastercard APIs
* [OpenAPI Generator](https://openapi-generator.tech/) to generate jar from yaml file
* Creation of Mastercard Developers project.
### b) Create a Maven Project {#b-create-a-maven-project}
In IntelliJ IDEA, create a new Maven project, which sets up your directory structure automatically. Provide ArtifactId and Project name. Here we used the name 'donate-client'. See below:


### c) Add Resources {#c-add-resources}
* Add the Mastercard Donate API specification to your Maven project's resources folder.(Retrieve by clicking on the expandable section on the Donate API)
* Add the generated p12 file to your Maven project's resources folder. (Generated by creating Sandbox Signing Key within your project in [Mastercard Developers](https://developer.mastercard.com/tutorial/how-to-sign-up-for-mastercard-developers?lang=#overview).
Your Maven project directory should look as follows:

### d) Update pom.xml file {#d-update-pomxml-file}
1.Add the following plugin to your Maven project's pom.xml file to add OpenAPI Generator to your project. OpenAPI Generator generates API client libraries from OpenAPI Specifications (formerly known as Swagger files). OpenAPI Generator provides multiple generators and library templates to support multiple languages and frameworks. You will be using the java generator for this project.
* Plugin
```Plugin
org.openapitools
openapi-generator-maven-plugin
3.3.4
Donate API REST Client
generate
${project.basedir}/src/main/resources/donate-v3.yaml
java
src/gen/java/main
true
```
2.Add the following dependencies to your pom.xml file to add dependencies for the API client library generation and the Mastercard OAuth1 Signer library. Mastercard offers OAuth1 Signer Libraries which offer code helpers targeting the HTTP clients used by the different OpenAPI Generator Library templates. The libraries are hosted here on [Github]().
* Dependencies
```Dependencies
1.8
${java.version}
${java.version}
UTF-8
1.8.0
1.5.18
2.7.5
2.8.1
1.3.5
4.12
1.2.1
com.mastercard.developer
oauth1-signer
1.2.1
io.swagger
swagger-annotations
${swagger-core-version}
com.squareup.okhttp
okhttp
${okhttp-version}
com.squareup.okhttp
logging-interceptor
${okhttp-version}
com.google.code.gson
gson
${gson-version}
io.gsonfire
gson-fire
${gson-fire-version}
org.apache.oltu.oauth2
org.apache.oltu.oauth2.client
1.0.1
org.threeten
threetenbp
${threetenbp-version}
junit
junit
${junit-version}
com.mastercard.developer
oauth1-signer
${oauth1-signer-version}
```
When using OpenAPI Generator to generate the API client library, you have two options:
* Generate and use the source files on the fly
* Generate and deploy the source files to a Maven repository In this tutorial, you will be generating the API client library on the fly, so you include the dependencies that are needed to generate the library. (If you were deploying the source files to a Maven repository, you would only need to include the dependency for that repository.)