This message was deleted.
# community-support
s
This message was deleted.
c
I grabed it thru the project.configurations.dependencies, but it doesn't seem to have a property that points to its location
v
Where does the dependency come from? Is the user supposed to provide it? Is it only for that executing, or is it also needed as production dependency?
c
It's defined as a depenedency for my plugin. So i assume when the user adds my plugin to his script, It will be available on the classpath.
v
Oh, I see, I misunderstood. So why do you need the location of the jar then? Just inject an
ExecOperations
instance into your plugin and use it`s
javaExec
method to run the program in a separate process, or just call the
main
method from your code if in-process execution is what you want.
c
Sorry, i'll be more descriptive. Instead of downloading a zip file manually, i ll add it to my build script as a dependency. I ll unzip the archive (dependency) which contains an executable jar. Then i ll invoke the jar with javaExec, but first i need to locate my zip file ( dependency)
v
Use
getResource
or
getResourceAsStream
to get the jar from inside the dependency and write it to some location.