Specified destination directory cannot be created: /home/gosper/.m2/repository/io/swagger/swagger-jersey-jaxrs/1.5.8
<p>I used <a href="http://swaggerhub.com" rel="nofollow">swaggerhub.com</a> to generate the server side code template (spring mvc server).</p>

<p>When I open the template project in IntelliJIDEA, it seems to unable to resolve some dependencies.</p>

<p>This is my <code>pom.xml</code></p>

<pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  &lt;groupId&gt;io.swagger&lt;/groupId&gt;
  &lt;artifactId&gt;swagger-spring-mvc-server&lt;/artifactId&gt;
  &lt;packaging&gt;jar&lt;/packaging&gt;
  &lt;name&gt;swagger-spring-mvc-server&lt;/name&gt;
  &lt;version&gt;1.0.0&lt;/version&gt;
  &lt;build&gt;
    &lt;sourceDirectory&gt;src/main/java&lt;/sourceDirectory&gt;
    &lt;plugins&gt;
      &lt;plugin&gt;
        &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
        &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
        &lt;version&gt;2.6&lt;/version&gt;
      &lt;/plugin&gt;
      &lt;plugin&gt;
        &lt;artifactId&gt;maven-failsafe-plugin&lt;/artifactId&gt;
        &lt;version&gt;2.6&lt;/version&gt;
        &lt;executions&gt;
          &lt;execution&gt;
            &lt;goals&gt;
              &lt;goal&gt;integration-test&lt;/goal&gt;
              &lt;goal&gt;verify&lt;/goal&gt;
            &lt;/goals&gt;
          &lt;/execution&gt;
        &lt;/executions&gt;
      &lt;/plugin&gt;
      &lt;plugin&gt;
        &lt;groupId&gt;org.eclipse.jetty&lt;/groupId&gt;
        &lt;artifactId&gt;jetty-maven-plugin&lt;/artifactId&gt;
        &lt;version&gt;${jetty-version}&lt;/version&gt;
        &lt;configuration&gt;
          &lt;webAppConfig&gt;
            &lt;contextPath&gt;/v1&lt;/contextPath&gt;
          &lt;/webAppConfig&gt;
          &lt;webAppSourceDirectory&gt;target/${project.artifactId}-${project.version}&lt;/webAppSourceDirectory&gt;
          &lt;stopPort&gt;8079&lt;/stopPort&gt;
          &lt;stopKey&gt;stopit&lt;/stopKey&gt;
          &lt;httpConnector&gt;
            &lt;port&gt;8002&lt;/port&gt;
            &lt;idleTimeout&gt;60000&lt;/idleTimeout&gt;
          &lt;/httpConnector&gt;
        &lt;/configuration&gt;
        &lt;executions&gt;
          &lt;execution&gt;
            &lt;id&gt;start-jetty&lt;/id&gt;
            &lt;phase&gt;pre-integration-test&lt;/phase&gt;
            &lt;goals&gt;
              &lt;goal&gt;start&lt;/goal&gt;
            &lt;/goals&gt;
            &lt;configuration&gt;
              &lt;scanIntervalSeconds&gt;0&lt;/scanIntervalSeconds&gt;
              &lt;daemon&gt;true&lt;/daemon&gt;
            &lt;/configuration&gt;
          &lt;/execution&gt;
          &lt;execution&gt;
            &lt;id&gt;stop-jetty&lt;/id&gt;
            &lt;phase&gt;post-integration-test&lt;/phase&gt;
            &lt;goals&gt;
              &lt;goal&gt;stop&lt;/goal&gt;
            &lt;/goals&gt;
          &lt;/execution&gt;
        &lt;/executions&gt;
      &lt;/plugin&gt;
    &lt;/plugins&gt;
  &lt;/build&gt;
  &lt;dependencies&gt;
    &lt;dependency&gt;
      &lt;groupId&gt;io.swagger&lt;/groupId&gt;
      &lt;artifactId&gt;swagger-jersey-jaxrs&lt;/artifactId&gt;
      &lt;version&gt;${swagger-core-version}&lt;/version&gt;
    &lt;/dependency&gt;
    &lt;dependency&gt;
      &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
      &lt;artifactId&gt;slf4j-log4j12&lt;/artifactId&gt;
      &lt;version&gt;${slf4j-version}&lt;/version&gt;
    &lt;/dependency&gt;

    &lt;!--Spring dependencies --&gt;
    &lt;dependency&gt;
      &lt;groupId&gt;org.springframework&lt;/groupId&gt;
      &lt;artifactId&gt;spring-core&lt;/artifactId&gt;
      &lt;version&gt;${spring-version}&lt;/version&gt;
    &lt;/dependency&gt;
    &lt;dependency&gt;
      &lt;groupId&gt;org.springframework&lt;/groupId&gt;
      &lt;artifactId&gt;spring-webmvc&lt;/artifactId&gt;
      &lt;version&gt;${spring-version}&lt;/version&gt;
    &lt;/dependency&gt;
    &lt;dependency&gt;
      &lt;groupId&gt;org.springframework&lt;/groupId&gt;
      &lt;artifactId&gt;spring-web&lt;/artifactId&gt;
      &lt;version&gt;${spring-version}&lt;/version&gt;
    &lt;/dependency&gt;

    &lt;!--SpringFox dependencies--&gt;
    &lt;dependency&gt;
      &lt;groupId&gt;io.springfox&lt;/groupId&gt;
      &lt;artifactId&gt;springfox-swagger2&lt;/artifactId&gt;
      &lt;version&gt;${springfox-version}&lt;/version&gt;
    &lt;/dependency&gt;
    &lt;dependency&gt;
      &lt;groupId&gt;io.springfox&lt;/groupId&gt;
      &lt;artifactId&gt;springfox-swagger-ui&lt;/artifactId&gt;
      &lt;version&gt;${springfox-version}&lt;/version&gt;
    &lt;/dependency&gt;

    &lt;dependency&gt;
      &lt;groupId&gt;junit&lt;/groupId&gt;
      &lt;artifactId&gt;junit&lt;/artifactId&gt;
      &lt;version&gt;${junit-version}&lt;/version&gt;
      &lt;scope&gt;test&lt;/scope&gt;
    &lt;/dependency&gt;
    &lt;dependency&gt;
      &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
      &lt;artifactId&gt;servlet-api&lt;/artifactId&gt;
      &lt;version&gt;${servlet-api-version}&lt;/version&gt;
    &lt;/dependency&gt;
  &lt;/dependencies&gt;
  &lt;properties&gt;
    &lt;swagger-core-version&gt;1.5.8&lt;/swagger-core-version&gt;
    &lt;jetty-version&gt;9.2.15.v20160210&lt;/jetty-version&gt;
    &lt;jersey-version&gt;1.13&lt;/jersey-version&gt;
    &lt;slf4j-version&gt;1.7.21&lt;/slf4j-version&gt;
    &lt;junit-version&gt;4.12&lt;/junit-version&gt;
    &lt;servlet-api-version&gt;2.5&lt;/servlet-api-version&gt;
    &lt;springfox-version&gt;2.4.0&lt;/springfox-version&gt;
    &lt;spring-version&gt;4.2.5.RELEASE&lt;/spring-version&gt;
  &lt;/properties&gt;
&lt;/project&gt;
</code></pre>

<p>Here is the error stack:</p>

<blockquote>
  <p>Failed to collect dependencies for
  [io.swagger:swagger-jersey-jaxrs:jar:1.5.8 (compile),
  org.slf4j:slf4j-log4j12:jar:1.7.21 (compile),
  org.springframework:spring-core:jar:4.2.5.RELEASE (compile),
  org.springframework:spring-webmvc:jar:4.2.5.RELEASE (compile),
  org.springframework:spring-web:jar:4.2.5.RELEASE (compile),
  io.springfox:springfox-swagger2:jar:2.4.0 (compile),
  io.springfox:springfox-swagger-ui:jar:2.4.0 (compile),
  junit:junit:jar:4.12 (test), javax.servlet:servlet-api:jar:2.5
  (compile)]: Failed to read artifact descriptor for
  io.swagger:swagger-jersey-jaxrs:jar:1.5.8: Could not transfer artifact
  io.swagger:swagger-jersey-jaxrs:pom:1.5.8 from/to central
  (<a href="http://repo.maven.apache.org/maven2" rel="nofollow">http://repo.maven.apache.org/maven2</a>): Specified destination directory
  cannot be created:
  /home/gosper/.m2/repository/io/swagger/swagger-jersey-jaxrs/1.5.8 ->
  [Help 1]</p>
</blockquote>