2017-08-25 135 views
0

我在Mac上使用IntelliJ IDEA,并且想要导入Apache Velocity。在我的pom.xml文件:在IntelliJ主题中导入Apache Velocity

<dependencies> 
    <!-- https://mvnrepository.com/artifact/org.apache.velocity/velocity --> 
    <dependency> 
     <groupId>org.apache.velocity</groupId> 
     <artifactId>velocity</artifactId> 
     <version>1.7</version> 
    </dependency> 
</dependencies> 

我收到错误

Failed to read artifact descriptor for org.apache.velocity:jar:1.7

是否有我需要添加其他设置?

+1

无法重现。请检查日志中的错误,请参阅http://stackoverflow.com/a/42427510/104891。 – CrazyCoder

+0

检查https://stackoverflow.com/questions/35105667/failed-to-read-artifact-descriptor-intellij – user7294900

回答

0

这是一个新安装的Itellij理念,我不得不设置如下:

IntelliJ Idea -> Preferences -> Build, Execution, Deployment -> 
Build Tools -> Maven -> Always update snapshots -> Apply -> Ok 

当然你也可以只下载jar文件并导入它作为一个模块来代替。