intellij-ideaexport

How to export a package to zip file in IntelliJ IDEA


I've recently moved from Eclipse to IntelliJ and I wanted to export one package to .zip file, but it isn't as simple as in Eclipse. I mean in Eclipse I could choose which files I want to include in .zip but in IntelliJ I can only export whole project.


Solution

  • In IntelliJ IDEA it's possible via the Artifacts feature. Create a new empty JAR artifact, rename it to .zip, then add a directory content to the artifact, specify the location of the package. You can build it manually via the menu or configure IDE to do it automatically on Build action.

    You may also consider automating it via Ant, Gradle or Maven so that you don't depend on the IDE and can do the same from the terminal or CI server.