集成开发环境手动构建过程
我会问我的问题简短而甜蜜,是否有任何正式的方法可以使用 IDE 编写代码,然后使用手动构建过程构建它们。如果有人在互联网上有良好的链接,最好给
I will ask my question short and sweet, is there any formal way to write code using IDE and then build them using manual build process.If anyone has good links on internet, it is better to give
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我相信这很简单,而且更重要的是 - 方便,当您的 IDE 项目基于某些外部构建模型(例如 Ant、Maven,可能是 Scala 的 SBT)时。在这种情况下,外部构建很容易与 IDE 同步。另外,您的 IDE 是否监视项目文件夹内底层文件系统的更改也很重要,因为我相信每次构建时单击“刷新”或类似的操作会非常痛苦。
流行的 IDE 提供了从 Ant 和 Maven 等外部模型导入项目的选项。
我个人在我的一个 Java、Maven 和 IntellijIdea 项目中使用了这种方法。
I believe it's easy, and what is more important - convenient, in cases when your IDE project is based on some external build model e.g. Ant, Maven, probably SBT for Scala. In this case it's easy for external build to be synchronized with IDE. Also it's important whether your IDE monitors underlying filesystem changes inside project folder, as I believe it's going to be quite pain-full to click "Refresh" or something similar every time you build.
Popular IDE's provide options to import project from external models like Ant and Maven.
Personally I use this approach in one of my projects with Java, Maven and IntellijIdea.
是的。使用行家。它具有所有流行 IDE 的插件。因此,创建maven项目,编写pom.xml,运行
mvn install
,然后运行mvn eclipse:eclipse
(如果您使用的是eclipse)。这将生成 .project 和 .classpath。现在打开 eclipse,定义类路径变量 M2_REPO 并导入您的项目。
M2_REPO 应该只定义一次,并且应该引用通常位于 USER_HOME/.m2/repository 下的本地 Maven 存储库。
有关更多详细信息,请参阅 maven 文档。
我不知道这一点,并且总是花费大量时间同步我的 IDE 和 ant build.xml。但现在我使用maven,可以忘记这个辛苦的工作。
Yes. Use maven. It has plugins to all popular IDEs. So, create maven project, write pom.xml, run
mvn install
and then runmvn eclipse:eclipse
(if you are using eclipse).This will produce .project and .classpath. Now open eclipse, define classpath variable M2_REPO and import your project.
M2_REPO should be defined only once and should refer to local maven repository that is typically located under USER_HOME/.m2/repository.
For more details see documentation of maven.
I did not know this and always spent a lot of time synchronizing my IDE and ant build.xml. But now I am using maven and can forget about this hard work.