title: Building Hibernate from sources fails using "gradlew build"
body: <p>I would like to investigate multiple Hibernate issues, so I want to add test cases to the project as recommended here:</p>
  <p><a href="https://in.relation.to/2018/06/04/best-way-write-hibernate-orm-issue-test-case/" rel="nofollow noreferrer">https://in.relation.to/2018/06/04/best-way-write-hibernate-orm-issue-test-case/</a></p>
  <ol>
  <li>I forked the Hibernate repo <a href="https://github.com/hibernate/hibernate-orm" rel="nofollow noreferrer">https://github.com/hibernate/hibernate-orm</a> to my own one</li>
  <li>I used the fork URL to connect to that repo from Eclipse (GIT perspective, <code>Ctrl+V</code>)</li>
  <li>I imported the Gradle project into Eclipse from where I locally saved the GIT repo</li>
  <li>I opened an Eclipse terminal (dir <code>C:\projects\hibernate-orm</code>)</li>
  <li>Execute <code>gradlew build</code> from that dir, see below</li>
  </ol>
  <p>This fails with</p>
  <pre><code>C:\projects\hibernate-orm&gt;gradlew build
  [WARN] Skipping Java module path integration tests because the JDK does not support it
  
  &gt; Configure project :hibernate-agroal
  Maven settings.xml file did not exist : C:\Users\Kawu\.m2\settings.xml
  
  &gt; Configure project :hibernate-c3p0
  Maven settings.xml file did not exist : C:\Users\Kawu\.m2\settings.xml
  
  &gt; Configure project :hibernate-core
  Maven settings.xml file did not exist : C:\Users\Kawu\.m2\settings.xml
  
  &gt; Configure project :hibernate-enhance-maven-plugin
  Maven settings.xml file did not exist : C:\Users\Kawu\.m2\settings.xml
  
  &gt; Configure project :hibernate-envers
  Maven settings.xml file did not exist : C:\Users\Kawu\.m2\settings.xml
  
  &gt; Configure project :hibernate-graalvm
  Maven settings.xml file did not exist : C:\Users\Kawu\.m2\settings.xml
  
  &gt; Configure project :hibernate-gradle-plugin
  Maven settings.xml file did not exist : C:\Users\Kawu\.m2\settings.xml
  
  &gt; Configure project :hibernate-hikaricp
  Maven settings.xml file did not exist : C:\Users\Kawu\.m2\settings.xml
  
  &gt; Configure project :hibernate-jcache
  Maven settings.xml file did not exist : C:\Users\Kawu\.m2\settings.xml
  
  &gt; Configure project :hibernate-jpamodelgen
  Maven settings.xml file did not exist : C:\Users\Kawu\.m2\settings.xml
  
  &gt; Configure project :hibernate-osgi
  Maven settings.xml file did not exist : C:\Users\Kawu\.m2\settings.xml
  
  &gt; Configure project :hibernate-proxool
  Maven settings.xml file did not exist : C:\Users\Kawu\.m2\settings.xml
  
  &gt; Configure project :hibernate-spatial
  Maven settings.xml file did not exist : C:\Users\Kawu\.m2\settings.xml
  
  &gt; Configure project :hibernate-testing
  Maven settings.xml file did not exist : C:\Users\Kawu\.m2\settings.xml
  
  &gt; Configure project :hibernate-vibur
  Maven settings.xml file did not exist : C:\Users\Kawu\.m2\settings.xml
  
  &gt; Configure project :hibernate-ehcache
  Maven settings.xml file did not exist : C:\Users\Kawu\.m2\settings.xml
  
  &gt; Configure project :hibernate-entitymanager
  Maven settings.xml file did not exist : C:\Users\Kawu\.m2\settings.xml
  
  &gt; Configure project :hibernate-infinispan
  Maven settings.xml file did not exist : C:\Users\Kawu\.m2\settings.xml
  
  &gt; Configure project :hibernate-java8
  Maven settings.xml file did not exist : C:\Users\Kawu\.m2\settings.xml
  
  &gt; Task :hibernate-core:compileTestJava
  C:\projects\hibernate-orm\hibernate-core\src\test\java\org\hibernate\query\hhh12076\AnnotationMappingJoinClassTest.java:46: error: duplicate class: org.hibernate.query.hhh12076.AnnotationMappingJoinClassTest
  public class AnnotationMappingJoinClassTest extends BaseCoreFunctionalTestCase {
         ^
  C:\projects\hibernate-orm\hibernate-core\src\test\java\org\hibernate\query\hhh12076\Claim.java:15: error: duplicate class: org.hibernate.query.hhh12076.Claim
  public class Claim {
         ^
  C:\projects\hibernate-orm\hibernate-core\src\test\java\org\hibernate\query\hhh12076\EwtAssessmentExtension.java:9: error: duplicate class: org.hibernate.query.hhh12076.EwtAssessmentExtension
  public class EwtAssessmentExtension extends SettlementExtension {
         ^
  C:\projects\hibernate-orm\hibernate-core\src\test\java\org\hibernate\query\hhh12076\Extension.java:11: error: duplicate class: org.hibernate.query.hhh12076.Extension
  public abstract class Extension {
  
  ...
  
  C:\projects\hibernate-orm\hibernate-core\src\test\java\org\hibernate\query\hhh12225\VehicleContract.java:12: error: duplicate class: org.hibernate.query.hhh12225.VehicleContract
  public class VehicleContract extends Contract {
         ^
  C:\projects\hibernate-orm\hibernate-core\src\test\java\org\hibernate\query\hhh12225\VehicleTrackContract.java:9: error: duplicate class: org.hibernate.query.hhh12225.VehicleTrackContract
  public class VehicleTrackContract extends VehicleContract {
         ^
  C:\projects\hibernate-orm\hibernate-core\src\test\java\org\hibernate\query\hhh13670\HHH13670Test.java:32: error: duplicate class: org.hibernate.query.hhh13670.HHH13670Test
  public class HHH13670Test extends BaseCoreFunctionalTestCase {
         ^
  C:\projects\hibernate-orm\hibernate-core\src\test\java\org\hibernate\query\hhh13712\HHH13712Test.java:32: error: duplicate class: org.hibernate.query.hhh13712.HHH13712Test
  public class HHH13712Test extends BaseCoreFunctionalTestCase {
         ^
  
  ...
  
    symbol:   class Customer_
    location: package org.hibernate.jpa.test.metamodel
  C:\projects\hibernate-orm\hibernate-core\src\test\java\org\hibernate\jpa\test\criteria\basic\PredicateTest.java:23: error: cannot find symbol
  import org.hibernate.jpa.test.metamodel.Order_;
                                         ^
    symbol:   class Order_
    location: package org.hibernate.jpa.test.metamodel
  C:\projects\hibernate-orm\hibernate-core\src\test\java\org\hibernate\jpa\test\criteria\ManipulationCriteriaTest.java:23: error: cannot find symbol
  import org.hibernate.jpa.test.metamodel.Customer_;
                                         ^
    symbol:   class Customer_
    location: package org.hibernate.jpa.test.metamodel
  C:\projects\hibernate-orm\hibernate-core\src\test\java\org\hibernate\jpa\test\criteria\mapjoin\MapJoinTest.java:18: error: cannot find symbol
  import org.hibernate.jpa.test.metamodel.MapEntityLocal_;
                                         ^
    symbol:   class MapEntityLocal_
    location: package org.hibernate.jpa.test.metamodel
  C:\projects\hibernate-orm\hibernate-core\src\test\java\org\hibernate\jpa\test\criteria\mapjoin\MapJoinTest.java:19: error: cannot find symbol
  import org.hibernate.jpa.test.metamodel.MapEntity_;
                                         ^
    symbol:   class MapEntity_
    location: package org.hibernate.jpa.test.metamodel
  C:\projects\hibernate-orm\hibernate-core\src\test\java\org\hibernate\jpa\test\criteria\OnKeywordTest.java:16: error: cannot find symbol
  import org.hibernate.jpa.test.metamodel.LineItem_;
                                         ^
    symbol:   class LineItem_
    location: package org.hibernate.jpa.test.metamodel
  C:\projects\hibernate-orm\hibernate-core\src\test\java\org\hibernate\jpa\test\criteria      symbol:   variable Order_
    location: class PredicateTest
  C:\projects\hibernate-orm\hibernate-core\src\test\java\org\hibernate\jpa\test\criteria\basic\PredicateTest.java:260: error: cannot find symbol
                  Path&lt;Integer&gt; integerPath = orderRoot.get( Order_.customer ).get( Customer_.age );
                                                                                    ^
    symbol:   variable Customer_
    location: class PredicateTest
  C:\projects\hibernate-orm\hibernate-core\src\test\java\org\hibernate\jpa\test\criteria\basic\PredicateTest.java:260: error: cannot find symbol
                  Path&lt;Integer&gt; integerPath = orderRoot.get( Order_.customer ).get( Customer_.age );
                                                             ^
    symbol:   variable Order_
    location: class PredicateTest
  C:\projects\hibernate-orm\hibernate-core\src\test\java\org\hibernate\jpa\test\criteria\basic\PredicateTest.java:285: error: cannot find symbol
                          criteriaQuery.where( builder.isFalse( root.get( CreditCard_.approved ) ) );
                                                                          ^
  
                                   ^
    symbol:   variable Order_
    location: class CriteriaToScrollableResultsFetchTest
  C:\projects\hibernate-orm\hibernate-core\src\test\java\org\hibernate\jpa\test\criteria\fetchscroll\CriteriaToScrollableResultsFetchTest.java:178: error: cannot find symbol
                  predicates.add( idPath.get( OrderLineId_.purchaseOrgId ).in( ids ) );
  
  
  ...
  
  
    symbol:   variable Customer_
    location: class ManipulationCriteriaTest
  C:\projects\hibernate-orm\hibernate-core\src\test\java\org\hibernate\jpa\test\criteria\ManipulationCriteriaTest.java:169: error: cannot find symbol
                                  root.fetch( Customer_.spouse );
                                              ^
    symbol:   variable Customer_
    location: class ManipulationCriteriaTest
  C:\projects\hibernate-orm\hibernate-core\src\test\java\org\hibernate\jpa\test\criteria\ManipulationCriteriaTest.java:196: error: cannot find symbol
                  subCriteria.select( builder.avg( subQueryCustomerRoot.get( Customer_.age ) ) );
                                                                             ^
    symbol:   variable Customer_
    location: class ManipulationCriteriaTest
  C:\projects\hibernate-orm\hibernate-core\src\test\java\org\hibernate\jpa\test\criteria\ManipulationCriteriaTest.java:201: error: cannot find symbol
                                                  customerRoot.get( Customer_.age ),
                                                                    ^
    symbol:   variable Customer_
    location: class ManipulationCriteriaTest
  C:\projects\hibernate-orm\hibernate-core\src\test\java\org\hibernate\jpa\test\criteria\mapjoin\MapJoinEntryTest.java:53: error: cannot find symbol
                          MapJoin&lt;Customer, String, CustomerOrder&gt; orderMap = customer.join( Customer_.orderMap );
                                                                                             ^
    symbol:   variable Customer_
    location: class MapJoinEntryTest
  C:\projects\hibernate-orm\hibernate-core\src\test\java\org\hibernate\jpa\test\criteria\mapjoin\MapJoinTest.java:37: error: cannot find symbol
                  MapJoin&lt;MapEntity, String, MapEntityLocal&gt; cname = entity.join(MapEntity_.localized);
                                                                                 ^
    symbol:   variable MapEntity_
    location: class MapJoinTest
  Note: Some input files use or override a deprecated API.
  Note: Recompile with -Xlint:deprecation for details.
  Note: Some input files use unchecked or unsafe operations.
  Note: Recompile with -Xlint:unchecked for details.
  100 errors
  
  &gt; Task :hibernate-core:compileTestJava FAILED
  
  FAILURE: Build failed with an exception.
  
  * What went wrong:
  Execution failed for task ':hibernate-core:compileTestJava'.
  &gt; Compilation failed; see the compiler error output for details.
  
  * Try:
  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
  
  * Get more help at https://help.gradle.org
  
  Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
  Use '--warning-mode all' to show the individual deprecation warnings.
  See https://docs.gradle.org/6.5.1/userguide/command_line_interface.html#sec:command_line_warnings
  
  BUILD FAILED in 12s
  16 actionable tasks: 3 executed, 13 up-to-date
  
  C:\projects\hibernate-orm&gt;
  </code></pre>
  <p><strong>QUESTION</strong>:</p>
  <p>Why is this failing out-of-the-box?</p>
  <p>I see there are a lot of metamodel classes involved etc.</p>
  <p>Do I really have to cleanup (delete) the respective files?</p>
  <p>What am I doing wrong? Any commands I'm missing? I'm feeling really stupid right now...</p>