简体   繁体   English

如何在现有项目中配置Maven?

[英]How to configure Maven in an existing project?

I have been developing a JAVA Fx project for 6 months till now and I have realized that using a tool as Maven (or Gradle) will be necessary in the future. 到目前为止,我已经开发了6个月的JAVA Fx项目,并且我意识到将来有必要将工具用作Maven(或Gradle)。 So, my question is: would be easy to use my JavaFx project (I started it as a new JavaFx project with Eclipse IDE) and import Maven in some way over that project? 因此,我的问题是:使用JavaFx项目(以Eclipse IDE作为新的JavaFx项目启动它)并通过该项目以某种方式导入Maven,会很容易吗? What will I need to do it (with Eclipse IDE or command line) in addition to the 'pom.xml' file? 除了“ pom.xml”文件之外,我还需要做什么(使用Eclipse IDE或命令行)?

Thanks! 谢谢!

In my opinion, i think you should make a new project (or a branch to the current project). 我认为,您应该创建一个新项目(或当前项目的一个分支)。 When i done this for the first time i had a lot of problems with project folder structure and custom jars that needed to be imported. 当我第一次这样做时,我在项目文件夹结构和需要导入的自定义jar上遇到了很多问题。 Yes, it's true, there is a plugin for eclipse. 是的,的确如此,有一个用于eclipse的插件。 I think that you should create a maven project and try to make it work adding the code to that. 我认为您应该创建一个Maven项目,并尝试使其添加代码。 (that's how i done it) (这就是我做到的方式)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM