从现有源代码创建项目? [英] Create a project from existing source code?
问题描述
我下载了一个作为源代码分发的开源库(Apache Crunch)。我想把它编译成JAR。为此,我需要将包含许多包含source的文件夹的文件夹导入Intellij Idea。
I downloaded an open source library distributed as source code (Apache Crunch). I want to compile it to JAR. To do this, I need to import the folder containing many folders containing source to Intellij Idea.
有没有办法做到这一点?
Is there a way to do this?
推荐答案
Apache Crunch分布在具有公共读取权限的Git存储库中,即 https://git-wip-us.apache.org /repos/asf/crunch.git
。幸运的是,IntelliJ IDEA允许您直接从版本控制存储库(如Git)导入。在项目选择器屏幕上,只需选择从版本控制中检出项目并将URL提供给Git存储库:
Apache Crunch is distributed in a Git repository with public read access, namely https://git-wip-us.apache.org/repos/asf/crunch.git
. Fortunately, IntelliJ IDEA allows you to import straight from a version control repository such as Git. On the project chooser screen, simply select the "Check out a project from version control" and provide the URL to the Git repository:
或者,您可以跳过版本控制路径。如果您以其他方式下载源代码,您会发现它是Maven项目。然后,您可以在同一项目选择器屏幕上使用导入项目,并导航到项目文件夹中的 pom.xml
。
Alternatively, you can skip the version control route. If you download the source code some other way, you will find that since it is a Maven project. You can then simply use "Import Project" on the same project chooser screen, and navigate to pom.xml
within the project folder.
如果您没有看到项目选择器,但IDEA直接打开项目,则单击文件 - >关闭项目以查看选择器。
If you don't see the project chooser, but IDEA opens a project directly, then click File->close project to see the chooser.
(我正在使用Ultimate,因此社区版可能存在小的UI差异,但此处的工作流程应该完全相同或非常接近)
(I'm using Ultimate so there might be small UI differences to the Community Edition, but the workflow here should be either exactly the same or very close)
这篇关于从现有源代码创建项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!