TestProject Forum
Powered by leading experts in the test automation community

Can not build maven project

Hi experts,

I am trying to create my very first test using Testproject SDK with Maven. I tried with pom.xml file in the sample project but it always throws an error about "Failure to find io.testproject:java-sdk:pom:1.0 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced"

Thanks for your help in advance !

Hi @tan.nphuc,

Did you download the Java SDK from our website? You can find it here: https://app.testproject.io/#/integrations/sdk?lang=Java

You need to save it somewhere in your computer and then, update the path to it in the pom.xml file:

Kind regards,
Amit

Hi @amit.yahav,

Yes, I already downloaded and point to the correct location in my local path. Detailed information is like below

<properties>
    <tp.sdk.path>D:/Automation/TestProjectSDK/io.testproject.sdk.java.jar</tp.sdk.path>
            <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        </properties>

 <dependency>
            <groupId>io.testproject</groupId>
            <artifactId>java-sdk</artifactId>
            <version>1.0</version>
            <!-- Update the location of the sdk as required -->
            <systemPath>${tp.sdk.path}</systemPath>
            <scope>system</scope> <!-- Local file won't be assembled by maven-assembly-plugin -->
        </dependency>

Hi @tan.nphuc,

Did you name the SDK file ‘io.testproject.sdk.jar’?
The default file name is ‘TestProject_SDK_0.60.0.jar’. Please make sure that you are using the correct file name.

Hi @amit.yahav,

Yes, I already renamed it, you can refer to picture below

Hi @tan.nphuc,

Thank you for sharing this screenshot with me :slight_smile:
Our Java SDK is a local repository and in IntelliJ, for some reason they try to fin it in Maven central. We already notified Jet Brain about this bug and it should be fixed in their next releases.

This issue doesn’t prevent you from working with our SDK or compiling it to jar. If you will try to compile your project to jar, you’ll find the generated jar under ‘target’ as usual.

Let me know if there’s an issue with that.

Kind regards,
Amit

Hi @amit.yahav

It great to hear, thanks for your support !

You’re welcome @tan.nphuc!
Please feel free to reach out at any time :slight_smile: