I am working on a grails project I've been away from for a few months and it failed to run with the following error
Project : declares a dependency from configuration 'compile' to configuration 'default' which is not declared in the descriptor for project :project-plugin-a.
After spending some time I realized the submodule directory was empty, because when I did the update, I never included the init tag to set up new submodules. I looked at the documentation for submodule update and the --init tag has the following:
--init This option is only valid for the update command. Initialize all submodules for which "git submodule init" has not been called so far before updating.
For the purpose of creating hassle free documentation for others working on these projects, is there any reason not to recommend always using the --init tag?
Provided by Torek in a comment above:
In a previous job, we stuck the --init in to some automated stuff and never had any problems with it. The only reason to avoid it that I know of would be if you don't want the submodule checked out automatically
The init by documentation and experience seems to safely skip any additional processing and function as without the flag if there is no new submodules, but will pull new submodules is present, so it can be used every time.