You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by "Ismaël Mejía (JIRA)" <ji...@apache.org> on 2017/05/02 09:52:04 UTC

[jira] [Updated] (BEAM-1984) Enable dependency analysis of non-compile dependencies

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

Ismaël Mejía updated BEAM-1984:
-------------------------------
    Description: 
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.

              <!-- Ignore runtime-only dependencies in analysis -->
              <ignoreNonCompile>true</ignoreNonCompile>

I discovered this case when I executed:

	mvn clean install -Dmaven.test.skip=true

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:

	mvn clean install -DskipTests=true

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.

  was:
Currently the dependency analysis is ignoring test dependencies, however if we run:

mvn install -Dmaven.test.skip=true

It complains on multiple modules on dependencies that should be scoped properly into the test mode but aren’t currently.


> Enable dependency analysis of non-compile dependencies
> ------------------------------------------------------
>
>                 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
>
> 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.
>               <!-- Ignore runtime-only dependencies in analysis -->
>               <ignoreNonCompile>true</ignoreNonCompile>
> I discovered this case when I executed:
> 	mvn clean install -Dmaven.test.skip=true
> 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:
> 	mvn clean install -DskipTests=true
> 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
(v6.3.15#6346)