Section A.4. Depending on a Plug-in


A.4. Depending on a Plug-in

It's possible to add a plug-in dependency in your project's POM. For example, to add a dependency to the JAR plug-in version 1.7, edit your project's project.xml and add:

<dependency>   <groupId>maven</groupId>   <artifactId>maven-jar-plugin</artifactId>   <version>1.7</version> </dependency>

If you execute a goal in this project, and if Version 1.7 of the JAR plug-in is not installed on your system, Maven will automatically download and install it. This makes it very easy to have builds that always work, even if you can't control what users have installed on their machines. This is the strategy that we used in the samples in this book and which you can find on http://www.mavenbook.org/svn/mdn/code.



Maven. A Developer's Notebook
Maven: A Developers Notebook (Developers Notebooks)
ISBN: 0596007507
EAN: 2147483647
Year: 2003
Pages: 125

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net