November 2, 20187 yr Hey guys I'm having difficulties with exporting multiple jars. I have a package containing the main classes of a few scripts, now I'm trying to create artifacts from each of those main classes. I'm not sure how to set that up, I'm using Intellij btw. Thanks!
November 2, 20187 yr 14 minutes ago, Zummy said: Hey guys I'm having difficulties with exporting multiple jars. I have a package containing the main classes of a few scripts, now I'm trying to create artifacts from each of those main classes. I'm not sure how to set that up, I'm using Intellij btw. Thanks! Make each script it's own module, then it's easy to create a separate artifact for each one. Create a new project (you could just name it something like ZummyScripts) Delete the automatically created module When you want to create a new script, go to File -> New -> Module.. Set the Module name to your script name, make sure the content root and file location is correct Repeat the process whenever you want to add a new script Now when you go to create an artifact, you will see each module in the available elements section. Just select which one you want for this .jar Edited November 2, 20187 yr by Explv
November 2, 20187 yr 4 minutes ago, Explv said: Make each script it's own module, then it's easy to create a separate artifact for each one. Create a new project (you could just name it something like ZummyScripts) Delete the automatically created module When you want to create a new script, go to File -> New -> Module.. Set the Module name to your script name, make sure the content root and file location is correct Repeat the process whenever you want to add a new script Now when you go to create an artifact, you will see each module in the available elements section. Just select which one you want for this .jar Na bro do what I did when I was learning and release all your private scripts in one jar
November 2, 20187 yr Author 40 minutes ago, Explv said: Now when you go to create an artifact, you will see each module in the available elements section. Just select which one you want for this .jar Thanks! Absolute legend! Just one more question ? I have a package containing my custom api, how can I set it up so all modules use that same package?
November 2, 20187 yr 28 minutes ago, Zummy said: Thanks! Absolute legend! Just one more question ? I have a package containing my custom api, how can I set it up so all modules use that same package? For the module that you want to use the api in (assuming the api is a module), open up the settings, navigate to Modules, and select dependencies Click the green + and select Module dependency... Select your API module, and tick the Export box, select Apply Now when creating an artifact, instead of selecting JAR -> Empty, select JAR -> From modules with dependencies... Select your script module, and make sure the extract to the target JAR option is selected Now your API should be linked, and output into your .jar Edited November 2, 20187 yr by Explv
Create an account or sign in to comment