You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by tr...@apache.org on 2005/09/23 01:27:59 UTC
svn commit: r291037 - /maven/maven-1/core/trunk/xdocs/using/bestpractices.xml
Author: trygvis
Date: Thu Sep 22 16:27:56 2005
New Revision: 291037
URL: http://svn.apache.org/viewcvs?rev=291037&view=rev
Log:
o Adding a 'getting ready to maven 2' section.
Modified:
maven/maven-1/core/trunk/xdocs/using/bestpractices.xml
Modified: maven/maven-1/core/trunk/xdocs/using/bestpractices.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/core/trunk/xdocs/using/bestpractices.xml?rev=291037&r1=291036&r2=291037&view=diff
==============================================================================
--- maven/maven-1/core/trunk/xdocs/using/bestpractices.xml (original)
+++ maven/maven-1/core/trunk/xdocs/using/bestpractices.xml Thu Sep 22 16:27:56 2005
@@ -225,6 +225,27 @@
artifact of its own, and depend on that from your other projects.</li>
</ul>
</subsection>
+ <subsection name="Getting ready for Maven 2">
+ <p>
+ <b>Dependency Scopes:</b> Maven 2 has a concept of
+ <it><a href="maven2/dependency-mechanism.html#dependency_scope">scopes</a></it> which are used to control
+ when and where the dependencies are used in terms of e.g. the compile, test and runtime class paths. Maven
+ 1 doesn't have this concept but it's still useful for include this information when adding dependencies to
+ your project. It will be useful when you (possibly) convert your project to Maven 2 and if your repository
+ is ever converted to a Maven 2 repository the Maven 2 POMs will include dependencies with the correct scope.
+ </p>
+ <p>
+ To set the scope on your dependency use the <it>scope</it> tag like this:
+ <source><![CDATA[<dependency>
+ <groupId>foo</groupId>
+ <artifactId>bar</artifactId>
+ <version>1.0</version>
+ <properties>
+ <scope>test</scope>
+ </properties>
+</dependency>]]></source>
+ </p>
+ </subsection>
</section>
</body>
</document>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org