开发者

Maven site error with version range

I have a Maven project that declares a dependency on another Maven artifact using an open ended version range, such as this:

<dependency>
  <groupId>org.terracotta.toolkit</groupId>
  <artifactId>terracotta-toolkit-1.0</artifactId>
  <version>[1.0.0-SNAPSHOT,]</version>
</dependency>

(I know that it is to some degree asking for trouble using such version ranges, but for this particular project we have very good reason for doing so.)

For the most part this works fine, but when trying to generate the project web site with "mvn site", I get the following error when it tries to create the Dependency Management Report:

[INFO] Generating "Dependency Management" report. Downloading: http:/XXXXXXXXXX/content/groups/public/org/terracotta/toolkit/terracotta-toolkit-1.0/[1.0.0-SNAPSHOT,]/terracotta-toolkit-1.0-[1.0.0-SNAPSHOT,].pom
[INFO] ------------------------------------------------------------------------
[ERROR]开发者_StackOverflow中文版 FATAL ERROR
[INFO] ------------------------------------------------------------------------ 
[INFO] Invalid uri 'http://XXXXXXXXXX/content/groups/public/org/terracotta/toolkit/terracotta-toolkit-1.0/[1.0.0-SNAPSHOT,]/terracotta-toolkit-1.0-[1.0.0-SNAPSHOT,].pom': escaped absolute path not valid
[INFO] ------------------------------------------------------------------------ 
[INFO] Trace java.lang.IllegalArgumentException: Invalid uri 'http://XXXXXXXXXX/content/groups/public/org/terracotta/toolkit/terracotta-toolkit-1.0/[1.0.0-SNAPSHOT,]/terracotta-toolkit-1.0-[1.0.0-SNAPSHOT,].pom': escaped absolute path not valid

As you can see from the message, it tries to construct a URI with the open ended version range specification instead of the resolved version number, which of course fails.

Can anyone tell me if there is a workaround?


Does it work properly if you fix the version of the terracotta artifact to 1.0.0?

Also, which version of Maven are you using? As per this link:

  • https://cwiki.apache.org/MAVEN/maven-3x-compatibility-notes.html

if you are using Maven 3.x, you will have issues with mvn site.


This turned out to be a bug in Maven 2.2.0 that was fixed in Maven 2.2.1. I was mistaken that I was using Maven 2.2.1 already.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜