Maven dependency resolution fails because properties are not substituted -
we've been working on maven (3.0.5) project couple of months now, , we're getting error when establishing new dev environments (without local maven repository):
[error] failed execute goal on project [100's of dependencies truncated]: failed read artifact descriptor org.apache.httpcomponents:httpclient:jar:${httpcomponents.version}: not transfer artifact org.apache.httpcomponents:httpclient:pom:${httpcomponents.version} from/to nexus (http://bob.premitech.net:8081/nexus/content/groups/public): illegal character in path @ index 96: http://bob.premitech.net:8081/nexus/content/groups/public/org/apache/httpcomponents/httpclient/${httpcomponents.version}/httpclient-${httpcomponents.version}.pom -> [help 1]
i'm using multi-module project, , obvious thing might think wrong ${httpcomponents.version} isn't defined. except defined 4.2.5 in parent pom. wierder, hardcoding version instead of using property not change error message.
i've tried removing http components dependency entirely. nothing. thing work manually copying correct dependency local maven repository (.m2), defeats purpose of using maven in first place.
does have slightest idea wrong here? there kind of caching mechanism i'm not aware of?
as said, hard-coding version in pom still giving such error, seems me "incorrect" version coming other dependencies transitively. iirc, place holders of dependencies not replaced in maven.
for example, foo
project depending on own bar-framework
, both foo
, bar-framework
depending on httpcomponent
. in bar-framework
using property place holder version. in such case , if built bar-framework
in new machine problem, bar-framework
pom contains un-substituted property of httpcomponent
version. foo
project correct, maven still need resolve incorrect httpcomponent because of transitive dependency.
try mvn dependency:tree
see how getting dependency in project. may give hints.
Comments
Post a Comment