Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7948275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T01:40:43+00:00 2026-06-04T01:40:43+00:00

I have installed Maven 3.0.4 and now want to run already created java project

  • 0

I have installed Maven 3.0.4 and now want to run already created java project in eclipse 3.3 using Maven. For this, I added eclipse maven plugin and then enabled option “Maven -> Enable Dependency Management” for the project. This action created pom.xml in the same project.
To add test files I added source directory.
Now I am very confused as to how can we add jar files in this maven project, although I tried using dependencies but got error of “missing artifacts” while compiling.
For eg., one of the jar file in $projectDir/lib folder is “junit-4.8.2.jar”
I am using it as “import org.junit.Test;”
So should we write:

  <dependency>
    <groupId>org.junit</groupId>
    <artifactId>junit</artifactId>...any unique name
    <version>4.8.2</version>
  </dependency>

If yes, then what else we have to do to let maven pick this jar file while compiling.
Also, I am not clear about use of “local repository” which got created in my user account/.m2 folder.

Could anyone please advise..Thanks !!!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T01:40:45+00:00Added an answer on June 4, 2026 at 1:40 am

    The dependency jars mentioned in the pom file have to reside in specific folders (based on their group id/version numbers) in the .m2/repository directory (usually under the user’s home directory) — also called the local repository. To achieve that, you will need to register your jars with maven to be added to the local repository)

    See this article on how to add jars to the local repository and set up the dependencies for the project. Note that you will have to update/re-add the jar to the local repository if it changes (e.g. is coming from one of your own projects, not a 3rd party library you downloaded.)

    Alternatively, if you are depending on a 3rd party library, check on the web if that library is already added to some maven repository you can use (so you don’t need to add it manually).

    Also, if the jar is coming from one of your own projects, it is better to set that up as a maven project as well and add it to your projects dependency that way, so you don’t need to update/re-add the resulting jar to the local reposity by hand (compiling that other project via maven will do that for you)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a java maven project , i installed scala plugin for eclipse and
I am importing a maven project into Eclipse. I have the m2e plugin installed
I have followed this thread now when i try to build using maven plugin
I have normal java installed already. now I want to install a software which
I have Fedora 11 (x86 64) installed with Eclipse. I need a Maven plugin,
I have Eclipse Galileo (for Java EE Developers) installed, and I'm now trying to
I'm using eclipse with the m2eclipse plugin now I just want to resolve a
I have an existing Dynamic Web Project in Eclipse Indigo and the m2e plugin
I've got an Eclipse Maven project for spring-data-jpa and QueryDsl. I seem to have
I have a standalone java project. I have performed a maven clean install. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.