Reputation: 6878
Is there a way to let eclipse automatically run 'mvn install' when it builds a project (e.g. when a source file in the project is changed)?
My problem at the moment is that I have a large number of projects in eclipse, each of which is a Maven project as well. Projects depend on each other through Maven dependencies but are not parent/child projects.
My workaround is that I have a bash script running in the background which checks for changes in all directories for these projects and triggers 'mvn install' for every changed project. Unfortunately, this creates some problems since for some projects I have to call 'mvn clean' as well and this makes the eclipse projects unusable until I manually rebuild the project in eclipse (Maven -> Update Project ...).
Upvotes: 1
Views: 634
Reputation: 43023
Did you try Eclipse builders?
You may attach a builder to your different projects.
The builder will call your bash script each time its related project is built.
See the following article for reference: Non-Ant project builders
Upvotes: 1