Plugin launch classpath settings

Is it possible to customize the classpath to use during plugin application launch under IDEA? I want to write plugin which uses Spring IoC but unfortunatelly context config files (*.xml files) are not visible at classpath during plugin application launch.
The following actions were performed:

  • target *.xml files were added to classpath of plugin module (directory which contains them was market as source)
  • ;
  • it was checked that target *.xml files are located at classes folder where all plugin *.class files are located
  • new URLClassLoader wich points to directory containing target *.xml files was set as a thread context classloader before spring config initialization
  • ]]>
    Unfortunatelly all of this actions don't solve my problem. I need some knowledge about ClassLoader usage by IDEA during plugin application launch from IDE. No such information was found.

    2 comments

    when you plugin will be deployed , it's classpath will contain its own resources (any jars in /lib + any resource in /classes), and, if you declared some dependency on another plugin, you will also be able to see it in your classpath.

    Apart from that, you will see IDEA jars (any jar in IDEA/lib folder), and that's all

    So if you want to be able to see spring classes while executing your plugin you'll need to package them as libraries of your plugin

    0

    No, the questions is not related to plugin usage when it is complete and packed. I want to be able to correctly start my plugin-module from IDEA during development phase.
    So, the problem is that when I start my plugin-module and new instance of IDEA launchs, spring's *.xml can't be found at startup.

    0

    Please sign in to leave a comment.