Im using IntelliJ 12 and I am trying to configure my project to produce a jar file for each of the main methods I have in it. I have one project with a main method for a server and a different one for the client and I want to produce a jar file which will run each of these accordingly
A different SO question lead me to this: http://blog.jetbrains.com/idea/2010/08/quickly-create-jar-artifact/ Which works fine to create a single jar using one main method however when I create multiple artefacts each with the correct settings for each one and click apply, they all point to the same main class.
Select the + icon and select 1 JARs or Directories option. select your JAR file or you can select the directories. Click on the OK button.
Idea will create the manifest files. For example:
However, when it builds the JARs, IDEA will copy the META-INF directory and its content to the root of the JAR so your MANIFEST.MF file will be in the correct location.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With