Reputation: 3321
I would like to use the "deploy"-phase of maven to deploy some files to my appliance (using a custom maven plugin), but I don't need the maven-deploy-plugin.
There are several answers on stackoverflow and the rest of the web on how to avoid a plugin being run, for example:
I have tried setting <phase>none
, <skip>true
and <inherited>false
. However, the plugin is still configured, which fails with message:
failed to configure plugin parameters for org.apache.maven.plugins maven-deploy-plugin 2.4
because there is no distributionManagement-element in my pom.
Is there a way to completely remove the dependency-plugin from the maven lifecycle?
Upvotes: 1
Views: 83
Reputation: 32717
In my opinion, this is unlikely to work even with those workarounds simply because the maven-deploy-plugin
is a core plugin, like it or not.
Therefore, here's another hack:
Create a profile.
Define your plugin in it and attach it to the install
phase.
Trigger the deployment, by invoking your profile.
Not as fancy as you would have hoped for, but it should do the trick. If anyone has better ideas, I would also like to hear them, as I've faced this sort of issue as well.
Upvotes: 1