1、没有安装git软件
在编译打包GCViewer的过程中,不能执行git命令,错误信息如下:
[ERROR] Failed to execute goal org.codehaus.mojo:buildnumber-maven-plugin:1.4:create (create-build-metadata) on project gcviewer: Cannot get the revision information from the scm repository :
[ERROR] Exception while executing SCM command.: Error while executing command. Error while executing process. Cannot run program "git" (in directory "D:\gitrepos\GCViewer-develop"): CreateProcess error=2, 系统找不到指定的文件。
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
从git官网下载操作系统对应版本,安装后,重新编辑即可。
2、启动gcviewer
使用命令 mvn clean package 打包后再使用 命令 java -jar xxxx.jar 直接启动。
D:\gitrepos\GCViewer-develop>mvn clean package
D:\gitrepos\GCViewer-develop>java -jar target/gcviewer-1.36-SNAPSHOT.jar
启动界面如下: