Hi Gary, > I'm trying to patch a third-party plugin at the moment as a temporary > workaround for a problem. (I don't want to get into details because > it's not important)
Since the workaround is temporary, could you not simply clone the plugin's SCM repository to a local Git repository, then create a branch with your changes? Then rebuild the plugin whenever you like and use it. No need for all the hoop-jumping it sounds like you're doing now... Regards, Curtis On Mon, Mar 23, 2015 at 5:41 PM, Gary Kennedy <g...@apnic.net> wrote: > I'm trying to patch a third-party plugin at the moment as a temporary > workaround for a problem. (I don't want to get into details because it's > not important) > > So I currently have a 'patch project' that depends on the plugin, uses the > maven-dependency-plugin to unpack the dependant plugin (without the > replacement files), contains the replacement files, does some replacer > magic on the extracted plugin.xml to fixup the version/etc, and then > package it all. > > This all works fine, in that the new project jar is a good content copy of > the old plugin with all the changes needed. > > However, when using the new plugin, several dependency errors occur. > (i.e., the dependencies of the old plugin are not pulled in). > > This confused me for a while because the maven plugin.xml file correctly > lists all the dependencies. After a bit more playing around I worked out > that this is because the plugin dependency resolution comes from the > plugins pom.xml and NOT the plugin.xml file. > > So my main question for the group is: How/Can I, at build time, add the > dependency (and properties, if possible) section from the old plugin pom > into my new plugin's artefact pom? (So not the project pom itself, but the > one written to the maven repository) > > And because I'm curious, does anyone know, > a) why the plugin.xml contains the dependencies if they are not used? > or b) why the pom.xml is used instead of the plugin.xml to resolve > dependencies? (I suspect aether + coding simplicity for this one) > > Cheers, > Gary > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > >