I wrote a custom maven plugin that scaffolds java-code from a custom schema.
The project-structure is like this:
Project + plugin + web-application The reactor compiles first the plugin, then the application.
The usual mvn-command is:
mvn ... who is triggering the <defaultGoal>plugin:scaffold package</defaultGoal>
On fresh machines the build fails because the plugin is not yet known at the time the reactor plan the build-phases. So I have to call mvn install first. Then mvn plugin:scaffold package works like a charm.
The problem is: Whenever I modify the scaffolder-plugin and call mvn plugin:scaffold package the modifications of the scaffolder-plugin is not yet used because it is not yet installed into the repository. So I have to call mvn install first again.
Is there a way to:
- Install the modification to the plugin
- Build the webapplication using the modifications of the plugin
in one step?
installphase contains thepackagephase. You you really need theinstallphase before running your plugin or iscompilesufficient? If it is, you can usemvn compile plugin:scaffold packageor define your phase to require thecompilephase.mvn plugin:scaffold package -Uwhere the-Uflag updates dependencies