Am 08/31/16 um 19:35 schrieb Stephen Connolly: > On Wednesday 31 August 2016, Christian Schulte <c...@schulte.it> wrote: >> >> >> public interface DependencyTreeProvider >> { >> >> DependencyNode getDependencyTree( String logicalScopeName ) >> throws IOException; >> >> } > > > Not `String logicalScopeName` but `Artifact artifact` > > Because... Otherwise we have to pick a defined list of scope names and > their meaning... Any defined list of scope names will be different... So > better is to just publish the one tree per artifact
Are you referring to interface 'org.apache.maven.artifact.Artifact'? Choose the tree to return based on scope? There is more than just one tree per artifact. We need to provide many trees per artifact and then need a way to select the tree of interest based on something. There have been requests like "prioritize test dependencies over compile dependencies when running tests". That's two different trees we need to be able to read from the pdt files. Those pdt files need to support that without the build tool having to apply any tree building logic. The pdt files may not have been build using Maven, for example. Different tools could apply different logic building those files. Consumer component is not affected by this. If build tool A does not provide dependency tree NAME of an artifact, build tool B gets no NAME tree. If build tool A provides features like optional dependencies or dependency management build tool B does not support, build tool B still can process the result published by build tool A. > > Exposing the logical scope is a mistake IMHO [...] > So I am -1 on exposing details like "scope" to consumers Maybe scope is misleading. It's more a logical name of a dependency tree. > > We do need to expose "optional" so the consumer can resolve version > conflicts with the optional dependency We need to keep the software processing those pdt files as dumb as possible. Do as much as possible during building that pdt file. No need for optional or provided in those pdt files. Optional already is a feature of the build tool. Set it to true and the build tool will not add that dependency to the pdt. Same with dependency management. Build tool feature. pdt is all about pre-built final dependency trees the consumer does not need to post-process in any way (build different compile/test classpaths e.g.). Regards, -- Christian --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org