What's the best way to execute downloaded dependencies?

I have a grammar for which I want to generate a Scanner and a Parser for that grammar. To do so, I use beaver-cc and jflex. Both are available
in maven central (beaver-cc, jflex).

Now I want to write a task to execute both in the beginning to create the Scanner and the Parser.

Of course I could now find the downloaded dependencies and hard code their paths in the task to execute them. But that seems quite unclean to me. Is there a clean solution to find the local path of a special dependency and execute it?

You can easily get the path of dependencies, using Configuration#getAsPath().


In order to execute java process, Exec type task will help you.


Thanks for the quick reply. I will try that :slight_smile: