Author: rfscholte Date: Mon Dec 28 13:37:38 2015 New Revision: 1721915 URL: http://svn.apache.org/viewvc?rev=1721915&view=rev Log: Add page explaining differences between an Artifact and a Dependency
Added: maven/shared/trunk/maven-artifact-transfer/src/site/ maven/shared/trunk/maven-artifact-transfer/src/site/apt/ maven/shared/trunk/maven-artifact-transfer/src/site/apt/comparison.apt.vm Added: maven/shared/trunk/maven-artifact-transfer/src/site/apt/comparison.apt.vm URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-artifact-transfer/src/site/apt/comparison.apt.vm?rev=1721915&view=auto ============================================================================== --- maven/shared/trunk/maven-artifact-transfer/src/site/apt/comparison.apt.vm (added) +++ maven/shared/trunk/maven-artifact-transfer/src/site/apt/comparison.apt.vm Mon Dec 28 13:37:38 2015 @@ -0,0 +1,61 @@ + ----- + Introduction + ----- + Robert Scholte + ----- + 2015-12-28 + ----- + + ~~ Licensed to the Apache Software Foundation (ASF) under one + ~~ or more contributor license agreements. See the NOTICE file + ~~ distributed with this work for additional information + ~~ regarding copyright ownership. The ASF licenses this file + ~~ to you under the Apache License, Version 2.0 (the + ~~ "License"); you may not use this file except in compliance + ~~ with the License. You may obtain a copy of the License at + ~~ + ~~ http://www.apache.org/licenses/LICENSE-2.0 + ~~ + ~~ Unless required by applicable law or agreed to in writing, + ~~ software distributed under the License is distributed on an + ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~~ KIND, either express or implied. See the License for the + ~~ specific language governing permissions and limitations + ~~ under the License. + + ~~ NOTE: For help with the syntax of this file, see: + ~~ http://maven.apache.org/doxia/references/apt-format.html + +Comparison + + Here's a small matrix which should help you choosing the right instance. + + In general: + + * an Artifact holds a file mapped on a certain coordinate. + + * a Dependency contains an artifact and has transitive information + + * a MavenProject hold a pom-file and optional mainfile and can have attached (=classified) files, all using the same GAV. + +*--------------------+-------------+----------------+---------------+ +|| || Dependency || Artifact || MavenProject || +*--------------------+-------------+----------------+---------------+ +| Has dependencies | yes | no | yes | +*--------------------+-------------+----------------+---------------+ +| filetype reference | type | file-extension | packaging | +*--------------------+-------------+----------------+---------------+ +| version ranges | yes | no | no | +*--------------------+-------------+----------------+---------------+ +| attached artifacts | no | no | yes | +*--------------------+-------------+----------------+---------------+ + +This implies the following: + + * From dependency to artifact is possible, since you can map a type to an extension. + However, it is not possible to go from artifact back to dependency, there are several types which have jar as file extension. + + * There's no such thing as transitive artifacts. Filtering during resolution as based on DependencyFilters, + ArtifactFilters can only be applied afterwards, hence are less efficient. + +