title: Springboot Gradle Plugin not working with Eclipse
body: <h3>THE problem</h3>
  
  <p>My java project doesn't run in Eclipse when I use this springboot plugin <a href="https://github.com/spring-projects/spring-boot/tree/master/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin" rel="nofollow noreferrer">springboot-gradle-plugin</a><br>
  It throws this exception</p>
  
  <pre><code>Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
  [2020-02-09 15:45:27.825] - 12256 GRAVE [main] --- org.springframework.boot.diagnostics.LoggingFailureAnalysisReporter: 
  
  ***************************
  APPLICATION FAILED TO START
  ***************************
  
  Description:
  
  Constructor in com.example.demo.VersionController required a bean of type 'org.springframework.boot.info.BuildProperties' that could not be found.
      - Bean method 'buildProperties' in 'ProjectInfoAutoConfiguration' not loaded because @ConditionalOnResource did not find resource '${spring.info.build.location:classpath:META-INF/build-info.properties}'
  </code></pre>
  
  <h3>A sample project with the issue</h3>
  
  <p>A sample repository with this issue can be found here:<a href="https://github.com/EspinolaAbel/spring-boot-gradle-plugin-issue" rel="nofollow noreferrer">springboot-gradle-plugin-issue</a><br>
  To see this issue you need to run this project with Eclipse (I run it with eclipse 2019-09)</p>
  
  <h3>What this project does</h3>
  
  <p>This java project uses gradle with this plugin <a href="https://github.com/spring-projects/spring-boot/tree/master/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin" rel="nofollow noreferrer">spring-boot-gradle-plugin</a>.<br>
  This project prints in console the application version declared in my build.gradle file.
  In my gradle.build file I include this lines:</p>
  
  <pre><code>springBoot {
      buildInfo()
  }
  </code></pre>
  
  <p>This lines all it does is adds a Gradle Task called '<em>bootBuildInfo</em>' into gradle and while running this task it creates this file <em>META-INF/build-info.properties</em>.<br>
  In Java, when running the App, springboot automatically loads and reads <em>META-INF/build-info.properties</em> to create a bean.<br><br></p>
  
  <h3>The problem with Eclipse</h3>
  
  <p>All this works when I build with gradle in a terminal and run the generated jar file, but it does not work when I run my application through Eclipse.<br>
  <strong>It doesn't create the file <em>META-INF/build-info.properties</em> and when springboot tries to load it up throws a bean not found exception because it couldn't find the file.</strong></p>
  
  <h3>Workarounds found</h3>
  
  <p>The project will run if I do one of the followings:<br>
  - manually create META-INF/build-info.properties under src/main/resources folder<br>
  - manually create META-INF/build-info.properties under build/resources/main folder<br></p>
  
  <p>None of this aproaches are desired because it doesn't updates build-info.properties automatically</p>