To build all Vespa components, use Docker and CentOS as described at github.com/vespa-engine/vespa/tree/master/docker. This is done in the quick-start, and provides a runtime environment in the Docker instance.
To develop with Vespa, build the Vespa Java artifacts - in vespa:
$ ./bootstrap.sh java && mvn install
Once built, Vespa artifacts are ready to be used and one can build a Vespa application using the bundle plugin.