You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Ismaël Mejía (Jira)" <ji...@apache.org> on 2020/04/21 08:30:03 UTC

[jira] [Closed] (BEAM-1984) Fix scope for dependencies that are runtime/test only

     [ https://issues.apache.org/jira/browse/BEAM-1984?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ismaël Mejía closed BEAM-1984.
------------------------------

> Fix scope for dependencies that are runtime/test only
> -----------------------------------------------------
>
>                 Key: BEAM-1984
>                 URL: https://issues.apache.org/jira/browse/BEAM-1984
>             Project: Beam
>          Issue Type: Improvement
>          Components: build-system
>    Affects Versions: Not applicable
>            Reporter: Ismaël Mejía
>            Assignee: Ismaël Mejía
>            Priority: Minor
>             Fix For: 2.2.0
>
>
> In the Beam parent pom at this moment we have a configuration on the maven dependency plugin to ignore the verification of non-compile dependencies so unused or badly configured dependencies that are used only for test or runtime purposes are not reported.
> {code:xml}
>               <!-- Ignore runtime-only dependencies in analysis -->
>               <ignoreNonCompile>true</ignoreNonCompile>
> {code}
> I discovered this case when I executed:
> {code}
> 	mvn clean install -Dmaven.test.skip=true
> {code}
> Notice that this is really particular because this does not compile the tests classes, so it can detect when the ‘main’ classes are not using some code. This is different from the behavior of:
> {code}
> 	mvn clean install -DskipTests=true
> {code}
> That does not complain because skipTests compiles the tests.
> For the first case (maven.test.skip) I got a warning ‘Unused declared dependencies found’ so with this I discovered the test/runtime only dependencies that are not correctly scoped. I will do a PR to fix this, because we can get rid of compile dependencies that are test or runtime only.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)