如何在 IntelliJ IDEA 中将包导出为 zip 文件
How to export a package to zip file in IntelliJ IDEA
我最近从 Eclipse 转移到 IntelliJ,我想将一个包导出到 .zip 文件,但它不像在 Eclipse 中那么简单。我的意思是,在 Eclipse 中,我可以选择要包含在 .zip 中的文件,但在 IntelliJ 中,我只能导出整个项目。
在 IntelliJ IDEA 中,可以通过 Artifacts feature. Create a new empty JAR artifact, rename it to .zip
, then add a directory content to the artifact 指定包的位置。您可以通过菜单手动构建它,或配置 IDE 以在构建操作时自动构建它。
您也可以考虑通过 Ant、Gradle 或 Maven 使其自动化,这样您就不会依赖 IDE,并且可以从终端或 CI 服务器执行相同的操作.
我最近从 Eclipse 转移到 IntelliJ,我想将一个包导出到 .zip 文件,但它不像在 Eclipse 中那么简单。我的意思是,在 Eclipse 中,我可以选择要包含在 .zip 中的文件,但在 IntelliJ 中,我只能导出整个项目。
在 IntelliJ IDEA 中,可以通过 Artifacts feature. Create a new empty JAR artifact, rename it to .zip
, then add a directory content to the artifact 指定包的位置。您可以通过菜单手动构建它,或配置 IDE 以在构建操作时自动构建它。
您也可以考虑通过 Ant、Gradle 或 Maven 使其自动化,这样您就不会依赖 IDE,并且可以从终端或 CI 服务器执行相同的操作.