New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MDEP-679] mvn dependency:analyze detected wrong transitive dependency #7
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs a test, probably an integration test.
src/main/java/org/apache/maven/shared/dependency/analyzer/asm/ConstantPoolParser.java
Outdated
Show resolved
Hide resolved
c2a0110
to
1b969a7
Compare
Hi @elharo, I've added a test case for this patch and fixed the issue you mentioned. Please take a look at it again. Thanks! |
I'm just wondering what the original classname was where you hit this issue, lower case coffee doesn't make sense. Current implementation will support |
src/test/resources/jarWithClassInUnnamedPackage/project1/pom.xml
Outdated
Show resolved
Hide resolved
src/test/resources/jarWithClassInUnnamedPackage/project2/pom.xml
Outdated
Show resolved
Hide resolved
1b969a7
to
47a1740
Compare
Hi @rfscholte, The original class name I encountered was |
Also, I am aware of the the usage of the option |
Those are terrible classnames and in the end they will cause trouble in the modular system (once adopted). Better ask the maintainers of that project to add reasonable packages. |
If I don't specify version when running Therefore, I think this PR merely makes the behavior of the dependency detection as before, which I think is more reasonable than current behavior. |
Suppose I would except this change, you can't use it as long as you call |
Seriously, this is a supported use case? |
@johnlinp can you please check with every past release of the plugin to find when this change was introduced, please? |
ok, found the commit that introduced this change: 32ee156 for https://issues.apache.org/jira/browse/MSHARED-428 for maven-dependency-analyzer-1.7 used by maven-dependency-plugin 3.0.1 with https://issues.apache.org/jira/browse/MDEP-471 |
Hi @hboutemy, After knowing the related issue MSHARED-428, did you decide whether we should merge this PR? IMHO, it's really a surprise to see a line of code simply like |
Ping @hboutemy? |
Hi @khmarbaise & @rfscholte, Would you please review my PR? Thank you. |
Thank you for integrating my commits into |
[MDEP-679] Should not include string literals when parsing references
Following this checklist to help us incorporate your
contribution quickly and easily:
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. Also be sure having selected the correct component.
[MSHARED-XXX] - Fixes bug in ApproximateQuantiles
,where you replace
MSHARED-XXX
with the appropriate JIRA issue. Best practiceis to use the JIRA issue title in the pull request title and in the first line of the
commit message.
mvn clean verify
to make sure basic checks pass. A more thorough check willbe performed on your pull request automatically.
mvn -Prun-its clean verify
).If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.
To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.
I hereby declare this contribution to be licenced under the Apache License Version 2.0, January 2004
In any other case, please file an Apache Individual Contributor License Agreement.