简体   繁体   中英

Is it possible to insert dependency to top of list in intellij modules dependencies?

I have created a library containing source property files I want on the classpath. I want to include the library in some modules for testing purposes. The modules were created based on a maven project with many modules.

When I add the library to the modules dependencies (in the Project Structure view), it inserts the library at the bottom of the list. The list is extremely long as it includes all the imports for a huge project. The only way I've found to move the library to the top of the list (so it overrides other libraries) is to drag it up one screen at a time and use the arrows which move it only one position. This is cumbersome, and I wonder if there's a better way to insert the library at the top of the list.

Seems like it's not possible to do with GUI. You could create an issue on IDEA Github repo about it. Fe, in "modules" tab a new record is inserted after the currently selected module, so developers are definitely able to do it with dependencies window.

As a workaround, you can insert a dependency to the end of the list and after that go to the ".iml" file (which is in the root of the module) and move your orderEntry manually on top (pretty fast I think).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM