This seems like a straight forward plugin, I wonder if it already exists (yeah, I searched). I have a project with some lib dependencies.
What I’m looking for does the following:
- jars up classes built from your source code into one or more jars
- gathers up the jar files your source depends on
- creates a little shell script to set the classpath to the dependencies, and launches your main class.
- zips all this up in a neat little package so you can take this zip/tar and deploy it, say on another machine.
Surely someone has written a simple deployer like this? I can’t find one in the plugins repo
I am not sure if IntelliJ has something like that, but Maven surely does what you need. You can use Maven (http://maven.apache.org/) with the Assembly plugin (http://maven.apache.org/plugins/maven-assembly-plugin/). With some easy configuration you will get Maven to package a zip file for you with all the required JAR files in a subfolder. Then you can run the application with some script like the one below:
The script above assumes a pre-defined JAVA_HOME environment variable. There are other options such as WinRun4J to launch your application.
Maven is a pretty awesome tool – not only you can generate a ZIP file with everything from the command line, but you can also manage all your application dependencies, and it integrates nicely with a broad range of SCM tools to give you powerful tools, like the release plugin (http://maven.apache.org/plugins/maven-release-plugin/) and others.