Converting a Netbeans project to a Maven enabled project

后端 未结 5 1340
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-08 01:38

How can I transition a Netbeans generated project into accepting a Maven configuration? There are options to create Maven based projects, but there is nothing (that I\'ve fo

5条回答
  •  太阳男子
    2020-12-08 02:02

    You need to create a separate Maven Project. Then, you can copy the code from your other project to the Maven project. This can be done from the Projects windows in NetBeans.

    Just select the code files/packages in the tree, right-click for copy, then paste them in the Source Packages of your new Maven project.

    Next, open the files which Maven won't compile because they miss dependencies. The yellow bulb on the left of the problematic line will give you options to search for missing dependencies and add them to your project. You need to be online to perform searches.

    You can also add maven dependencies manually in your new Maven project by right-clicking the dependencies folder in the Projects windows.

提交回复
热议问题