java - Unable to load up Swagger-UI page for the RESTEasy Swagger Codegen example -


i followed small tutorial (if can called that) here generate server stubs petstore example api. followed readme instructions in generated files, says:

to run server, please execute following:  ``` mvn clean package jetty:run ```  can view swagger listing here:  ``` http://localhost:8080/v2/swagger.json 

the first time did that, got build , compilation error. apparently pom.xml file missing both jetty plugin:

        <plugin>           <groupid>org.eclipse.jetty</groupid>           <artifactid>jetty-maven-plugin</artifactid>           <version>9.2.9.v20150224</version>         </plugin> 

as swagger-core dependency:

    <dependency>         <groupid>io.swagger</groupid>         <artifactid>swagger-core</artifactid>         <version>1.5.9</version>     </dependency> 

although mentioned under properties property follows:

<properties>     <swagger-core-version>1.5.9</swagger-core-version>     <jetty-version>9.2.9.v20150224</jetty-version>     <resteasy-version>3.0.11.final</resteasy-version>     <slf4j-version>1.6.3</slf4j-version>     <junit-version>4.8.1</junit-version>     <servlet-api-version>2.5</servlet-api-version> </properties> 

while mvn clean package jetty:run after that:

2016-07-28 14:40:11.740:info::main: logging initialized @3196ms [info] configuring jetty project: swagger-jaxrs-resteasy-server [info] webappsourcedirectory not set. trying src/main/webapp [info] reload mechanic: automatic [info] classes = /home/.../restserver/restapi/petstore/jaxrs-resteasy/target/classes [info] context path = / [info] tmp directory = /home/.../restserver/restapi/petstore/jaxrs-    resteasy/target/tmp [info] web defaults = org/eclipse/jetty/webapp/webdefault.xml [info] web overrides =  none [info] web.xml file = file:/home/.../restserver/restapi/petstore/jaxrs-    resteasy/src/main/webapp/web-inf/web.xml [info] webapp directory = /home/.../restserver/restapi/petstore/jaxrs-    resteasy/src/main/webapp 2016-07-28 14:40:11.799:info:oejs.server:main: jetty-9.2.9.v20150224 2016-07-28 14:40:12.430:info:oejsh.contexthandler:main: started o.e.j.m.p.jettywebappcontext@58ba5b30{/,file:/home/.../restserver/restapi/petstore/jaxrs-resteasy/src/main/webapp/,available}{file:/home/.../restserver/restapi/petstore/jaxrs-resteasy/src/main/webapp/} 2016-07-28 14:40:12.431:warn:oejsh.requestloghandler:main: !requestlog 2016-07-28 14:40:12.450:info:oejs.serverconnector:main: started     serverconnector@6cd64b3f{http/1.1}{0.0.0.0:8080} 2016-07-28 14:40:12.450:info:oejs.server:main: started @3906ms [info] started jetty server 

i still receive 404 when trying open site:

$ wget http://localhost:8080/v2/swagger.json

--2016-07-28 14:58:42--  http://localhost:8080/v2/swagger.json resolving hostname »localhost (localhost)«... 127.0.0.1 connecting localhost (localhost)|127.0.0.1|:8080... connected. http request sent awaiting response... 404 not found 2016-07-28 14:58:42 error 404: not found. 

what going wrong?

edit: here mvn clean package -x jetty:run output: http://pasted.co/3ceba86c


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -