由於Maven 3.2.2支持定義pom的parent version with ranges,是否可以配置m2e插件來解析版本範圍?怎麼樣?如何配置m2e eclipse插件以支持父版本範圍?
編輯1:(2014年9月29日9點50分@ AEST)
方案:導入具有以下父定義一個行家項目與M2E插件蝕(該項目是不是一個模塊其父)的
<parent>
<artifactId>artifactId</artifactId>
<groupId>groupId</groupId>
<version>[1.0,1.1)</version>
</parent>
M2E插件未能解決的版本範圍,示出了在POM編輯此錯誤消息:
Could not transfer artifact groupId:artifactId:pom:[1.0,1.1) from/to nexus-releases (http://nexus.proxy/content/groups/public/): Illegal character in path at index 82: http://nexus.proxy/content/groups/public/groupId/artifactId/[1.0,1.1)/artifactId-[1.0,1.1).pom and 'parent.relativePath' points at wrong local POM
與Run as... > Maven install
運行時,它的工作原理,請參閱下面的日誌摘錄:
[INFO] Scanning for projects...
[INFO] Downloading: http://nexus.proxy/content/groups/public/groupId/artifactId/maven-metadata.xml
[INFO] Downloading: http://nexus.proxy/content/groups/public/groupId/artifactId/maven-metadata.xml
[INFO] Downloading: http://nexus.proxy/content/groups/public-snapshot/groupId/artifactId/maven-metadata.xml
[INFO] Downloaded: http://nexus.proxy/content/groups/public-snapshot/groupId/artifactId/maven-metadata.xml (488 B at 0.8 KB/sec)
[INFO] Downloaded: http://nexus.proxy/content/groups/public/groupId/artifactId/maven-metadata.xml (2 KB at 2.1 KB/sec)
[INFO] Downloaded: http://nexus.proxy/content/groups/public/groupId/artifactId/maven-metadata.xml (2 KB at 2.1 KB/sec)
[INFO] Downloading: http://nexus.proxy/content/groups/public/groupId/artifactId/[1.0,1.1)/artifactId-[1.0,1.1).pom
[INFO] Downloading: http://nexus.proxy/content/groups/public/groupId/artifactId/[1.0,1.1)/artifactId-[1.0,1.1).pom
PS:問題不在於這是否是一個很好的做法,請參閱Benjamin's comment爲一些背景。
相關的How to configure maven or eclipse in order to use the RELEASE constant within versions?
您能否讓您的問題更清楚?你給了很多鏈接,更具體,以便每個人都可以發佈很好的答案。 – 2014-09-22 11:10:53
你去@SanjayaPandey :) – 2014-09-22 23:51:41