Prerequisites for Maven-based projects in UFT Developer

  • KM03793065
  • 30-Mar-2021
  • 30-Mar-2021

Summary

For Maven-based projects you must install the UFT Developer JARs in the Maven repository (your organization's or local).

Question

▪ What are the prerequisites for Maven-based UFT Developer projects?

For Maven-based projects you must install the UFT Developer JARs in the Maven repository (your organization's or local).

Make sure that you install the JAR files using the POM files that we supply. This ensures that the GAV and all dependencies for each UFT Developer JAR are defined correctly. Otherwise, when you run your tests, second-level-dependency files will be missing, and you will see NoClassDefFoundError messages, indicating missing files such as com/hp/lft/common/logging/Logger.

Answer

Follow the instructions below to install the UFT Developer JARs:

  • To install the UFT Developer jars to your organization's repository, run the following command:

mvn deploy:deploy-file

-DpomFile=

-Dfile=

-DrepositoryId=

-Durl=

 

  • To install the UFT Developer jars to your local repository, run the following command:

mvn install:install-file

-Dfile=

-DpomFile=

 

▪ Where are the UFT Developer JARs located?

The path to the JARs and POMs is:

  • Windows: \SDK\Maven
  • Linux/Mac: /sdk/Maven/

And the list of Jars are:

JAR

POM

com.hp.lft.common-15.2.0.jar

com.hp.lft.common-15.2.0-pom.xml

com.hp.lft.report-15.2.0.jar

com.hp.lft.report-15.2.0-pom.xml

com.hp.lft.reportbuilder-15.2.0.jar

com.hp.lft.reportbuilder-15.2.0-pom.xml

com.hp.lft.sdk-15.2.0.jar

com.hp.lft.sdk-15.2.0-pom.xml

com.hp.lft.unittesting-15.2.0.jar

com.hp.lft.unittesting-15.2.0-pom.xml

com.hp.lft.verifications-15.2.0.jar

com.hp.lft.verifications-15.2.0-pom.xml

 

 

 

 

 

 

 

 

 

 

 

 

Note: Please note that the number version on the files is 15.1.0 instead of 15.0.1, the product version

The following examples show how to install the UFT Developer JARs in your local Maven repository. Run the following commands from or <UFT Developer>\SDK\Maven (on Windows) or <UFT Developer>/sdk/Maven/ (on Linux/Mac).

 

mvn install:install-file -Dfile=com.hp.lft.common-15.1.0.jar -DpomFile=com.hp.lft.common-15.1.0-pom.xml

mvn install:install-file -Dfile=com.hp.lft.report-15.1.0.jar -DpomFile=com.hp.lft.report-15.1.0-pom.xml mvn install:install-file -Dfile=com.hp.lft.reportbuilder-15.1.0.jar -DpomFile=com.hp.lft.reportbuilder-15.1.0-pom.xml

mvn install:install-file -Dfile=com.hp.lft.sdk-15.1.0.jar -DpomFile=com.hp.lft.sdk-15.1.0-pom.xml

 mvn install:install-file -Dfile=com.hp.lft.unittesting-15.1.0.jar -DpomFile=com.hp.lft.unittesting-15.1.0-pom.xml

 mvn install:install-file -Dfile=com.hp.lft.verifications-15.1.0.jar -DpomFile=com.hp.lft.verifications-15.1.0-pom.xml

 mvn install:install-file -Dfile=com.hp.lft.cucumberv4-15.1.0.jar -DpomFile=com.hp.lft.cucumberv4-15.1.0-pom.xml

mvn install:install-file -Dfile=com.hp.lft.sdk-15.1.0-javadoc.jar -DgroupId=com.hp.lft -DartifactId=sdk -Dversion=15.1.0 -Dpackaging=jar -Dclassifier=javadoc

mvn install:install-file -Dfile=com.hp.lft.report-15.1.0-javadoc.jar -DgroupId=com.hp.lft -DartifactId=report -Dversion=15.1.0 -Dpackaging=jar -Dclassifier=javadoc

mvn install:install-file -Dfile=com.hp.lft.unittesting-15.1.0-javadoc.jar -DgroupId=com.hp.lft -DartifactId=unittesting -Dversion=15.1.0 -Dpackaging=jar -Dclassifier=javadoc

mvn install:install-file -Dfile=com.hp.lft.verifications-15.1.0-javadoc.jar -DgroupId=com.hp.lft -DartifactId=verifications -Dversion=15.1.0 -Dpackaging=jar -Dclassifier=javadoc