简体   繁体   English

Eclipse将源文件添加到Package Explorer

[英]Eclipse add source files to package explorer

I checked out a Maven project folder from SVN. 我从SVN中检出了一个Maven项目文件夹。 It is coming up as folders in the Package Explorer, and when I right click -> Build Path -> no actions available. 它在Package Explorer中作为文件夹出现,当我右键单击->构建路径->没有可用操作时。

Is there anyway to add the source folder to appear as a package? 无论如何,有没有添加源文件夹以显示为包?

The project is not set up as an Java or Maven project inside Eclipse. 该项目未在Eclipse中设置为Java或Maven项目。 You can apply the Maven and Java nature afterwards in the project properties, you could run mvn eclipse:eclipse outside of Eclipse and import the created Eclipse project into your workspace (it could even exist as option in the project's context menu under "Maven", depending on how the project is setup right now). 之后,您可以在项目属性中应用Maven和Java性质,可以在Eclipse外部运行mvn eclipse:eclipse并将创建的Eclipse项目导入到您的工作空间中(它甚至可以作为选项存在于项目的上下文菜单中的“ Maven”下,取决于当前如何设置项目)。

Or, much easier, you just checkout a Maven project from SVN. 或者,更简单的是,您只需从SVN签出一个Maven项目。 Within the "New Project..." dialog there should be an option "Maven > Check Out Maven Projects from SVN". 在“新建项目...”对话框中,应该有一个选项“ Maven>从SVN签出Maven项目”。 Then it will be configured automatically. 然后它将被自动配置。

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

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