-
Notifications
You must be signed in to change notification settings - Fork 80
Watching for module changes
While developing code in MarkLogic, you ideally want a cycle of:
- Create or modify a module
- Test it, either manually or via an automated test
That is - ideally, you don't need to take any action to load the new/modified module into your modules database.
To support this cycle, ml-gradle features a task named mlWatch that will load new/modified modules as you create/modify them. It checks every second for any such modules, so you have at most a one second delay.
mlWatch will also tell you what it's loading when you use the Gradle "-i" or "--info" flag, so it's best to run it as:
gradle -i mlWatch
In version 3.1.0 of ml-gradle, you can also tell mlWatch to ignore any files that are "dirty" - i.e. ones that have been created/modified since modules were last loaded. mlWatch will then only load modules that are created/modified after mlWatch starts watching:
gradle -i mlWatch -PignoreDirty=true
Also see Loading modules with static checking for support for statically checking modules as they're loaded.