框架学习

nacos源码运行体验

 

主要增加​ -Dnacos.standalone=true这句话,另外就是 application.properties中配置的mysql必须要可用,nacos运行起来还是很爽的

 

写库的地方:

com.alibaba.nacos.config.server.service.repository.extrnal.ExternalStoragePersistServiceImpl

好像也是比较矬的sql

以上是11月18日的运行结果

19日给的提示是:[ERROR] Failed to execute goal org.apache.rat:apache-rat-plugin:0.12:check (default) on project nacos-core: Too many files with unapproved license: 1 See RAT report in: /Users/xxxxxxx/nacos2/core/target/rat.txt

maven打包的时候报错: 
报错信息: 
[ERROR] Failed to execute goal org.apache.rat:apache-rat-plugin:0.8:check (default) on project hbase: Too many unapproved licenses: 513 -> [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/MojoFailureException 
一种方案是在新建的每一个类的第一行添加

/**
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

第二种解决方案: 
在mvn命令中添加参数 
apache-rat:check -Drat.numUnapprovedLicenses=600 
数字600是一个大于报错信息中的数量。 

例如:

mvn  clean apache-rat:check -Drat.numUnapprovedLicenses=600 package -D maven.javadoc.skip=true assembly:single -Dhadoop.profile=2

 本人用的是 mvn -Prelease-nacos -Dmaven.test.skip=true clean apache-rat:check -Drat.numUnapprovedLicenses=600 -Drat.skip=true  install -U

打包成功

补充:如果在windows下,可以加上单引号 mvn -Prelease-nacos '-Dmaven.test.skip=true' clean apache-rat:check '-Drat.numUnapprovedLicenses=600'  install -U