title: Problem migrating Maven project to Gradle
body: <p>I have been trying to migrate a maven project I developed to gradle. I have encountered the following error when running</p>
  
  <pre><code>./gradlew clean build
  </code></pre>
  
  <p>Below is the error I am getting</p>
  
  <pre><code>Execution failed for task ':compileJava'.
  &gt; Could not resolve all files for configuration ':compileClasspath'.
  &gt; Could not resolve com.fasterxml:classmate:1.3.4.
   Required by:
       project : &gt; org.springframework.boot:spring-boot-starter-web:2.1.1.RELEASE &gt; org.hibernate.validator:hibernate-validator:6.0.13.Final
       project : &gt; org.springframework.boot:spring-boot-starter-data-jpa:2.1.1.RELEASE &gt; org.hibernate:hibernate-core:5.3.7.Final
    &gt; Could not resolve com.fasterxml:classmate:1.3.4.
       &gt; Could not get resource 'http://repo.maven.apache.org/maven2/com/fasterxml/classmate/1.3.4/classmate-1.3.4.pom'.
          &gt; Could not HEAD 
  'http://repo.maven.apache.org/maven2/com/fasterxml/classmate/1.3.4/classmate-1.3.4.pom'. 
  Received status code 501 from server: HTTPS Required
  &gt; Could not resolve net.bytebuddy:byte-buddy:1.8.17.
   Required by:
       project : &gt; org.springframework.boot:spring-boot-starter-data-jpa:2.1.1.RELEASE &gt; org.hibernate:hibernate-core:5.3.7.Final
    &gt; Skipped due to earlier error
    &gt; Could not resolve org.apache.tomcat:tomcat-annotations-api:9.0.13.
   Required by:
       project : &gt; org.springframework.boot:spring-boot-starter-tomcat:2.1.1.RELEASE &gt; org.apache.tomcat.embed:tomcat-embed-core:9.0.13
    &gt; Skipped due to earlier error
  </code></pre>
  
  <p>Below is my pom.xml</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;project&lt;/groupId&gt;
  &lt;artifactId&gt;FantasyAnalysis&lt;/artifactId&gt;
  &lt;packaging&gt;war&lt;/packaging&gt;
  &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
  &lt;name&gt;FantasyAnalysis Maven Webapp&lt;/name&gt;
  &lt;url&gt;http://maven.apache.org&lt;/url&gt;
  &lt;parent&gt;
      &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
      &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
      &lt;version&gt;2.1.1.RELEASE&lt;/version&gt;
  &lt;/parent&gt;
  &lt;properties&gt;
      &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
      &lt;java.version&gt;1.8&lt;/java.version&gt;
  &lt;/properties&gt;
  &lt;dependencies&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;junit&lt;/groupId&gt;
      &lt;artifactId&gt;junit&lt;/artifactId&gt;
      &lt;scope&gt;test&lt;/scope&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.springframework&lt;/groupId&gt;
      &lt;artifactId&gt;spring-webmvc&lt;/artifactId&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.springframework&lt;/groupId&gt;
      &lt;artifactId&gt;spring-context&lt;/artifactId&gt;
      &lt;/dependency&gt; 
  &lt;dependency&gt;
      &lt;groupId&gt;org.springframework&lt;/groupId&gt;
      &lt;artifactId&gt;spring-context-support&lt;/artifactId&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.springframework&lt;/groupId&gt;
      &lt;artifactId&gt;spring-beans&lt;/artifactId&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;2.5&lt;/version&gt;
      &lt;scope&gt;provided&lt;/scope&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.springframework&lt;/groupId&gt;
      &lt;artifactId&gt;spring-jdbc&lt;/artifactId&gt;
      &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
      &lt;artifactId&gt;jstl&lt;/artifactId&gt;
      &lt;scope&gt;provided&lt;/scope&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.springframework&lt;/groupId&gt;
      &lt;artifactId&gt;spring-test&lt;/artifactId&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.springframework&lt;/groupId&gt;
      &lt;artifactId&gt;spring-core&lt;/artifactId&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.springframework&lt;/groupId&gt;
      &lt;artifactId&gt;spring-orm&lt;/artifactId&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
      &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
      &lt;artifactId&gt;spring-boot-devtools&lt;/artifactId&gt;
      &lt;scope&gt;runtime&lt;/scope&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
      &lt;artifactId&gt;spring-boot-starter-data-jpa&lt;/artifactId&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
      &lt;artifactId&gt;spring-boot-starter-security&lt;/artifactId&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;mysql&lt;/groupId&gt;
      &lt;artifactId&gt;mysql-connector-java&lt;/artifactId&gt;
      &lt;scope&gt;runtime&lt;/scope&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
      &lt;artifactId&gt;spring-boot-starter-tomcat&lt;/artifactId&gt;
      &lt;scope&gt;provided&lt;/scope&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
      &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;
      &lt;scope&gt;test&lt;/scope&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.springframework.security&lt;/groupId&gt;
      &lt;artifactId&gt;spring-security-test&lt;/artifactId&gt;
      &lt;scope&gt;test&lt;/scope&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.webjars&lt;/groupId&gt;
      &lt;artifactId&gt;bootstrap-datepicker&lt;/artifactId&gt;
      &lt;version&gt;1.0.1&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.webjars&lt;/groupId&gt;
      &lt;artifactId&gt;jquery&lt;/artifactId&gt;
      &lt;version&gt;1.9.1&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;com.h2database&lt;/groupId&gt;
      &lt;artifactId&gt;h2&lt;/artifactId&gt;
      &lt;scope&gt;runtime&lt;/scope&gt;
  &lt;/dependency&gt;   
  &lt;dependency&gt;
      &lt;groupId&gt;javax.mail&lt;/groupId&gt;
      &lt;artifactId&gt;javax.mail-api&lt;/artifactId&gt;
  &lt;/dependency&gt;   
  &lt;dependency&gt;
      &lt;groupId&gt;javax.mail&lt;/groupId&gt;
      &lt;artifactId&gt;mail&lt;/artifactId&gt;
      &lt;version&gt;1.4.7&lt;/version&gt;
  &lt;/dependency&gt;   
  &lt;dependency&gt;
      &lt;groupId&gt;org.apache.tomcat.embed&lt;/groupId&gt;
      &lt;artifactId&gt;tomcat-embed-jasper&lt;/artifactId&gt;
      &lt;scope&gt;provided&lt;/scope&gt;
  &lt;/dependency&gt;
  &lt;/dependencies&gt;
  &lt;build&gt;
  &lt;finalName&gt;FantasyAnalysis&lt;/finalName&gt;
  &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
          &lt;/plugin&gt;
  &lt;/plugins&gt;
  &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>Below is my build.gradle</p>
  
  <pre><code>plugins {
  id 'java'
  id 'maven'
  id 'war'
  }
  
  repositories {
  mavenLocal()
  maven {
      url = 'http://repo.maven.apache.org/maven2'
  }
  }
  
  dependencies {
  compile 'org.springframework:spring-webmvc:5.1.3.RELEASE'
  compile 'org.springframework:spring-context:5.1.3.RELEASE'
  compile 'org.springframework:spring-context-support:5.1.3.RELEASE'
  compile 'org.springframework:spring-beans:5.1.3.RELEASE'
  compile 'org.springframework:spring-jdbc:5.1.3.RELEASE'
  compile 'org.springframework:spring-test:5.1.3.RELEASE'
  compile 'org.springframework:spring-core:5.1.3.RELEASE'
  compile 'org.springframework:spring-orm:5.1.3.RELEASE'
  compile 'org.springframework.boot:spring-boot-starter-web:2.1.1.RELEASE'
  compile 'org.springframework.boot:spring-boot-starter-data-jpa:2.1.1.RELEASE'
  compile 'org.springframework.boot:spring-boot-starter-security:2.1.1.RELEASE'
  compile 'org.webjars:bootstrap-datepicker:1.0.1'
  compile 'org.webjars:jquery:1.9.1'
  compile 'javax.mail:javax.mail-api:1.6.2'
  compile 'javax.mail:mail:1.4.7'
  runtime 'org.springframework.boot:spring-boot-devtools:2.1.1.RELEASE'
  runtime 'mysql:mysql-connector-java:8.0.13'
  runtime 'com.h2database:h2:1.4.197'
  testCompile 'junit:junit:4.12'
  testCompile 'org.springframework.boot:spring-boot-starter-test:2.1.1.RELEASE'
  testCompile 'org.springframework.security:spring-security-test:5.1.2.RELEASE'
  providedCompile 'javax.servlet:servlet-api:2.5'
  providedCompile 'javax.servlet:jstl:1.2'
  providedCompile 'org.springframework.boot:spring-boot-starter-tomcat:2.1.1.RELEASE'
  providedCompile 'org.apache.tomcat.embed:tomcat-embed-jasper:9.0.13'
  }
  group = 'project'
  version = '0.0.1-SNAPSHOT'
  description = 'FantasyAnalysis Maven Webapp'
  sourceCompatibility = '1.8'
  tasks.withType(JavaCompile) {
  options.encoding = 'UTF-8'
  }
  </code></pre>
  
  <p>Any ideas as to how to fix the error? I am new to gradle and don't have much experience with it. Any help appreciated</p>