Thats called maven, look up tutorials on how to add maven dependencies and repositories. Working with POM files is what you are looking for, I think IDEA has a plugin that allows you to automatically generate a POM file alongside the plugin structure.