I have a custom project which requires bunch of specific jars to compile. Finding and adding them one by one is somewhat cumbersome which is why i want to write a script that adds them by creating a file for them under .idea/libraries
.
Problem is if I create the file myself (or with a script) intellij doesn’t index the library and therefore ignores the added library file.
If I add the library via File -> Project Structure -> Libraries -> Add
then it all works fine… Is it possible to trigger index when creating a .idea/libraries/foo.xml
file manually (from a commandline)?
An example of such .idea/libraries/foo.xml
:
<component name="libraryTable">
<library name="foo_1.0.0">
<CLASSES />
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/../lib/foo_1.0.0.jar!/" />
</SOURCES>
</library>
</component>
I am aware that I could collect all jars in one folder and then add the folder – I would nonetheless like to automate the process with a script, hence my question
I tried searching for triggering intellij index from commandline but couldn’t find anything