我正在尝试在Windows上使用Ant构建Maven。
在签出maven的文件夹中运行ant时,我得到:
build.xml:105: localRepository doesn't support the "path" attribute
第106行与localRepository是:<localRepository path="${maven.repo.local}" />
Ant输出: 构建文件:H:\ maven-3.0-SNAPSHOT \ build.xml
clean-bootstrap:
initTaskDefs:
[echo] Building Apache Maven ...
isMavenHomeSet:
init:
[echo] maven.home = C:\maven-3.0-SNAPSHOT
[echo] maven.repo.local = C:\Users\XXX/.m2/repository
[echo] distributionId = apache-maven
[echo] distributionName = Apache Maven
[echo] distributionDirectory = apache-maven
prompt-maven-home-exists:
pull:
BUILD FAILED
H:\maven-3.0-SNAPSHOT\build.xml:105: localRepository doesn't support the "path"
attribute
在maven.repo.local
中将斜杠更改为反斜杠也无济于事。
答案 0 :(得分:0)
从maven central下载maven-ant-tasks jar
http://search.maven.org/#artifactdetails%7Corg.apache.maven%7Cmaven-ant-tasks%7C2.1.3%7Cjar
并复制到$ ANT_HOME / lib目录。