
ip相关配置,我这的环境是内网ip为自己手动配置,外网为dhcp自动获取(外网也可进行手动ip设置,手动的话记得配置dns),我们首先将ip配置好,例如:我的笔记本内网ip为172.*.*.*,掩码为255.255.0.0(都是虚拟的,按照自己的实际情况填写)。3. 在安装后会提示缺乏依赖,然后只需要sudo apt install -f xxxx即可,注意加-f,这样可以自动下载你命令行中要下载的这个包的其他依赖包,不然又要手动安装其他依赖包了,会累死,实在太多了。部分人会遇到安装过程中重启后在自动配置阶段会卡在3%、44%等位置,我安装的时候就遇到来这种情况,卡在44%的时候最多,还有几次是卡在来别的地方,重新安装来数次都会卡住,后来在网上找到来一个解决方法,就是在安装设置检查页重新选择安装包,手动选择安装kernel-firmware包,这个包默认没有安装,需要手动选择安装,然后再安装就没问题了。
我们使用命令mvn install:install-file -Dfile=your-jar-file-path -DgroupId=com.your.group -DartifactId=your-artifactId -Dversion=x.x -Dpackaging=jar在doc中进行jar的安装

-Dfile:指明需要安装的jar包所在的位置
-DgroupId:指明groupId

-DartifactId:指明artifactId
-Dversion:指明版本

上面的后三个参数对应pom文件中配置时的三个参数,两者要对应,pom文件中如下:
<dependency> <groupId>alipay</groupId> <artifactId>alipay</artifactId> <version>1.0.0</version> </dependency>

当我们执行这个命令时切记要在pom文件所在的路径下,否则会报如下错误(找不到pom文件):
[INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Maven Stub Project (No POM) 1 [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-install-plugin:2.4:install-file (default-cli) @ standalone-pom --- [ERROR] The specified file ‘C:\Users\user\your-jar-file-path‘ not exists [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.363 s [INFO] Finished at: 2017-08-07T21:09:17+08:00 [INFO] Final Memory: 6M/63M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.4:install-file (default-cli) on project standalone-pom: The specified file ‘C:\Users\user\your-jar-file-path‘ not exists -> [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
当我们进入pom文件路径下执行便会执行成功:
[INFO] Scanning for projects... [WARNING] [WARNING] Some problems were encountered while building the effective model for com.ai.ecs:ics-web:war:0.0.1 [WARNING] ‘build.plugins.plugin.(groupId:artifactId)‘ must be unique but found duplicate declaration of plugin org.mortbay.jetty:jetty-maven-plugin @ com.ai.ecs:ics-web:[unknown-version], C:\yx\nanjingSvn(1)\src\echannel\trunk\web\ics-web\pom.xml, line 204, column 13 [WARNING] [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. [WARNING] [WARNING] For this reason, future Maven versions might no longer support building such malformed projects. [WARNING] [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building ics-web 0.0.1 [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-install-plugin:2.4:install-file (default-cli) @ ics-web --- [INFO] Installing D:\my-jar\alipay-sdk-java20170307171631.jar to C:\Users\user\m2\repository\com\your\group\your-artifactId\0.0.0\your-artifactId-0.0.0.jar [INFO] Installing C:\Users\user\AppData\Local\Temp\mvninstall959507239612006886.pom to C:\Users\user\m2\repository\com\your\group\your-artifactId\0.0.0\your-artifactId-0.0.0.pom [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2.396 s [INFO] Finished at: 2017-08-07T21:12:48+08:00 [INFO] Final Memory: 9M/108M [INFO] ------------------------------------------------------------------------
安装完之后我们打开本地仓库就会看到创建出了自己所加的文件路径,然后我们在pom文件中添加依赖就ok了
本文来自电脑杂谈,转载请注明本文网址:
https://www.pc-fly.com/a/shouji/article-99691-1.html
RIO本人购买价格12元
我们会一直陪你的