IntelliJ equivalent to Eclipse's Target Platform bundle locations?
I recently started working on an OSGi-based project that comprises hundreds of bundles. Everyone else on the team uses Eclipse, but I want to use IntelliJ. So far OSMORC is working okay for me, though it has taken a long time to figure out how to set it up, and I've only set up modules to build a few bundles out of the hundreds I'll eventually need.
Eclipse's Target Platform concept includes the ability to define multiple locations in which to find bundles to resolve dependencies. The project I'm working on has dependencies on dozens of third-party bundles which are grouped into a few different directories, which are added as locations to the Target Platform so they are available to all the projects that use that platform.
I haven't yet found an equivalent to this in IntelliJ/OSMORC. Instead, I've been adding these third-party bundle directories as dependencies to each module that requires them. That is going to be a pain when there are so many modules I'll eventually have to set up.
I was hoping I could use project libraries for this, but it seems I can only add one bundle at at time that way, instead of adding a directory full of bundles like I can do with module dependencies.
Is there a better way to do this with IntelliJ/OSMORC?
Thank you.
请先登录再写评论。
Actually, project libraries is the closest concept.
When creating a library, you can either add a whole bunch of .jar files to it, or just point to a directory and IDEA will use all .jar files inside it. In the former case, the corresponding file (.idea/libraries/<lib_name>.xml) should look like this one, in the latter - like this.
Okay, I'll try that with the next module I set up.
For the module dependencies I've already set up for those third-party bundle directories, can I use the "Move To Project Libraries..." context menu option? I was a little confused by the UI for that. I think I want the second option, like in this screenshot:
That would save me some time fixing the modules I've already set up, if the end result is the same as creating a project library directory in the first place.
Thank you.