Can I have two project files pointed at the same source?
Hello. My original problem is that I have two jar files from a 3rd party source that I need to quickly make specific builds for. I have code and jars that are specific to each build type.
I was wondering how I could manage this in intelliJ?
I am curious about any other methods that do the same thing...
Thanks,
stringa
Please sign in to leave a comment.
Hello.
Am I correct that your source code is the same, so it is successfully resolved and compiled with both jars, and the only problem is to make 2 different distributions?
If it's really so, then you could add one (any) jar to your module dependencies and develop with it. Then configure 2 artifacts (see Project Structure dialog, Artifacts section) to build: one for every jar.
Regards,
Alexander.
Awsome! This is exactly the case. I am gonna try this out today.
Thanks,
stringa
I wish I understood Artifacts more. The documentation isn't helping me really understand this concept.
stringa
Is there any certain problem you've met?
Alexander.
I think that i just don't understand artifact in general and how to even use them in my case as explain in this post.
Thanks,
stringa
Artifact is a "product" of your project, i.e. a file or set of files generated from compiled project classes, libraries or anything. For example, if you want to build a .war file for a web server (or a .jar, or a directory, etc), you configure an artifact.
I supposed this was your task. Sorry, if it's not.
Project Structure dialog Artifacts section is the place to configure artifacts: i.e. you define what files do you want to collect and where to place the result; then just execute building when necessary.
Sorry, I cannot be more specific without specific questions.
Alexander.