2

I'm trying to access build definition project classpath in this command. If somebody uses this plugin/command, then runTask(fullClasspath in Compile, state) or runTask(fullClasspath in Runtime, state) and any other Keys.classpath returns only classpath without build definition project dependencies - deps on plugins like this one. So that I can't access my own plugin classpath at the moment somebody runs the command from his project.

Therefore I cannot fork a java process in that plugin and set it classpath corresponding to my plugin dependencies. Imagine the plugin starts a server so it has dependencies on that server declared and to fork the process you need to get the corresponding classpath of the plugin - dependency on that plugin is declared in build definition project.

Community
  • 1
  • 1
lisak
  • 21,611
  • 40
  • 152
  • 243
  • The list of URLs can be read from the dependencies' URLClassLoader, and then converted back to the list of local paths. This is more a workaround than a proper solution I think. – Konstantin Pelepelin Jan 11 '18 at 20:34

0 Answers0