spring boot admin 源码包的编译

https://github.com/codecentric/spring-boot-admin

下载地址:

编译要求:

Build
Requirements:

Node.js v8.x (LTS)
JDK >= 1.8
Please make sure you set $JAVA_HOME points to the correct JDK and that the node and npm commands are on your $PATH.

./mvnw clean package

这里编译的时候一定要安装node.js,并且要为node.js设置环境变量

英文官网: https://nodejs.org

中文网: http://nodejs.cn/

windows下载msi格式的安装包

2.安装

双击安装包进行安装,因为个人喜好,我放在了D盘,安装路径为 D:Program Files odejs

安装完成之后,打开控制台,输入node -v测试下是否安装成功

npm同时默认安装上了,输入npm -v

至此,安装成功

3.环境配置

首先配置npm的全局模块的存放路径以及cache的路径,例如我希望将以上两个文件夹放在NodeJS的主目录下,便在NodeJs下新建"node_global"及"node_cache"两个文件夹。

打开控制台,输入

npm config set prefix "D:Program Files
odejs
ode_global"
npm config set cache "D:Program Files
odejs
ode_cache"

右键我的电脑-属性-高级系统设置-环境变量,打开环境变量设置窗口

 修改用户变量Path,修改默认的配置为刚才设置的prefix路径

4.使用淘宝镜像(可选)

npm因为网络原因,下载是会很慢,所以更换为淘宝源,cnpm跟npm用法完全一致,只是在执行命令时将npm改为cnpm。

npm install -g cnpm --registry=https://registry.npm.taobao.org

安装完成之后,执行cnpm -v

接下来 就是j

整个工程使用了

<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <executions>
                    <execution>
                        <id>enforce-maven</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireMavenVersion>
                                    <version>3.5</version>
                                </requireMavenVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

会报错

如果某些情况下不检查环境,可以在maven命令上加一个 -Denforcer.skip=true 来跳过enforcer插件执行。
例如:mvn clean validate -Denforcer.skip=true

 此外编译不需要单元测试-Dmaven.test.skip=true,不执行测试用例,也不编译测试用例类。

 -Dmaven.test.skip=true

mvn  clean package install -Denforcer.skip=true  -Dmaven.test.skip=true -Dcheckstyle.skip=true
原文地址:https://www.cnblogs.com/kebibuluan/p/11553794.html