0

I'm trying to build an existing project using Maven on Eclipse. It uses a lot of jar files which I've downloaded years back.

Eclipse seem to recognize these jar files on build(no warnings/errors on editor) but when I do Run > Run As... > Clean Install, it shows a lot of compile errors(i.e. package org.apache.log4j does not exist, cannot find symbol)

It looks like Maven is not including may jar files on build. Any suggestion on how to include this in POM.XML? I tried playing with but does not seem to work.

Note: I've been doing this on ANT, I just include the jar folder in my build.xml and it gets picked up.

Failed Solution 1: Tried downloading each of the missing jars via adding it on dependency(copy pasted from maven repo site). This seemed an impractical solution and also some of the jars are not on maven repo anymore.

Failed Solution 2: Tried playing with localRepository but does not do anything.

Failed Solution 3: Used Add Dependency interface on eclipse but nothing shows on the search reults.

  • Does this answer your question? [How to add local jar files to a Maven project?](https://stackoverflow.com/questions/4955635/how-to-add-local-jar-files-to-a-maven-project) – Tr1monster Nov 02 '22 at 07:01
  • What you describe as impractical is the default way to add dependencies in maven - follow this path. Only when you have a dependency that is not on maven repo (proprietary code?) decide what to do - upload the dependency to your company's repo, or use a localRepository – Lesiak Nov 02 '22 at 08:47
  • Install the jar files into your local cache (mvn install:install-file) as a first migration step... and later use a repository manager... – khmarbaise Nov 02 '22 at 10:56

0 Answers0