Child pages
  • How to create a classpath
Skip to end of metadata
Go to start of metadata

For Java, the classpath argument is simply a list of paths joined with an OS-specific path separator:

Paths

This assumes paths points to files and/or directories, but what if you have a list of artifact specifications? You can turn those into file names in two steps. First, use artifacts to return a list of file tasks that point to the local repository:

artifacts

Next, map that list of tasks into list of file names (essentially calling name on each task):

Tasks

This works as long as the artifacts are already in your local repository, otherwise they can't be found, but you can ask Buildr to download them by calling invoke on each of these tasks:

invoke artifacts

So let's roll this all into a single line:

One Liner
  • No labels