简体   繁体   中英

Maven builds on file changes

Is there anything already out there that would help with either / both of following?

  • Perform a Maven install when a file within that module changes
  • Perform a Maven install on the module and its dependencies if they have changed

I'm pretty sure I've heard of a Maven option to build dependencies as well but struggling to find anything from Googling...

Perhaps this isn't going to be Maven specific but instead involve a file watching tool that is OS specific, if so I would be interested in hearing about tools for Windows (XP).

Even though the answer comes late, I was looking for the same thing and I found https://github.com/rzymek/watcher-maven-plugin . Maybe someone else will be looking for the same thing.

I tried @Adrian's solution, but I couldn't get it working.

I found this maven package, https://github.com/fizzed/maven-plugins#watcher-fizzed-watcher-maven-plugin , that will watch for file changes, and I was able to get it working pretty quickly.

To building a module and its dependencies, use: mvn -pl :module -amd

Automated builds are usually triggered from a version system like subversion or git. Then you can use continuous integration tools like Jenkins.

There's also mvn reactor:make-scm-changes, which detects what modules have local changes vs. the configured scm system.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM