You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Bashar Jawad <bj...@vmsinfo.com> on 2007/12/05 23:56:38 UTC

Best way to extend a plugin

Hi,

I want to make some modifications to the way release-plugin works. For
example I want to make some modifications to the way snapshots are
handled in the check-dependency-snapshots phase. I know I can just grab
the source code of maven-release and modify
CheckDependencySnapshotsPhase and install the plugin in the local
repository. My question is whether I can do this in a cleaner way
without modifying the source code of maven-release itself. For example
is it possible to write a new plugin where I  write a custom
CheckDependencySnapshotsPhase that extends AbstractReleasePhase and
binds it to the check-dependency-snapshots role in release-manager?  How
do I go about telling maven-release to use my new
CheckDependencySnapshotsPhase instead of the old one ?

Thanks,

Bashar


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


RE: Best way to extend a plugin

Posted by "Brian E. Fox" <br...@reply.infinity.nu>.
Unfortunately unless the release plugin was setup to load this as a
component, the only choice is to extend the source. Depending on a
plugin causes lots of bad things to happen so you can't really extend
it.

-----Original Message-----
From: Bashar Jawad [mailto:bjawad@vmsinfo.com] 
Sent: Wednesday, December 05, 2007 4:57 PM
To: dev@maven.apache.org
Subject: Best way to extend a plugin

Hi,

I want to make some modifications to the way release-plugin works. For
example I want to make some modifications to the way snapshots are
handled in the check-dependency-snapshots phase. I know I can just grab
the source code of maven-release and modify
CheckDependencySnapshotsPhase and install the plugin in the local
repository. My question is whether I can do this in a cleaner way
without modifying the source code of maven-release itself. For example
is it possible to write a new plugin where I  write a custom
CheckDependencySnapshotsPhase that extends AbstractReleasePhase and
binds it to the check-dependency-snapshots role in release-manager?  How
do I go about telling maven-release to use my new
CheckDependencySnapshotsPhase instead of the old one ?

Thanks,

Bashar


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org