[
https://issues.apache.org/jira/browse/BEAM-1984?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16102995#comment-16102995
]
ASF GitHub Bot commented on BEAM-1984:
--------------------------------------
GitHub user iemejia opened a pull request:
https://github.com/apache/beam/pull/3652
[BEAM-1984] Fix scope for dependencies needed only for test purposes
Follow this checklist to help us incorporate your contribution quickly and
easily:
- [x] Make sure there is a [JIRA
issue](https://issues.apache.org/jira/projects/BEAM/issues/) filed for the
change (usually before you start working on it). Trivial changes like typos do
not require a JIRA issue. Your pull request should address just this issue,
without pulling in other changes.
- [x] Each commit in the pull request should have a meaningful subject
line and body.
- [x] Format the pull request title like `[BEAM-XXX] Fixes bug in
ApproximateQuantiles`, where you replace `BEAM-XXX` with the appropriate JIRA
issue.
- [ ] Write a pull request description that is detailed enough to
understand what the pull request does, how, and why.
- [x] Run `mvn clean verify` to make sure basic checks pass. A more
thorough check will be performed on your pull request automatically.
- [ ] If this contribution is large, please file an Apache [Individual
Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
---
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/iemejia/beam
BEAM-1984-enable-dep-analysis-for-tests
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/beam/pull/3652.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #3652
----
commit 86e335595f1274248835e5715229bc67d4233fb3
Author: Ismaël Mejía <[email protected]>
Date: 2017-07-27T08:57:15Z
[BEAM-1984] Fix scope for dependencies needed only for test purposes
----
> 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
>
> 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
(v6.4.14#64029)