Join us on the demo, while our product experts provide a detailed walkthrough of our enterprise platform.

Maven Dependency in Eclipse

Learn step by step setting up and resolution of maven dependency using eclipse IDE.

Giriraj Yadav
Giriraj Yadav
July 11, 2017
2 min read

Maven is a project build management software, it means it Let's you define your project dependencies, features, and behaviors. To do this, Maven downloads plugins and dependencies for various online repositories. People who want to share their libraries, develop using Maven and upload the binaries in a repository. In this article, we’ll discuss how to configure and use Maven dependency.

Prerequisites:

  • Eclipse IDE
  • Active internet connection

Install the Maven support for Eclipse (m2e)

Most Eclipse downloads include the Maven tooling already. If it is missing in your installation, you can install it via the main update of your release via Help > Install New Software. The following listing contains the update site for the Neon release and an update site maintained by the m2e project.

For the usage of Maven for Java projects, you only need the m2e component. For Java web development you also want the m2e-wtp entry.

Download the Maven index

By default, the Maven tooling does not download the Maven index for the Eclipse IDE. Via the Maven index, you can search for dependencies, select them and add them to your pom file. To download the index, select Windows > Preferences > Maven and enable the Download repository index updates on startup option.

After changing this setting, restart Eclipse. This triggers the download of the Maven index. You may want to remove this flag after restarting to avoid network traffic at every start of Eclipse.

Create Maven project

Create a new Maven project via File > New > Other… > Maven > Maven Project.

On the first wizard page, you can select if you want to create a simple project.

After creating the Maven project, a pom.xml is generated. You can find the file in Project Explorer. A Project Object Model or POM is the fundamental unit of work in Maven. It is an XML file that contains information about the project and configuration details used by Maven to build the project. It contains default values for most projects.

Now, you can add a dependency in pom.xml. For example, if you want to add LoginRadius for Java library/dependency, you can add as follows:

<dependencies>
    <dependency>
        <groupId>com.loginradius.sdk</groupId>
        <artifactId>java-sdk</artifactId>
        <version>11.0.0</version>
    </dependency>
    ......
</dependencies>

You should now be able to quickly import any libraries that you want o use in your project via Maven.



LoginRadius Docs

Implement Authentication in Minutes

click here

Most Popular Tags

EngineeringJavaScriptNodeJsReactCSSSecurityAuthenticationOAuthGoSocialLogin

Are your customers safe on your application?

According to Forbes, data breaches exposed 4.1 billion records in the first six months of 2019. If this gets you worried, we’ve got your back!

LoginRadius protects your customers’ identities. We provide world-class security for your customers during login, registration, password setup, and any other data touchpoints, and make sure that their data is safe. We do so through by offering open source SDKs, integrations with over 150 third party applications, pre-designed and customizable login interfaces, and best-in-class data security products such as MFA, RBA, and Advanced Password Policies. The platform is already loved by over 3,000 businesses with a monthly reach of 1.17 billion users worldwide.Secure Your Application Now

Giriraj Yadav

Giriraj Yadav

My name is Giriraj Yadav and I am a Software Developer, currently living in Jaipur, India. I have 4.3 years experience as a Java developer and I have been working with LoginRadius since 2016. After Completing my Masters in Computer Application, I spend much of my time in Java Development and surf internet for better inspirations.

View Profile

Try a Modern Authentication Solution

$0/ month

Free Sign Up
  • 7,000 Monthly Active Users
  • 1 Web or Mobile App
  • Email/Password Login
  • 3 Social Login Providers
  • User Data Storage
  • Transactional Email Template
  • Customizable Login Interfaces