title: Spring boot It is indirectly referenced from required .class files
body: <p>I've added the following in my repository</p>
  
  <pre><code>@Repository
  public interface ReceiptRepository extends JpaRepository&lt;Receipt, Integer&gt;, QueryDslPredicateExecutor&lt;Receipt&gt;{
      public Page&lt;Receipt&gt; findForCriteria(Predicate predicate, Pageable p);
  }
  </code></pre>
  
  <p><strong>QueryDslPredicateExecutor</strong> I'm importing </p>
  
  <pre><code>import org.springframework.data.querydsl.QueryDslPredicateExecutor;
  </code></pre>
  
  <p>and for the <strong>predicate</strong> I'm importing (which I'm not sure if it's the correct one or not)</p>
  
  <pre><code>import org.springframework.cglib.core.Predicate;
  </code></pre>
  
  <p>but at my package name I get an error message saying</p>
  
  <pre><code>Multiple markers at this line
  - The type com.querydsl.core.types.Predicate cannot be resolved. It is indirectly referenced from required .class 
   files
  - The type com.querydsl.core.types.OrderSpecifier cannot be resolved. It is indirectly referenced from 
   required .class files
  </code></pre>
  
  <p>my assumption is that there 2 different jar files having the same package names. Is that correct? If yes then how can I remove one ?</p>
  
  <p>here is my pom.xml dependencies</p>
  
  <pre><code>    &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.googlecode.json-simple&lt;/groupId&gt;
          &lt;artifactId&gt;json-simple&lt;/artifactId&gt;
          &lt;version&gt;1.1.1&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.amazonaws&lt;/groupId&gt;
          &lt;artifactId&gt;aws-java-sdk-s3&lt;/artifactId&gt;
          &lt;version&gt;1.11.60&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.resthub&lt;/groupId&gt;
          &lt;artifactId&gt;springmvc-router&lt;/artifactId&gt;
          &lt;version&gt;1.2.0&lt;/version&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-web&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-test&lt;/artifactId&gt;
          &lt;scope&gt;test&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-velocity&lt;/artifactId&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  </code></pre>
  
  <p>Any idea how to fix this?</p>