I'm trying to use a custom maven wagon extension to deploy a jar to my own repository. Can I somehow configure in settings.xml that it recognizes the custom url scheme to be used with the specific wagon or do I have to always modify pom files to contain the wagon extension?
There doesn't need to be a base pom or any pom available when using the deploy-file. Settings.xml is the only place which is guaranteed to be there, but I can't figure out how to use it to define extensions.
OK, ok, a correction: you cannot define the <build>
element inside a <profile>
defined in settings.xml
. You could activate the profile in settings.xml
, but define it in your base-pom
.
Sorry, the only other way I could think of (probably what are you looking for), is to copy the extension jar directly under $M2_HOME/lib
. All $M2_HOME/lib/*.jar
are put in the classpath, so this must virtually have the same effect as an <extension>
.
The extension however is better, because you can more easily control which version of the extension is used (e.g. trough the base-pom).
OK just try copying the extension jar under
$M2_HOME/lib