title: Maven could not resolve dependencies for project : No versions available for org.owasp.esapi:esapi:jar:[2.0,3) within specified range
body: <p>Before marking this question as duplicate, let me tell you this question is a bit different.</p>
  
  <p>I have a project with three modules, namely <strong>-ejb</strong>, <strong>-ear</strong> and <strong>-web</strong> on NetBeans. I am currently working on the <strong>-web</strong> module, and till last night everything was working fine and I made my <code>git commit</code> on a working project after which I did a <strong>clean and build</strong> on my project which failed to build since my internet connection was down. Since I am using <strong>ESAPI</strong> from <strong>OWASP</strong>, it needs to download a few dependencies each time while building, and since my internet connection was down, it failed to build.</p>
  
  <p>Today, when I tried to do a <strong>clean and build</strong> with a working internet connection, the <strong>-web</strong> module is giving me errors about maven dependencies.</p>
  
  <blockquote>
    <p>Failed to execute goal on project Papercraft-web: Could not resolve
    dependencies for project
    com.onclave.papercraft:Papercraft-web:war:0.00.09.00-METIS: Failed to
    collect dependencies for
    [org.springframework:spring-aop:jar:4.2.4.RELEASE (compile),
    ...
    org.owasp.esapi:esapi:jar:2.1.0.1 (compile),
    javax:javaee-web-api:jar:7.0 (provided)]: No versions available for
    org.owasp.esapi:esapi:jar:[2.0,3) within specified range -> [Help 1]</p>
  </blockquote>
  
  <p>So the problem is with the <code>esapi</code> dependency. From other related posts from SO, I found out that if I provide an exact version as a dependency, that might solve the problem, so I did mention the exact dependency as <strong>[1.2]</strong> which is available at maven central. Now, if I do a <strong>clean and build</strong>, maven fails again, but this time with:</p>
  
  <blockquote>
    <p>Failed to execute goal on project Papercraft-web: Could not resolve
    dependencies for project
    com.onclave.papercraft:Papercraft-web:war:0.00.09.00-METIS: Failed to
    collect dependencies for
    [org.springframework:spring-aop:jar:4.2.4.RELEASE (compile),
    ...
    org.owasp.encoder:encoder-esapi:jar:[1.2,1.2] (compile),
    org.owasp.esapi:esapi:jar:[2.1.0.1,2.1.0.1] (compile),
    javax:javaee-web-api:jar:7.0 (provided)]: No versions available for
    org.owasp.esapi:esapi:jar:[2.0,3) within specified range -> [Help 1]</p>
  </blockquote>
  
  <p>So, it did find the correct version of <strong>esapi</strong>, i.e., <code>1.2</code> but it is giving the same error. I have no idea what is happening here. What am I missing?</p>
  
  <p>This is the dependency:</p>
  
  <pre><code>        &lt;dependency&gt;
              &lt;groupId&gt;org.owasp.encoder&lt;/groupId&gt;
              &lt;artifactId&gt;encoder-esapi&lt;/artifactId&gt;
              &lt;version&gt;[1.2]&lt;/version&gt;
          &lt;/dependency&gt;
  </code></pre>
  
  <p>I have two questions regarding this,</p>
  
  <ol>
  <li>How do I solve the problem?</li>
  <li>The project is under development for the past 3 months with about 150+ commits and this error never showed up though <strong>ESAPI</strong> was added at a very early stage and every build worked without a problem. What made this error jump out all of a sudden?</li>
  </ol>
  
  <p>Thank you.</p>