Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to convert a large Java Project to a Maven Project?

If I create a Java Project at the beginning

some days later,the project becomes larger and the dependency is larger

I want to use maven to manage dependency, what should I do?

I should create (src/main/java src/test/java pom.xml) manually or is there some easy way to do it?

like image 390
Sam Avatar asked Dec 20 '22 20:12

Sam


1 Answers

If you use Eclipse, there is the possibility to convert an existing project into a maven project by right-click on the root project folder > Configure > Convert to Maven Project

in IntelliJ, you can convert it too, by selecting everything you need in the project sturcture settings.

like image 198
Martin Seeler Avatar answered Dec 27 '22 11:12

Martin Seeler