Maven: Convert non maven projects to maven project

Add external dependencies

Look if there is any external libraries in the project

Add Java 1.8

Add the below section outside dependencies section:






Now add the JUnit4

Add it like before (generate->Dependency…)


How to add a Jar which is not available in Maven central repo?

Best way to add that in your companies repository, you can set up using Nexus, or Artifactory or something similar

<!--FIXME: add this jar in Nexus and use from there-->


Right click on the pom.xml-> Maven-> Reload project


Now compile the project to see if there is any error:



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store