Build pom.xml from project libraries list

Answered

Hello. I create a new maven project in IntellijIDEA 2017.2.6. By "Project structure => Libraries => Add => From Maven" i`m add some libraries to my project. After that, i can write code with this libraries and run tests with it. But added libraries don`t write in pom.xml and maven don`t see them if i do "Maven => Lifecycle => Install/clean". How can i build pom.xml from "Project structure => Libraries" list? 

0
1 comment

You can't. Maven synchronization is one way only. IDE loads libraries from pom.xml. Libraries added to the module dependencies manually are not written to pom.xml and will be lost on the next project reimport. So, just edit pom.xml and put the libraries you need there, then Reimport.

0

Please sign in to leave a comment.