4

I have a savant repository in my project and I want to add all of the jars contained within the repo to IntelliJ's depenedcies list. I can add the jars one at a time, but I want to be able to add them all at once.

Is there a way to add all the jars found within all the directories/subdirectories?

Details: IntelliJ 12

Update: I can not change the repository structure, it is auto populated when ant builds.

2 Answers 2

8

Adding jars from a directory is supported, but not recursively, please vote for this feature request.

Sign up to request clarification or add additional context in comments.

2 Comments

There is a workaround provided by Daniel Brenzel in the link. Here are the details: -> go to .idea/lib/*yourLib*.xml -> add the folowing line <jarDirectory url="file://$PROJECT_DIR$/lib" -> recursive="true" /> in the library tag This works seamlessly
@SvenPlath For me, that line was in .idea/[project name].iml. Then I had to restart IntelliJ for the changes to take effect.
1

Yes, you can add all jars in a folder. You have to create a library and select option: "Attach file or directories" and the select a directory. This way even a future changes to the directory will be visible.

1 Comment

Yes, but that only works for a single directory, not a directory full of nested subdirectories that contain jars.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.