How to use a Maven Project as a dependency in another Maven Project | Reuse and Run tests directly

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 ม.ค. 2025

ความคิดเห็น • 44

  • @AJAUTOMATION
    @AJAUTOMATION  3 ปีที่แล้ว +1

    Helpful playlist for Test Automation==>>
    ✅ Let's Learn the Concept in 5 To 10 Mins :=
    th-cam.com/play/PLlc_LrU50tljSA5wcIpKSYRDrGX3iLQQQ.html
    ✅ Selenium series videos Playlist :=
    th-cam.com/play/PLlc_LrU50tliMZrnSa0a9geljzCijPDfq.html
    ✅ Maven Tool videos playlist :=
    th-cam.com/play/PLlc_LrU50tlgWOrybr-Ppffg6T_1cXeUb.html
    ✅ Selenium WebDriver Exceptions Playlist :=
    th-cam.com/play/PLlc_LrU50tlisWfvF3qXmFTaTKDYkib_p.html
    ✅ Selenium Grid With Docker:==
    th-cam.com/play/PLlc_LrU50tliN8PZ7Xk41NwrnelPHchSk.html
    ✅ Upload and Download Files in Selenium :=
    th-cam.com/play/PLlc_LrU50tlhD9ezHt9O-mlWjiu3XyS3U.html
    ✅ Excel and CSV files operations :=
    th-cam.com/play/PLlc_LrU50tlifVlnHI4ph5XuY1_pNusBy.html
    ✅ Java Language Concepts :=
    th-cam.com/play/PLlc_LrU50tliq2RV-1Yhr2IjJ5RqXCQjU.html
    ✅TestNG Framework Videos:=
    th-cam.com/video/-KEg20O6Mxs/w-d-xo.html
    ✅ Become Master in Xpath:=
    th-cam.com/video/Wv1hHLhtnzw/w-d-xo.html
    ✅ Protractor series videos playlist :=
    th-cam.com/play/PLlc_LrU50tlim53VdVwAmCnBr8M2x38y8.html
    ✅ Recent Uploads :=
    th-cam.com/play/PLlc_LrU50tljOnB-LUofJpBkeSMskcQVd.html
    ✅ GitHub Repo:= github.com/ajautomation
    ⚡️ Thanks for your support !! ⚡️

  • @deepkumar1819
    @deepkumar1819 ปีที่แล้ว +1

    Great sharing 🎉

    • @AJAUTOMATION
      @AJAUTOMATION  ปีที่แล้ว

      Thanks for watching 👍🙂

  • @suborbitalbloomz7084
    @suborbitalbloomz7084 3 ปีที่แล้ว +2

    You saved my life. I was trying to fix this stupid problem for SO LONG THANKYOU!!!!

    • @AJAUTOMATION
      @AJAUTOMATION  3 ปีที่แล้ว

      Gr8...happy to hear that my video helped you.

  • @anshraina7302
    @anshraina7302 6 หลายเดือนก่อน +1

    Very Helpful, thanks a lot

    • @AJAUTOMATION
      @AJAUTOMATION  6 หลายเดือนก่อน +1

      Glad it was helpful!

  • @swapnilbodade1336
    @swapnilbodade1336 3 ปีที่แล้ว +1

    One of the underrated channel. Keep it up AJ. Great Job , Thanks for the video

    • @AJAUTOMATION
      @AJAUTOMATION  3 ปีที่แล้ว +1

      Thanks for watching 🤗👍... Will try to upload More videos soon...

  • @shaktimaan693
    @shaktimaan693 3 ปีที่แล้ว +1

    superb explain sir now i can able to create my own maven repository .

  • @avishekbehera
    @avishekbehera 3 ปีที่แล้ว +1

    Amazing explanation AJ. Very clear and straight to the point. This is one of most important video for people working in java projects and dependencies, I was exactly looking for this. Keep up the good work. Subscribed.

    • @AJAUTOMATION
      @AJAUTOMATION  3 ปีที่แล้ว +1

      Thanks for the feedback !!

  • @mizanur968
    @mizanur968 3 ปีที่แล้ว +1

    Excellent tutorial, Thanks a lot for the series,

  • @shreyanshjain4519
    @shreyanshjain4519 2 ปีที่แล้ว +1

    Nicely explained :-)

    • @AJAUTOMATION
      @AJAUTOMATION  2 ปีที่แล้ว

      Thanks for watching 👍 @shreyansh...

  • @zaryabbaloch5266
    @zaryabbaloch5266 3 ปีที่แล้ว +1

    Thanks sir, you helped alot.

    • @AJAUTOMATION
      @AJAUTOMATION  3 ปีที่แล้ว +1

      Welcome! Thanks for watching.
      Please share the content whichever you find informative. 🤗

  • @ishank9082
    @ishank9082 2 ปีที่แล้ว +1

    Will that independently work when we deploy it ?

    • @AJAUTOMATION
      @AJAUTOMATION  2 ปีที่แล้ว

      Yes it should work with common nexus repository @ishank

  • @maheshbabunadigoti7050
    @maheshbabunadigoti7050 2 ปีที่แล้ว

    Hi, I have a spring boot project and a Maven project. I created a spring boot project JAR file using mvn install...Now I added the spring boot project groupID, artifact id in maven project.. Now I am trying to build jar file for maven project in this case i am getting like package doest not exist... I am able to import packages which are avaliable in spring boot project.. But building project i am agetting error...Do u have any suggestions.
    This is error (The POM for com.demo:Project1:jar:0.0.1-SNAPSHOT is missing, no dependency information available)

  • @manasanarayan4623
    @manasanarayan4623 3 ปีที่แล้ว +1

    Great video!! Just one doubt..The artifact Id in the pom.xml should contain the exact name of the 1st JAR ?

    • @AJAUTOMATION
      @AJAUTOMATION  3 ปีที่แล้ว

      Yes, correct...When we create a JAR for first project then JAR name gets created as artifactID-Version number. SO when we add dependency in another project then maven will check for matching Jar Name with " artifactID-Version number" under the Group ID folder in m2 repository.

  • @manivannan91
    @manivannan91 3 ปีที่แล้ว +2

    I have project A in A machine and project B in B machine . How do we solve the issue . Please help me

    • @AJAUTOMATION
      @AJAUTOMATION  3 ปีที่แล้ว +2

      Hi @Manivanna, plz try following steps---
      1] Run mvn clean install for Project A in machine A..
      2] Go to .m2 repo in Machine A==> Copy the Project A folder in pen drive
      3] Go to .m2 repo in Machine B==> Add the Copied Project A folder there
      4] Add Project A dependency in pom.xml of Project B in Machine B
      5] Right click on Maven Project --> Update Maven project
      6] You should be able to use / run tests and classes from Project A in Project B now.

    • @AbhishekPandey-mi1wi
      @AbhishekPandey-mi1wi 2 ปีที่แล้ว

      @@AJAUTOMATION : what if we have to use project A dependency in more than 100 different machine within organization? I don't want to publish my artifact publicly to mvn central repository. can you please suggest ?

  • @theshakeel2003
    @theshakeel2003 11 หลายเดือนก่อน +1

    How it will get the dependency if project 2 in git repository

    • @AJAUTOMATION
      @AJAUTOMATION  10 หลายเดือนก่อน

      I think Github releases can help here, need to check that...

  • @ishank9082
    @ishank9082 2 ปีที่แล้ว

    Autowiring is not working this way . How can we do that ?

  • @ckings5593
    @ckings5593 3 ปีที่แล้ว +1

    Why it's adding project1 as directory instead of jar?

    • @AJAUTOMATION
      @AJAUTOMATION  3 ปีที่แล้ว +1

      Not sure, may be bcoz project 1 are available on local m2 repository and not on remote mvn repository like Selenium Jars. Project 1 contains Jars for src/main/java and tests jars(class files) present locally which we are just reusing in the another project, so that is how it is imported into eclipse. Indirectly we are using Jars containing class files only.

  • @suraj-sundar1505
    @suraj-sundar1505 ปีที่แล้ว

    Great playlist AJ - Can you please provide the command (in pom.xml) to create a jar file?

    • @AJAUTOMATION
      @AJAUTOMATION  ปีที่แล้ว +1

      Add jar plugin in the POM.XML and Use cmd - - -
      1. mvn clean package
      2. mvn clean install
      This might help you - - th-cam.com/video/iQBURd1v3a0/w-d-xo.html

    • @suraj-sundar1505
      @suraj-sundar1505 ปีที่แล้ว

      @@AJAUTOMATION Thanks AJ., I am able to reuse the methods from page class but not from test class. Below are the lines from pom.xml of project II which reuse the project I.
      POM_V2
      POM_V2
      0.0.1-SNAPSHOT
      tests
      test-jar
      test

      POM_V2
      POM_V2
      0.0.1-SNAPSHOT
      compile

      I am not able to create object for test class present in project I. Looks like src/test/java from Project I is not accessible. Can you help me out on this?

  • @jayakrishnank4001
    @jayakrishnank4001 2 ปีที่แล้ว +1

    Could you share both project code in git.

    • @AJAUTOMATION
      @AJAUTOMATION  2 ปีที่แล้ว +1

      Yes will share it
      Thanks for watching @jayakrishnan 🙂

  • @thelilykatherine
    @thelilykatherine 3 ปีที่แล้ว +1

    Spent an entire day trying to search for how to do this and found nothing. This worked for a multi-project setup where you don't want the projects to be setup in multi module mode.

    • @AJAUTOMATION
      @AJAUTOMATION  3 ปีที่แล้ว

      yes Sheldon it is very useful where we can re use the existing Maven project as dependency.
      I am happy to see that video helped you. Thanks for watching,....

  • @kumarmahendra2611
    @kumarmahendra2611 4 ปีที่แล้ว

    Excellent session..Can you share that notepad file in description?

    • @AJAUTOMATION
      @AJAUTOMATION  4 ปีที่แล้ว

      Thanks for watching.. You tube does not allow curly brackets.. So u can pause the video and make the notes..

  • @amarthyaseshu683
    @amarthyaseshu683 3 ปีที่แล้ว

    Great video! Can u pls send that note pad

    • @AJAUTOMATION
      @AJAUTOMATION  3 ปีที่แล้ว

      Due to some issue my laptop user Profile got corrupted so I lost all my Maven Selenium notes.. U can still easily create it while watching video just pause it.
      Thanks for watching 🤗.. Keep Learning

    • @AJAUTOMATION
      @AJAUTOMATION  3 ปีที่แล้ว +1

      atleast I found the plugin--


      org.apache.maven.plugins
      maven-jar-plugin
      3.2.0



      test-jar




      ProjectJARs/project

    • @amarthyaseshu683
      @amarthyaseshu683 3 ปีที่แล้ว

      @@AJAUTOMATION thanks