IntelliJ is a development environment, you shouldn’t upload applications to production from it. Instead, it’s better if you have a script that does that. IntelliJ can run shell scripts or maven goals,if you use maven for building and add a goal to upload files to FTP server or via GlassFish asadmin command.