Why would the PMD plugin care about what Doxia require transitively? Christian, can you explain a bit more why those changes are needed?

Le 24/12/2016 à 17:59, Hervé BOUTEMY a écrit :
+1

notice that it may show that we have an issue with the way transitivity +
nearest resolution are applied

IIUC this case, we have:
1. a direct dependency with scope = test
2. a transitive dependency with scope = compile

the result can't be just the direct dependency with scope=test: scope of
direct dependency has to switch to compile (and I don't know which version
should be kept: direct or transitive)

I'm sure we have edge cases with transitive dependencies algorithm and scopes

For a long time now, I want to create a builder API to create dependencies
unit tests, to ease creating tests, avoiding the nightmare of creating a bunch
of pom.xml files in a test local repo that are used by a unit test, with hard
to document rationale
Seems like it is time to work on it now...

Regards,

Hervé

Le samedi 24 décembre 2016, 17:03:03 CET Robert Scholte a écrit :
With this commit commons-io gets the default scope.
Suppose PMD drops commons-io, then there's no reason that this dependency
has the compile scope.
Assuming the unittests are using commons-io it makes sense that it has the
test-scope.
Be aware that users can overwrite dependencies of plugins in their pom.xml
Developers can only know about the dependencies for their src/main/java
and src/test/java code, and cannot do any assumptions about transitive
dependencies due to all the override mechanisms in Maven.
It may be clear that I don't like these changes.

Robert

On Sat, 24 Dec 2016 15:56:53 +0100, <schu...@apache.org> wrote:
Author: schulte
Date: Sat Dec 24 14:56:53 2016
New Revision: 1775971

URL: http://svn.apache.org/viewvc?rev=1775971&view=rev
Log:
[MPMD-230] Required class missing: org/apache/commons/io/IOUtils

Modified:
     maven/plugins/trunk/maven-pmd-plugin/pom.xml

Modified: maven/plugins/trunk/maven-pmd-plugin/pom.xml
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-pmd-plugin/pom.xml?
rev=1775971&r1=1775970&r2=1775971&view=diff
=========================================================================
===== --- maven/plugins/trunk/maven-pmd-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-pmd-plugin/pom.xml Sat Dec 24 14:56:53 2016
@@ -216,13 +216,13 @@ under the License.

        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpclient</artifactId>
        <version>4.3.5</version>

-      <scope>test</scope>
+      <!-- scope>test</scope> Required by Doxia transitively. -->

      </dependency>
      <dependency>
<groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>2.5</version>

-      <scope>test</scope>
+      <!-- scope>test</scope> Required by PMD transitively. -->

      </dependency>
</dependencies>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel 
antivirus Avast.
https://www.avast.com/antivirus


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to