Maven plugin for Eclipse

Hi guys. I installed Maven plugin from https://www.eclipse.org/m2e/m2e-downloads.html and the version is 1.2. So I copied the link to the “Install New software” section of Eclipse and is successfully installed.

When I created a new MAVEN project all the CUCUMBER dependencies are created and later on without creating any java class file I just ran to see how it goes. There was an error message created as in the screenshot shown.

Maven plugin for Eclipse

where did it go wrong? Is the version of Maven correct? What shall I do to run Maven successfully using Cucumber jar files?

Train Asked on September 7, 2015 in Selenium WebDriver.

This may be the issue with the repository , some time it may not be able to connect to the maven repository please use a user defined Settings.xml to map to a repository to download the jar files.

There may a firewall issue to get the jars from a default repository

on September 7, 2015.
Add Comment
  • 5 Answer(s)

    Thanks for your advice.So how to further in order to test a JAVA class file using Maven from Eclipse?

    Train Answered on September 7, 2015.

    Can you please elaborate in detail so that i can get more information on what you want to achieve from maven ??

    on September 7, 2015.
    Add Comment

    I wanted to run Cucumber feature files with Step definitions Java class file by using Selenium web driver commands in order to test a web page. For this I installed Maven as it is a build tool so that I can run all the feature files as a test suite. This is the purpose of why I installed Maven onto Eclipse when I rain the project by selecting Run as -Maven Test I am getting with the above error message.

    Train Answered on September 7, 2015.
    Add Comment

    Why do you use Eclipse?

    Use IDEA, it’s much better

    for run all test do
    mvn test

    if your project doesn’t resolve some dependencies
    mvn clean

    Reviewer Answered on September 8, 2015.
    Add Comment

    Move to project directory where pom.xml is located and execute below commands

    mvn clean // This cleans target folder of u r maven project any existing data etc will be clean like existing test run results
    mvn -e install // Build project by downloading dependencies and run test. Java files containing name test will only be run
    mvn clean install -DskipTests // Build project by downloading dependencies and does not run test

    YOu can also combine command like

    mvn -e clean install -DskipTests or mvn -e clean install

     

    Error shown by you are warning , project can be build with them and test can be executed unless some compilation error occurs in pom.xml while creating build

    Supporter Answered on September 8, 2015.
    Add Comment

    Thanks for your advise AmitJain. I will create a feature file and will see if it runs successfully or not.

    Train Answered on September 8, 2015.
    Add Comment
  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.