maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Dangel (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MPMD-277) Plugin tries to download local submodules from repo
Date Wed, 10 Apr 2019 17:53:00 GMT

    [ https://issues.apache.org/jira/browse/MPMD-277?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16814718#comment-16814718
] 

Andreas Dangel commented on MPMD-277:
-------------------------------------

This problem was introduced while fixing MPMD-266. When using the option "aggregate=true",
the classpath was wrong (the modules of the multi-module project were missing), but unfortunately
not only the compile classpath of these modules (e.g. .../target/classes) have been added,
but the references to the artifacts themselves.

 

While this problem is fixed, you still need to take some care: PMD's results might be inaccurate,
if the project is not compiled yet - and this happens, when "aggregate=true" is used, because
then PMD is executed on the root project before the modules are built. To workaround this
issue, you'll need to build your projects first (mvn clean package) and then in a second mvn
execution, let PMD be executed (e.g. mvn verify).

 

The option "aggregate=true" is most useful for generating a aggregated site report (pmd:pmd)
during the site lifecycle. But it is not so useful for the check-goal (pmd:check) during the
"normal" build lifecycle.

 

> Plugin tries to download local submodules from repo
> ---------------------------------------------------
>
>                 Key: MPMD-277
>                 URL: https://issues.apache.org/jira/browse/MPMD-277
>             Project: Maven PMD Plugin
>          Issue Type: Bug
>          Components: PMD
>    Affects Versions: 3.11.0
>            Reporter: Sylvain
>            Assignee: Andreas Dangel
>            Priority: Major
>             Fix For: 3.12.0
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> My bug seems kinda related to #MPMD-273, but 3.10.0 works for me, not 3.11.0.
>  
> I'm trying to build a multi-module maven project with OpenJDK11 and Maven 3.5.4.
> The project works fine with maven-pmd-plugin 3.10.0, but with 3.11.0, I get this error:
>  
> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-pmd-plugin:3.11.0:pmd (pmd)
on project parent: Execution pmd of goal org.apache.maven.plugins:maven-pmd-plugin:3.11.0:pmd
failed: org.apache.maven.reporting.MavenReportException: org.eclipse.aether.resolution.DependencyResolutionException:
Could not find artifact com.incepto.cloud:api-common:jar:0.0.1-SNAPSHOT in spring-repo (https://repo.spring.io/release)
-> [Help 1]
>  
> pmd-plugin doesn't have a dependency on api-common, it's the first submodule maven tries
to build. The problem doesn't occur if I skip pmd first and let maven install the submodules
in the local repo, then re-run the build.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message