You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2019/01/15 15:32:45 UTC

[maven-site] branch master updated (4f85af2 -> 859f556)

This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/maven-site.git.


    from 4f85af2  Fixes default flatten configuration in Install / Deploy in CI friendly doc (#60)
     new 15cdcc9  Recommend users to directly specify dependencies when using them directly
     new 859f556  split the paragraph into smaller ones

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../introduction-to-dependency-mechanism.apt             | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)


[maven-site] 02/02: split the paragraph into smaller ones

Posted by hb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-site.git

commit 859f5564d0bccb413afe80d2ce06db51f1cad745
Author: Hervé Boutemy <hb...@apache.org>
AuthorDate: Tue Jan 15 16:31:31 2019 +0100

    split the paragraph into smaller ones
---
 .../introduction-to-dependency-mechanism.apt           | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/content/apt/guides/introduction/introduction-to-dependency-mechanism.apt b/content/apt/guides/introduction/introduction-to-dependency-mechanism.apt
index 0b451c1..d47099d 100644
--- a/content/apt/guides/introduction/introduction-to-dependency-mechanism.apt
+++ b/content/apt/guides/introduction/introduction-to-dependency-mechanism.apt
@@ -104,15 +104,21 @@ Introduction to the Dependency Mechanism
 
  []
 
- Although transitive dependencies can help you to include desired dependencies, it is a good practice that you directly
+ Although transitive dependencies can help you to include implicitely desired dependencies, it is a good practice that you explicitely
  specify the dependencies you are directly using in your own source code. This best practice proves its value especially
- when the dependencies of your project constantly changes their dependencies. Assume that your project A specifies a
+ when the dependencies of your project changes their dependencies.
+ 
+ For example, assume that your project A specifies a
  dependency on another project B, and project B specifies a dependency on project C. If you are directly using components
  in project C, and you don't specify project C in your project A, it may cause build failure when project B suddenly
- updates/removes its dependency on project C. Another reason to directly specify dependencies is that it provides better
- documentation for your project: one can learn more information by just reading the POM file in your project. Maven also
- provides a plugin {{{https://maven.apache.org/plugins/maven-dependency-plugin/analyze-mojo.html}dependency:analyze mojo}}
- for analyzing the dependencies and making this best practice more achievable.
+ updates/removes its dependency on project C.
+ 
+ Another reason to directly specify dependencies is that it provides better
+ documentation for your project: one can learn more information by just reading the POM file in your project.
+ 
+ Maven also
+ provides {{{/plugins/maven-dependency-plugin/analyze-mojo.html}dependency:analyze}} plugin goal
+ for analyzing the dependencies: it helps making this best practice more achievable.
 
 * {Dependency Scope}
 


[maven-site] 01/02: Recommend users to directly specify dependencies when using them directly

Posted by hb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-site.git

commit 15cdcc9fb9cf78d1aba0f20e3341111a260dc7c9
Author: John Lin <jo...@gmail.com>
AuthorDate: Mon Jan 14 13:47:35 2019 +0800

    Recommend users to directly specify dependencies when using them directly
    
    The discussion is in
    https://lists.apache.org/thread.html/10b53804b5a18565f7f1a0677300d7f5c5fce539c94d9bad44efa6b1@%3Cusers.maven.apache.org%3E
---
 .../introduction/introduction-to-dependency-mechanism.apt      | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/content/apt/guides/introduction/introduction-to-dependency-mechanism.apt b/content/apt/guides/introduction/introduction-to-dependency-mechanism.apt
index 4d89d94..0b451c1 100644
--- a/content/apt/guides/introduction/introduction-to-dependency-mechanism.apt
+++ b/content/apt/guides/introduction/introduction-to-dependency-mechanism.apt
@@ -104,6 +104,16 @@ Introduction to the Dependency Mechanism
 
  []
 
+ Although transitive dependencies can help you to include desired dependencies, it is a good practice that you directly
+ specify the dependencies you are directly using in your own source code. This best practice proves its value especially
+ when the dependencies of your project constantly changes their dependencies. Assume that your project A specifies a
+ dependency on another project B, and project B specifies a dependency on project C. If you are directly using components
+ in project C, and you don't specify project C in your project A, it may cause build failure when project B suddenly
+ updates/removes its dependency on project C. Another reason to directly specify dependencies is that it provides better
+ documentation for your project: one can learn more information by just reading the POM file in your project. Maven also
+ provides a plugin {{{https://maven.apache.org/plugins/maven-dependency-plugin/analyze-mojo.html}dependency:analyze mojo}}
+ for analyzing the dependencies and making this best practice more achievable.
+
 * {Dependency Scope}
 
  Dependency scope is used to limit the transitivity of a dependency, and also to affect the classpath used for