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="LeanFT Installation Directory\SDK\Java\com.hp.lft.sdk-standalone.jar" -DgroupId="com.hp.lft" -DartifactId="sdk" -Dversion=14.0.0 -Dpackaging=JAR -DgeneratePom=true

mvn install:install-file -Dfile="LeanFT Installation Directory\SDK\Java\com.hp.lft.report.jar" -DgroupId="com.hp.lft" -DartifactId="report" -Dversion=14.0.0 -Dpackaging=JAR -DgeneratePom=true

mvn install:install-file -Dfile="LeanFT Installation Directory\SDK\Java\com.hp.lft.unittesting.jar" -DgroupId="com.hp.lft" -DartifactId="unittesting" -Dversion=14.0.0 -Dpackaging=JAR -DgeneratePom=true

mvn install:install-file -Dfile="LeanFT Installation Directory\SDK\Java\com.hp.lft.verifications.jar" -DgroupId="com.hp.lft" -DartifactId="verifications" -Dversion=14.0.0 -Dpackaging=JAR -DgeneratePom=true

mvn install:install-file -Dfile="LeanFT Installation Directory\SDK\Java\com.hp.lft.sdk-javadoc.jar" -DgroupId="com.hp.lft" -DartifactId="sdk" -Dversion=14.0.0 -Dclassifier=Javadoc -Dpackaging=JAR -DgeneratePom=true

mvn install:install-file -Dfile="LeanFT Installation Directory\SDK\Java\com.hp.lft.common.jar" -DgroupId="com.hp.lft" -DartifactId="common" -Dversion=14.0.0 -Dpackaging=JAR -DgeneratePom=true

mvn install:install-file -Dfile="LeanFT Installation Directory\SDK\Java\com.hp.lft.reportbuilder-standalone.jar" -DgroupId="com.hp.lft" -DartifactId="reportbuilder" -Dversion=14.0.0 -Dpackaging=JAR -DgeneratePom=true

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


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

<dependency>
    <groupId>com.hp.lft</groupId>
    <artifactId>sdk</artifactId>
    <version>14.0.0</version>
    <classifier>javadoc</classifier>
</dependency>

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

<dependency>
    <groupId>com.hp.lft</groupId>
    <artifactId>unittesting</artifactId>
    <version>14.0.0</version>
</dependency>

<dependency>
    <groupId>com.hp.lft</groupId>
    <artifactId>verifications</artifactId>
    <version>14.0.0</version>
</dependency>

<dependency>
    <groupId>com.hp.lft</groupId>
    <artifactId>reportbuilder</artifactId>
    <version>14.0.0</version>
</dependency>

<dependency>
    <groupId>com.hp.lft</groupId>
    <artifactId>common</artifactId>
    <version>14.0.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: , , ,

6 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