1

I have a couple of threads open as I struggle to create a plugin that will install into another project. I have had some help, but I now realise part of my attempts to resolve are guesswork, and part of the guessing game is that I'm not completely clear as to the meaning of build, test etc. Here is my guess:

build - build the war file

runtime - running on the target platform, maybe run-app as well

compile - compiling Groovy/Java

test - running test-app

provided - not really sure

Some of these scopes also include others, but from what I have seen in some SO answers, there is some confusion over this. I think a clear definition of scopes with examples and meanings is missing from the User Guide. Is that a fair observation?

doelleri
  • 19,232
  • 5
  • 61
  • 65
John Ormerod
  • 117
  • 9
  • See http://stackoverflow.com/questions/8751508/grails-buildconfig-groovy-difference-between-build-compile-and-runtime – doelleri Feb 15 '13 at 18:03
  • doelleri. Thanks for responding. I have this bookmarked and have studied it - several times! But, still find I don't have a clear picture. For example, does _build_ mean when you are building a war file, or just for run-app, test-app, compile, or both? My experience tells me that there is some background info that I just don't know, but is assumed to be known. On the face of it, this ought to be quite straight forward. Hope you can help a bit further. John – John Ormerod Feb 15 '13 at 19:14
  • http://groovyc.net/?p=5 – Tomas Lin Feb 16 '13 at 22:16

1 Answers1

2
  • Build - Only used by build system. Not distributed in your war. Not available to your code for compilation
  • Runtime - required for running app, distributed with your war.
  • Compile - required for compilation, distributed with your war
  • Test - required for compiling and running tests only, not distributed with your war
  • Provided - required for compilation but NOT distributed with your war -- this is useful for an appserver that might include the dependency in a common folder and cause classpath problems if you distribute a different version (some versions tomcat have this issue with log4j)

NOTE - these aren't really grails specific, they come from maven

Rick Mangi
  • 3,761
  • 1
  • 14
  • 17
  • Rick. I would, but I haven't managed to find something to click for 'accepted'! Daft, I know, but as Pooh bear said, the more I look, the more it isn't there. I feel a 'Duh' moment coming on... – John Ormerod Feb 19 '13 at 09:32