今天在改造UI自动化框架由基于Ant构建改为基于Maven时,遇到了几个问题记录下:
一、在maven配置文件pom.xml中声明好需要引入的包信息后,但包却未更新下来:
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.8</version>
<scope>test</scope>
</dependency>
问题原因,因为首次使用IntelliJ IDEA,没有配置maven环境变量,
进入File | Settings | Build, Execution, Deployment | Build Tools | Maven,设置如下:
二、SVN更新时报:Can't use Subversion command line client: svn The path to the Subversion executable is probably wrong. Fix it.
问题原因:没有安装command line client
解决方法:
1、如果已经安装SVN,则打开安装包,选择modify,选上command line client tool选项
2、如果未安装,则安装时也记得选上command line client tool选项
三、SVN更新时报java版本错误
有三个地方需要修改java版本
1、Project Setting->Modules->Source->Language level
2、Project Setting->Modules->Dependencies->Module SDK
3、File | Settings | Build, Execution, Deployment | Compiler | Java Compiler