You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ah...@apache.org on 2005/10/17 00:18:11 UTC

svn commit: r322519 - /maven/maven-1/core/trunk/xdocs/using/developing-plugins.xml

Author: aheritier
Date: Sun Oct 16 15:18:04 2005
New Revision: 322519

URL: http://svn.apache.org/viewcvs?rev=322519&view=rev
Log:
Some lines about potential dependencies problems in plugins.

Modified:
    maven/maven-1/core/trunk/xdocs/using/developing-plugins.xml

Modified: maven/maven-1/core/trunk/xdocs/using/developing-plugins.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/core/trunk/xdocs/using/developing-plugins.xml?rev=322519&r1=322518&r2=322519&view=diff
==============================================================================
--- maven/maven-1/core/trunk/xdocs/using/developing-plugins.xml (original)
+++ maven/maven-1/core/trunk/xdocs/using/developing-plugins.xml Sun Oct 16 15:18:04 2005
@@ -207,6 +207,33 @@
           to "generate" the Hello Report.
         </p>
       </subsection>
+
+      <subsection name="Plugin dependencies">
+        <p>
+          In maven 1.X, there are only two classloaders :
+        </p>
+        <ul>
+          <li>root : Where are loaded ant, commons-logging, log4j.</li>
+          <li>root.maven (child of root) : Where are loaded (by default) all others dependencies needed by maven, its plugins and the user project.</li>
+        </ul>
+        <p>
+          Thus, this design can create 2 problems when you write your own plugin :
+        </p>
+        <ol>
+          <li>You won't be able to use your own version of a dependency. If this one is already loaded by maven or one of its plugins in a different version you'll automatically use it. To avoid having this sort of problem, you are invited to use in priority the libraries versions already used <a href="../dependencies.html">by maven</a> or <a href="../reference/plugins/dependency-convergence-report.html">by the bundled plugins</a>.</li>
+          <li>
+            <p>
+              If you try to use an Ant task which requires another dependency, the ant task doesn't find it even though you defined it correctly in your plugin's pom. This due to the fact that ant is loaded in the classloader "root" and your dependencies are visible in the classloader "root.maven". To solves this, you must specify to maven to load this dependency in the root classloader with :
+            </p>
+          <source><![CDATA[<dependency>
+  <properties>
+    <classloader>root</classloader>
+  </properties>
+</dependency>]]></source>
+          </li>
+        </ol>
+      </subsection>
+    
       <subsection name="Providing Reports in a Plugin">
         <p>
           Plugins are often used to provide one or more reports using a certain tool based on the
@@ -367,6 +394,7 @@
         <a href="../reference/scripting.html">Scripting Reference</a>.
       </p>
     </section>
+    
  </body>
 </document>