Grails BuildConfig.groovy, difference between build, compile, and runtime?

  • build – dependency that is only needed by the build process
  • runtime – dependency that is needed to run the application, but not compile it e.g. JDBC implementation for specific database vendor. This would not typically be needed at compile-time because code depends only the JDBC API, rather than a specific implementation thereof
  • compile – dependency that is needed at both compile-time and runtime. This is the most common case

There are a couple of other dependency scopes:

  • test – dependency that is only needed by the tests, e.g. a mocking/testing library
  • provided – dependency that is needed at compile-time but should not be packaged with the app (usually because it is provided by the container). An example is the Servlet API

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)