jenkins是在自己window10的笔记本上用war包运行的
maven用的是自己idea开发时指定的
setting.xml配置如下:
maven的配置如下:
打包成功了但也没成功,jar包有打出来,而且可以正常运行。但是最后冷不丁地报了一个错误:
Started by user root Running as SYSTEM Building in workspace C:\Users\傅建祥\.jenkins\workspace\任务2 The recommended git tool is: NONE using credential 88ff36c7-31a7-4a8b-85f1-42cbf4260f1f > D:\soft\Git\Git\bin\git.exe rev-parse --resolve-git-dir C:\Users\傅建祥\.jenkins\workspace\任务2\.git # timeout=10 Fetching changes from the remote Git repository > D:\soft\Git\Git\bin\git.exe config remote.origin.url https://gitee.com/aramatena/cloudali2.git # timeout=10 Fetching upstream changes from https://gitee.com/aramatena/cloudali2.git > D:\soft\Git\Git\bin\git.exe --version # timeout=10 > git --version # 'git version 2.20.1.windows.1' using GIT_ASKPASS to set credentials 账号密码 > D:\soft\Git\Git\bin\git.exe fetch --tags --force --progress -- https://gitee.com/aramatena/cloudali2.git +refs/heads/*:refs/remotes/origin/* # timeout=10 > D:\soft\Git\Git\bin\git.exe rev-parse "refs/remotes/origin/demo_4_getway^{commit}" # timeout=10 Checking out Revision 308b6ba29fcc8fd40866e218c1644e41ab514da3 (refs/remotes/origin/demo_4_getway) > D:\soft\Git\Git\bin\git.exe config core.sparsecheckout # timeout=10 > D:\soft\Git\Git\bin\git.exe checkout -f 308b6ba29fcc8fd40866e218c1644e41ab514da3 # timeout=10 Commit message: "fix:初步完成sentinel-dashboard的引入" > D:\soft\Git\Git\bin\git.exe rev-list --no-walk 308b6ba29fcc8fd40866e218c1644e41ab514da3 # timeout=10 [任务2] $ cmd.exe /C "D:\soft\zip\apache-maven-3.5.3\bin\mvn.cmd -s D:\soft\zip\apache-maven-3.5.3\my\settings.xml -gs D:\soft\zip\apache-maven-3.5.3\my\settings.xml -DskipTests=true clean compile package && exit %%ERRORLEVEL%%" [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Reactor Build Order: [INFO] [INFO] cloudali2 [pom] [INFO] service-api [pom] [INFO] payment-service-api [jar] [INFO] service [pom] [INFO] payment-service [jar] [INFO] account-service [jar] [INFO] gateway-service [jar] [INFO] [INFO] -----------------------< com.example:cloudali2 >------------------------ [INFO] Building cloudali2 1.0-SNAPSHOT [1/7] [INFO] --------------------------------[ pom ]--------------------------------- [INFO] [INFO] --- maven-clean-plugin:3.2.0:clean (default-clean) @ cloudali2 --- [INFO] [INFO] ----------------------< com.example:service-api >----------------------- [INFO] Building service-api 1.0-SNAPSHOT [2/7] [INFO] --------------------------------[ pom ]--------------------------------- [INFO] [INFO] --- maven-clean-plugin:3.2.0:clean (default-clean) @ service-api --- [INFO] [INFO] ------------------< com.example:payment-service-api >------------------- [INFO] Building payment-service-api 1.0-SNAPSHOT [3/7] [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-clean-plugin:3.2.0:clean (default-clean) @ payment-service-api --- [INFO] Deleting C:\Users\傅建祥\.jenkins\workspace\任务2\service-api\payment-service-api\target [INFO] [INFO] --- maven-resources-plugin:3.2.0:resources (default-resources) @ payment-service-api --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Using 'UTF-8' encoding to copy filtered properties files. [INFO] skip non existing resourceDirectory C:\Users\傅建祥\.jenkins\workspace\任务2\service-api\payment-service-api\src\main\resources [INFO] skip non existing resourceDirectory C:\Users\傅建祥\.jenkins\workspace\任务2\service-api\payment-service-api\src\main\resources [INFO] [INFO] --- maven-compiler-plugin:3.10.1:compile (default-compile) @ payment-service-api --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 2 source files to C:\Users\傅建祥\.jenkins\workspace\任务2\service-api\payment-service-api\target\classes [INFO] [INFO] --- maven-resources-plugin:3.2.0:resources (default-resources) @ payment-service-api --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Using 'UTF-8' encoding to copy filtered properties files. [INFO] skip non existing resourceDirectory C:\Users\傅建祥\.jenkins\workspace\任务2\service-api\payment-service-api\src\main\resources [INFO] skip non existing resourceDirectory C:\Users\傅建祥\.jenkins\workspace\任务2\service-api\payment-service-api\src\main\resources [INFO] [INFO] --- maven-compiler-plugin:3.10.1:compile (default-compile) @ payment-service-api --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 2 source files to C:\Users\傅建祥\.jenkins\workspace\任务2\service-api\payment-service-api\target\classes [INFO] [INFO] --- maven-resources-plugin:3.2.0:testResources (default-testResources) @ payment-service-api --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Using 'UTF-8' encoding to copy filtered properties files. [INFO] skip non existing resourceDirectory C:\Users\傅建祥\.jenkins\workspace\任务2\service-api\payment-service-api\src\test\resources [INFO] [INFO] --- maven-compiler-plugin:3.10.1:testCompile (default-testCompile) @ payment-service-api --- [INFO] No sources to compile [INFO] [INFO] --- maven-surefire-plugin:2.22.2:test (default-test) @ payment-service-api --- [INFO] Tests are skipped. [INFO] [INFO] --- maven-jar-plugin:3.2.2:jar (default-jar) @ payment-service-api --- [INFO] Building jar: C:\Users\傅建祥\.jenkins\workspace\任务2\service-api\payment-service-api\target\payment-service-api-1.0-SNAPSHOT.jar [INFO] [INFO] ------------------------< com.example:service >------------------------- [INFO] Building service 1.0-SNAPSHOT [4/7] [INFO] --------------------------------[ pom ]--------------------------------- [INFO] [INFO] --- maven-clean-plugin:3.2.0:clean (default-clean) @ service --- [INFO] [INFO] --------------------< com.example:payment-service >--------------------- [INFO] Building payment-service 1.0-SNAPSHOT [5/7] [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-clean-plugin:3.2.0:clean (default-clean) @ payment-service --- [INFO] Deleting C:\Users\傅建祥\.jenkins\workspace\任务2\service\payment-service\target [INFO] [INFO] --- maven-resources-plugin:3.2.0:resources (default-resources) @ payment-service --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Using 'UTF-8' encoding to copy filtered properties files. [INFO] Copying 1 resource [INFO] Copying 1 resource [INFO] [INFO] --- maven-compiler-plugin:3.10.1:compile (default-compile) @ payment-service --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 3 source files to C:\Users\傅建祥\.jenkins\workspace\任务2\service\payment-service\target\classes [INFO] [INFO] --- maven-resources-plugin:3.2.0:resources (default-resources) @ payment-service --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Using 'UTF-8' encoding to copy filtered properties files. [INFO] Copying 1 resource [INFO] Copying 1 resource [INFO] [INFO] --- maven-compiler-plugin:3.10.1:compile (default-compile) @ payment-service --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 3 source files to C:\Users\傅建祥\.jenkins\workspace\任务2\service\payment-service\target\classes [INFO] [INFO] --- maven-resources-plugin:3.2.0:testResources (default-testResources) @ payment-service --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Using 'UTF-8' encoding to copy filtered properties files. [INFO] skip non existing resourceDirectory C:\Users\傅建祥\.jenkins\workspace\任务2\service\payment-service\src\test\resources [INFO] [INFO] --- maven-compiler-plugin:3.10.1:testCompile (default-testCompile) @ payment-service --- [INFO] No sources to compile [INFO] [INFO] --- maven-surefire-plugin:2.22.2:test (default-test) @ payment-service --- [INFO] Tests are skipped. [INFO] [INFO] --- maven-jar-plugin:3.2.2:jar (default-jar) @ payment-service --- [INFO] Building jar: C:\Users\傅建祥\.jenkins\workspace\任务2\service\payment-service\target\payment-service-1.0-SNAPSHOT.jar [INFO] [INFO] --- spring-boot-maven-plugin:2.7.2:repackage (repackage) @ payment-service --- [INFO] Replacing main artifact with repackaged archive [INFO] [INFO] --------------------< com.example:account-service >--------------------- [INFO] Building account-service 1.0-SNAPSHOT [6/7] [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-clean-plugin:3.2.0:clean (default-clean) @ account-service --- [INFO] Deleting C:\Users\傅建祥\.jenkins\workspace\任务2\service\account-service\target [INFO] [INFO] --- maven-resources-plugin:3.2.0:resources (default-resources) @ account-service --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Using 'UTF-8' encoding to copy filtered properties files. [INFO] Copying 1 resource [INFO] Copying 1 resource [INFO] [INFO] --- maven-compiler-plugin:3.10.1:compile (default-compile) @ account-service --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 2 source files to C:\Users\傅建祥\.jenkins\workspace\任务2\service\account-service\target\classes [INFO] [INFO] --- maven-resources-plugin:3.2.0:resources (default-resources) @ account-service --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Using 'UTF-8' encoding to copy filtered properties files. [INFO] Copying 1 resource [INFO] Copying 1 resource [INFO] [INFO] --- maven-compiler-plugin:3.10.1:compile (default-compile) @ account-service --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 2 source files to C:\Users\傅建祥\.jenkins\workspace\任务2\service\account-service\target\classes [INFO] [INFO] --- maven-resources-plugin:3.2.0:testResources (default-testResources) @ account-service --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Using 'UTF-8' encoding to copy filtered properties files. [INFO] skip non existing resourceDirectory C:\Users\傅建祥\.jenkins\workspace\任务2\service\account-service\src\test\resources [INFO] [INFO] --- maven-compiler-plugin:3.10.1:testCompile (default-testCompile) @ account-service --- [INFO] No sources to compile [INFO] [INFO] --- maven-surefire-plugin:2.22.2:test (default-test) @ account-service --- [INFO] Tests are skipped. [INFO] [INFO] --- maven-jar-plugin:3.2.2:jar (default-jar) @ account-service --- [INFO] Building jar: C:\Users\傅建祥\.jenkins\workspace\任务2\service\account-service\target\account-service-1.0-SNAPSHOT.jar [INFO] [INFO] --- spring-boot-maven-plugin:2.7.2:repackage (repackage) @ account-service --- [INFO] Replacing main artifact with repackaged archive [INFO] [INFO] --------------< org.springframework.boot:gateway-service >-------------- [INFO] Building gateway-service 2.1.4.RELEASE [7/7] [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ gateway-service --- [INFO] Deleting C:\Users\傅建祥\.jenkins\workspace\任务2\service\gateway-service\target [INFO] [INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ gateway-service --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 0 resource [INFO] Copying 2 resources [INFO] [INFO] --- maven-compiler-plugin:3.8.0:compile (default-compile) @ gateway-service --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 9 source files to C:\Users\傅建祥\.jenkins\workspace\任务2\service\gateway-service\target\classes [INFO] /C:/Users/傅建祥/.jenkins/workspace/任务2/service/gateway-service/src/main/java/com/example/gateway/config/RedisConfiguration.java: 某些输入文件使用了未经检查或不安全的操作。 [INFO] /C:/Users/傅建祥/.jenkins/workspace/任务2/service/gateway-service/src/main/java/com/example/gateway/config/RedisConfiguration.java: 有关详细信息, 请使用 -Xlint:unchecked 重新编译。 [INFO] [INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ gateway-service --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 0 resource [INFO] Copying 2 resources [INFO] [INFO] --- maven-compiler-plugin:3.8.0:compile (default-compile) @ gateway-service --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] --- maven-resources-plugin:3.1.0:testResources (default-testResources) @ gateway-service --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory C:\Users\傅建祥\.jenkins\workspace\任务2\service\gateway-service\src\test\resources [INFO] [INFO] --- maven-compiler-plugin:3.8.0:testCompile (default-testCompile) @ gateway-service --- [INFO] No sources to compile [INFO] [INFO] --- maven-surefire-plugin:2.22.1:test (default-test) @ gateway-service --- [INFO] Tests are skipped. [INFO] [INFO] --- maven-jar-plugin:3.1.1:jar (default-jar) @ gateway-service --- [INFO] Building jar: C:\Users\傅建祥\.jenkins\workspace\任务2\service\gateway-service\target\gateway-service-2.1.4.RELEASE.jar [INFO] [INFO] --- spring-boot-maven-plugin:2.1.4.RELEASE:repackage (repackage) @ gateway-service --- [INFO] Replacing main artifact with repackaged archive [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] cloudali2 1.0-SNAPSHOT ............................. SUCCESS [ 0.166 s] [INFO] service-api ........................................ SUCCESS [ 0.003 s] [INFO] payment-service-api ................................ SUCCESS [ 3.915 s] [INFO] service ............................................ SUCCESS [ 0.004 s] [INFO] payment-service .................................... SUCCESS [ 2.353 s] [INFO] account-service .................................... SUCCESS [ 1.932 s] [INFO] gateway-service 2.1.4.RELEASE ...................... SUCCESS [ 2.376 s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 11.751 s [INFO] Finished at: 2022-09-05T14:38:44+08:00 [INFO] ------------------------------------------------------------------------ Parsing POMs ERROR: No such settings file C:\Users\傅建祥\.jenkins\workspace\任务2\?D:\soft\zip\apache-maven-3.5.3\my\settings.xml exists Please verify that your alternate settings file is specified properly and exists in the workspace. Finished: FAILURE
正常人的项目里怎么可能会有maven的setting文件。打包的时候都知道用我指定setting文件。最后怎么还去我项目里找了一次,意义不明。