Jersey + Swagger + Swagger-UI + Maven configuration

Check out the link https://github.com/swagger-api/swagger-samples/tree/2.0/java

It has excellent examples on how to configure Swagger 3.0 in your project (see java-jersey2-webxml example). For earlier versions check the branches

As far as the ui is concerned, you can download required files or you can just add the below dependency in pom.xml.

<dependency>
    <groupId>org.webjars</groupId>
    <artifactId>swagger-ui</artifactId>
    <version>3.6.1</version>
</dependency>

It will download necessary ui files. You can copy the downloaded index.html in your project and edit the url.