[MRESOLVER-98] resolver ant task doesn't obey dependencyManagement#2
[MRESOLVER-98] resolver ant task doesn't obey dependencyManagement#2lwr wants to merge 2 commits intoapache:masterfrom
Conversation
a0d12c9 to
2215051
Compare
|
After applying the patch, the resolving mechanism still does not work as expected test case <dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver-api</artifactId>
<version>1.4.1</version>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver-util</artifactId>
<version>1.4.1</version>
<scope>test</scope>
</dependency>
</dependencies>the dependency tree but the resolver will incorrectly resolve I think it would be caused by the resolver itself, will 1.4.2 resolve this problem? |
|
I had add the testcase to expose this problem
|
|
您好,咨询下,还没编译您这个版本。 另外发现如果有版本在仓库是snapshot模式的,带时间戳和buildnumber的也会报错,和这个相关么? |
|
@snoopyhzy I have abandon this project as a solution of maven ant integration this PR fixes the DependencyManagement version issue but still have the scope issue, so I think the maven resolver is not a stable solution I can rely on this time. Now I switch back to use the deprecated maven-ant-task project, with a little patch <!-- patch super pom to workaround central repo policy change problem (http access forbidden) -->
<unzip src="path/to/maven-ant-task-2.1.3.jar"
dest="maven/target/workaround-central-repo-https">
<patternset includes="**/pom-4.0.0.xml" />
</unzip>
<replace dir="maven/target/workaround-central-repo-https" encoding="utf8"
token="http://repo1.maven.org/maven2" value="https://repo1.maven.org/maven2" />
<typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="antlib:org.apache.maven.artifact.ant">
<classpath path="maven/target/workaround-central-repo-https" />
<classpath path="path/to/maven-ant-task-2.1.3.jar" />
</typedef>
|
|
@lwr thank you I use this project to download java libs and then run inc test case. Now I find another solusion that is use exec cmd.exe /c mvn dependency:copy-dependencies -Doutputdir. |
|
@snoopyhzy that project is already retired, no any issue reporting will be fixed and has no meaning. I had found the same problem what you reported I in https://issues.apache.org/jira/browse/MANTTASKS-251 That issue only occurs while processing dependency with type=import (mirror not being applied), in most situations that is not a problem until recently that http://repo1.maven.org being shutdown (enforcing https accessing). We have several choices:
|
|
@lwr thank you,But I am sure it is the problem of maven-resolver-ant-tasks |
|
@snoopyhzy it is problem of retired project maven-ant-tasks not this new project maven-resolver-ant-tasks, they are different and this project is the replacement of the retired one |
|
@lwr the new one has two other problem that I find. |
|
@snoopyhzy I had said that why I am here for, this project this PR fixes one (dependency management version problem), but another not fixed yet (see the new committed test case
|
|
@lwr OIC,you mean use resolve to download all jar to local repo |
|
@lwr Can you rebase on top of master? I'd like to pick this up. |
|
Please hav a look at DefaultProjectDependenciesResolver in Maven Core. There you will find the code how Maven prepares the collect request. I strongly assume that those code bases are disjoint and therefore you see the erratic behavior. |
|
we had give-up using maven-resolver, try this https://gist.github.com/lwr/6829cefaab2261cec1cc733f6398b9ac |
|
Closing this since is not going to be fixed. |
|
The change in this pull request appears to have been similarly applied in #30. The second issue brought up in https://issues.apache.org/jira/browse/MRESOLVER-98?focusedCommentId=17050291&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-17050291 with regards to incorrect scope resolution when using dependency management still applies . |
|
Resolve #111 |
https://issues.apache.org/jira/browse/MRESOLVER-98