I use the maven invoker plugin for this, by parameterizing a pom so that I can substitute various versions. By using the 'pom dependency' thing, you could perhaps do this for entire dependencies as opposed to versions. Or you could script pom editing; there are XML-editing Maven plugin and ant plugins out there.
On Fri, Oct 11, 2013 at 2:45 PM, sizu <[email protected]> wrote: > Example using sed: > > sed > 's/<dependencies>/<dependencies>\r\n\r\n<dependency>\r\n<groupId>org.ghost4j<\/groupId>\r\n<artifactId>ghost4j<\/artifactId>\r\n<version>0.5.0<\/version>\r\n<\/dependency>\r\n/g' > pom.xml > pom2.xml > > Replaces the dependencies tag with the dependencies tag followed by the new > dependency (inserts the new dependency first in the list. > > Creates a new file pom2.xml with the new dependency (this can be changed to > overwrite the original file using: pom.xml > pom.xml > > > > -- > View this message in context: > http://maven.40175.n5.nabble.com/Is-there-any-maven-plugin-to-add-dependency-to-existing-pom-xml-tp2839092p5772863.html > Sent from the Maven - Users mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
