swagger-api / swagger-codegen

swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition.
http://swagger.io
Apache License 2.0
16.89k stars 6.03k forks source link

Errors during trying build by maven #2334

Closed pupiziel closed 8 years ago

pupiziel commented 8 years ago

Hi, I`ve configured maven and jdk and after download swagger-codegen i try to build using mvn package

Result is below: [INFO] Scanning for projects... Downloading: https://repo.maven.apache.org/maven2/org/sonatype/oss/oss-parent/5/oss-parent-5.pom [ERROR] [ERROR] Some problems were encountered while processing the POMs: [WARNING] 'build.plugins.plugin.(groupId:artifactId)' must be unique but found duplicate declaration of plugin org.apache.maven.plugins:maven-source-plugin @ line 176, column 21 [FATAL] Non-resolvable parent POM for io.swagger:swagger-codegen-project:2.1.5: Could not transfer artifact org.sonatype.oss:oss-parent:pom:5 from/to central (https://repo.maven.apache.org/maven2): Connect to repo.maven.apache.org:443 [repo.maven.apache.org/185.31.17.215] failed: Connection timed ou t: connect and 'parent.relativePath' points at wrong local POM @ line 3, column 13 @ [ERROR] The build could not read 1 project -> [Help 1] [ERROR] [ERROR] The project io.swagger:swagger-codegen-project:2.1.5 (..\Tools\swagger-codegen-2.1.5\pom.xml) has 1 error [ERROR] Non-resolvable parent POM for io.swagger:swagger-codegen-project:2.1.5: Could not transfer artifact org.sonatype.oss:oss-parent:pom:5 from/to central (https://repo.maven.apache.org/maven2): Connect to repo.maven.apache.org:443 [repo.maven.apache.org/185.31.17.215] failed: Connection time d out: connect and 'parent.relativePath' points at wrong local POM @ line 3, column 13 -> [Help 2] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException [ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

Ive worked it out by download directly swagger-codegen-cli-2.1.5.jar from maven repo but Id like to compile it with modified html to present api doc. Could you help me?

wing328 commented 8 years ago

There seems to be connection issue to repo.maven.apache.org:

Connect to repo.maven.apache.org:443 [repo.maven.apache.org/185.31.17.215] failed: Connection timed out

so please check your Internet connection or try again later.

Are you pulling the latest master from github?

pupiziel commented 8 years ago

That logs comes from trying build verision 2.1.5 but the lastest master I` ve also tried and the same result :(

what do you mean by connection issue? sth blocks when it tries to connect with repo maven?

wing328 commented 8 years ago

You can try to build another project (e.g. https://github.com/swagger-api/swagger-core) with maven to isolate the issue.

pupiziel commented 8 years ago

I tried yesterday on another machine and with another internet connection and it is working. But I need at place where I had problems :( do U have any suggestion how it workaround?

wing328 commented 8 years ago

You need to contact the support at your workplace to address the issue.