You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by bt...@apache.org on 2017/08/25 11:21:42 UTC

[17/29] james-project git commit: JAMES-2124 Update maven contribution requirement

JAMES-2124 Update maven contribution requirement

Especially document the dependency ordering maven module usage.


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/5a756048
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/5a756048
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/5a756048

Branch: refs/heads/master
Commit: 5a7560482e16852403c7d2e70f046967553db9c1
Parents: 33a6d55
Author: benwa <bt...@linagora.com>
Authored: Mon Aug 21 10:54:44 2017 +0700
Committer: benwa <bt...@linagora.com>
Committed: Fri Aug 25 18:17:27 2017 +0700

----------------------------------------------------------------------
 src/site/xdoc/contribute.xml | 28 ++++++++++++++++++++++------
 1 file changed, 22 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/5a756048/src/site/xdoc/contribute.xml
----------------------------------------------------------------------
diff --git a/src/site/xdoc/contribute.xml b/src/site/xdoc/contribute.xml
index 5d55caa..99f0259 100644
--- a/src/site/xdoc/contribute.xml
+++ b/src/site/xdoc/contribute.xml
@@ -257,12 +257,28 @@
       <p>
         6.
         <strong>pom.xml</strong>
-        files shall follow the same ordering as seen in the reference
-        of
-        the
-        <a href="http://maven.apache.org/ref/3.0.3/maven-model/maven.html">Maven Model</a>
-        ,
-        split multiple attributes each on a new line.
+
+        <br/>
+        We also require the following best practice regarding maven:
+        <ul>
+          <li>Define your dependency versions in james-project pom.xml. This structurally ensures all projects get the
+            same version, and that there is no version clashes.</li>
+          <li>Don't use <i>org.apache.james</i> groupId for your dependencies. Use <i>${project.groupId}</i>.
+            If not, you break the policies for automatic sorting, as well as make it more ambiguous.</li>
+          <li>You should be ordering your dependencies. The sort order is:
+            <ul>
+              <ol>If the project is part of org.james.apache groupId? Internal dependencies goes first.</ol>
+              <ol>Then we order by groupId</ol>
+              <ol>Then we order by artifactId</ol>
+              <ol>Then we order by type. <i>test-jar</i> goes last.</ol>
+            </ul>
+            Hopefully, some tools are doing this sorting for you:</li>
+        </ul>
+        <pre>
+          <code>mvn com.github.ekryd.sortpom:sortpom-maven-plugin:sort -Dsort.keepBlankLines -Dsort.sortDependencies=groupId,artifactId -Dsort.nrOfIndentSpace=4 -Dsort.createBackupFile=false -Dsort.sortModules=true -Dsort.sortModules=true</code>
+        </pre>
+        <p>You should also split multiple attributes each on a new line.</p>
+        <p>You should ensure your POM files, as well as sections ordering follows the <a href="http://maven.apache.org/ref/3.0.3/maven-model/maven.html">Maven Model</a></p>
       </p>
       <p>
         <strong>Eclipse IDE</strong>


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org