Alexander Torstling
Alexander Torstling

Reputation: 18898

Java on demand build system

I have a vague memory that I've seen a build system for Java or some other JVM lang which you could run in continous mode (so to speak). This would make the build system run in the background, watching the source dir for changes. As soon as a source file changes, the build system kicks in and re-runs relevant parts of the build process to produce a fresh artifact.

Ring any bells?

Thanks

Upvotes: 1

Views: 312

Answers (3)

Alexander Torstling
Alexander Torstling

Reputation: 18898

I figured out that it was in fact sbt that I meant. There is another question here on SO relating to how to build Java projects: Use SBT to Build Pure Java Project. Thanks everyone for your help.

Upvotes: 0

Brian Agnew
Brian Agnew

Reputation: 272307

There are lots of engines that support continual checkouts/building/testing (e.g. Jenkins nee Hudson, CruiseControl, TeamCity etc.).

If you're looking at JVM languages other than Java, then (for example) the Maven Scala plugin supports continuous building and testing upon file changes. e.g.

$ mvn scala:cctest

will run the compile/test cycle in a loop watching for source changes and acting upon them.

If your build tool or language doesn't support this natively, it's trivial to write a shell script to watch a directory structure and execute another script/tool upon change. See this SO question for solutions.

Upvotes: 1

plasma147
plasma147

Reputation: 2211

Is it the gradle daemon?

This keeps gradle running in the background because it has long start up times - and scans the file system to identify when files change.

Upvotes: 2

Related Questions