1,先从github上下载源码
我当前使用的是2.3.0
2,编译
BUILDING这个文件第四个是如何编译:
mvn -Prelease-nacos -Dmaven.test.skip=true clean install -U
但是我在运行的时候报错.test.skip 无效。我的运行是:
mvn -Prelease-nacos -DskipTest clean install -U
但是运行过程中会报测试出错:
maven-surefire-plugin 测试报错,以及 maven-checkstyle 出错:
修改pom文件,将这些全部设置为test skip
<groupId>org.apache.maven.plugins</groupId> <artifactId>maven-checkstyle-plugin</artifactId> <version>${maven-checkstyle-plugin.version}</version> <configuration> <skip>true</skip> </configuration>
<artifactId>maven-surefire-plugin</artifactId> <version>${maven-surefire-plugin.version}</version> <configuration> <skipTests>true</skipTests> </configuration>
再重新mvn执行,本次执行成功。
3,运行
运行console模块,
需要再VM变量中增加:
-Dnacos.standalone=true
以单机的形式运行即可。