of

Wraps artifactService and takes ownership of it: close also closes it if it is AutoCloseable.