Customization > Validation Guidelines for Automation of Customizations > Getting the Required Third-Party Dependencies
Getting the Required Third-Party Dependencies
This section provides an overview of how to get the required third-party dependencies.
Unit tests are created using the Junit technology hence we have dependency of third-party jars.
For building, executing tests and to get code coverage report we need following third-party jars.
junit.jar
jmockit.jar
jacococli.jar
jacocoagent.jar
hamcrest.jar
These jars can be either directly downloaded from internet from their authorized locations or they can be downloaded using the maven tool and pom.xml provided by PTC.
Versions of the jars are provided in the pom.xml file provided by PTC at this path: <WT_HOME>\prog_examples\CustomizationSamples\pom.xml.
To fetch third-party jars mentioned in the pom.xml file which is provided by PTC follow below steps:
1. Download the Apache maven zip file version 3.8.6 or later from Apache Maven Project.
2. Unzip the file into some folder. For example, /opt/ptc.
3. Install the Maven.
4. Open the command prompt and set the Maven’s environment variable and its bin directory path into PATH variable:
export M2_HOME=/opt/ptc/<Apache maven file version>
For example: export M2_HOME=/opt/ptc/apache-maven-3.8.6
export PATH=/opt/ptc/<Apache maven file version>/bin:${PATH}
For example: export PATH=/opt/ptc/apache-maven-3.8.6/bin:${PATH}
* 
The export commands for setting variables are specific to Unix or Linux environment. For Windows environment appropriate commands specific to Windows should be used.
5. Create a folder and place the pom.xml file provided by PTC.
6. Open the command prompt and traverse to directory where pom.xml file is placed. Execute the following command with a parameter where to keep third-party jars.
mvn dependency:copy -DdestinationPath=<destinationPath>
Destination path should be <WT_HOME>\lib directory. If the customer downloaded these jars from other location apart from <WT_HOME>\lib directory, then explicitly copy those jars in <WT_HOME>\lib directory.
Was this helpful?