Java 将 Maven 项目导入 netbeans
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/20846641/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Import a maven project into netbeans
提问by geekos
I'm learning how to create some applications in Java, i found a maven project example in a tutorial and went to compile it in netbeans.
我正在学习如何在 Java 中创建一些应用程序,我在教程中找到了一个 maven 项目示例,并在 netbeans 中对其进行了编译。
I tried to search in the Internet how to import a maven project into netbeans, and i can't found a solution.
我试图在互联网上搜索如何将maven项目导入netbeans,但找不到解决方案。
By the way, in the tutorial i downloaded something like pom.xml, i wonder what is it and how it can be used?
顺便说一句,在教程中我下载了类似 pom.xml 的东西,我想知道它是什么以及如何使用它?
Thanks!
谢谢!
回答by user2810910
Although not really a direct solution to your problem, a work around to get you up and running is to create a maven project in Netbeans via the wizard, with the same name as the example project you want to install. Then, create the same package structure in the project as the example, then copy the files into their correct packages. Although you are not importing the project, but it should get you up and running.
尽管不是您问题的真正直接解决方案,但让您启动并运行的解决方法是通过向导在 Netbeans 中创建一个 maven 项目,其名称与您要安装的示例项目相同。然后,在项目中创建与示例相同的包结构,然后将文件复制到正确的包中。虽然您没有导入项目,但它应该能让您启动并运行。
回答by mannu4u
You can import Eclipse Maven project in netbean, just follow the steps.
您可以在netbean 中导入Eclipse Maven 项目,只需按照步骤操作即可。
1) In Netbean , File->New Project->Select maven in left Pane -> Select Project with existing POM on right pane and finish.
1) 在 Netbean 中, File->New Project->Select maven in left Pane -> Select Project with existing POM on right pane 并完成。
2) Now you will be asked to open a eclipse project just open it and that's it..
2)现在你会被要求打开一个eclipse项目,只需打开它就可以了。
I hope you will solve your problem with this......
我希望你能用这个解决你的问题......