LeanFT

How to Add LeanFT Dependency in Maven

Maven is an important component of a Test Automation Framework. If you want to add LeanFT dependencies in Maven, you need to perform the following steps:-

  1. Install Maven on your system. Mkyong explains it beautifully in his post here.
  2. Execute the following 2 commands on your command prompt to add the LeanFT Jars in your local maven repository:-

mvn install:install-file -Dfile="C:\Program Files (x86)\HP\LeanFT\SDK\Java\leanft-jars\com.hp.lft.report.jar" -DgroupId="com.hp.lft" -DartifactId="com.hp.lft.report" -Dversion=12.53.0 -Dpackaging=JAR -DgeneratePom=true

mvn install:install-file -Dfile="C:\Program Files (x86)\HP\LeanFT\SDK\Java\leanft-jars\com.hp.lft.sdk-standalone.jar" -DgroupId="com.hp.lft" -DartifactId="com.hp.lft.sdk" -Dversion=12.53.0 -Dpackaging=JAR -DgeneratePom=true

3. Add the Following dependencies in your pom.XML:-


 <dependency>
    <groupId>com.hp.lft</groupId>
    <artifactId>com.hp.lft.sdk</artifactId>
    <version>12.53.0</version>
 </dependency>

 <dependency>
    <groupId>com.hp.lft</groupId>
    <artifactId>com.hp.lft.report</artifactId>
    <version>12.53.0</version>
 </dependency>

Please note that the version specified in the Command line arguments and the pom.XML would change depending on the version of LeanFT installed on your machine.

Happy Automating !

Harshit Kohli

Advertisements

Categories: LeanFT

Tagged as: , , ,

5 replies »

      • Actually i did few modifications as i have uploaded all leanft jars in repository and now downloading from that directly. Below are modified POM.

        com.citi
        com.hp.lft.sdk
        12.52.0-standalone

        com.citi.docs
        com.hp.lft.sdk
        12.52.0-javadoc

        com.citi
        com.hp.lft.report
        12.52.0

        com.citi
        com.hp.lft.unittesting
        12.52.0

        com.citi
        com.hp.lft.verifications
        12.52.0

        junit
        junit.core
        4.11.0

        junit
        junit
        4.8.2
        provided

        So it is successfully downloading the jars but when i am trying to build this pom it is throwing build failure with below error.

        error: cannot find symbol
        symbol: class SampleScreenModel
        location: class SampleLeanftTest

        Please help me on resolving this issue.
        Thank you in advance. 🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s