日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

部署shiro官方源码时,执行maven命令出错

發布時間:2023/12/3 编程问答 32 豆豆
生活随笔 收集整理的這篇文章主要介紹了 部署shiro官方源码时,执行maven命令出错 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

轉載自??部署shiro官方源碼時,執行maven命令出錯

部署shiro官方源碼時,執行maven命令會報下面錯誤:

[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-toolchains-plugin:1.1:toolchain (default) on project shiro-root: Cannot find matching toolchain definitions for the following toolchain types:
[ERROR] jdk [ vendor='sun' version='1.6' ]
[ERROR] Please make sure you define the required toolchains in your ~/.m2/toolchains.xml file.
[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/MojoFailureException

解決辦法:

打開maven的安裝目錄或者免安裝的conf文件夾,修改里邊的toolchains.xml文件,

下面是maventoolchains.xml文件代碼,最后一部分是添加進來的,注意修改自己jdk的安裝目錄。

<?xml version="1.0" encoding="UTF-8"?><!-- 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 athttp://www.apache.org/licenses/LICENSE-2.0Unless 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. --><!--| This is the toolchains file for Maven. It can be specified at two levels:|| 1. User Level. This toolchains.xml file provides configuration for a single user,| and is normally provided in ${user.home}/.m2/toolchains.xml.|| NOTE: This location can be overridden with the CLI option:|| -t /path/to/user/toolchains.xml|| 2. Global Level. This toolchains.xml file provides configuration for all Maven| users on a machine (assuming they're all using the same Maven| installation). It's normally provided in| ${maven.home}/conf/toolchains.xml.|| NOTE: This location can be overridden with the CLI option:|| -gt /path/to/global/toolchains.xml|| The sections in this sample file are intended to give you a running start at| getting the most out of your Maven installation.|--> <toolchains xmlns="http://maven.apache.org/TOOLCHAINS/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/TOOLCHAINS/1.1.0 http://maven.apache.org/xsd/toolchains-1.1.0.xsd"><!-- | With toolchains you can refer to installations on your system. This | way you don't have to hardcode paths in your pom.xml. | | Every toolchain consist of 3 elements: | * type: the type of tool. An often used value is 'jdk'. Toolchains-aware | plugins should document which type you must use. | | * provides: A list of key/value-pairs. | Based on the toolchain-configuration in the pom.xml Maven will search for | matching <provides/> configuration. You can decide for yourself which key-value | pairs to use. Often used keys are 'version', 'vendor' and 'arch'. By default | the version has a special meaning. If you configured in the pom.xml '1.5' | Maven will search for 1.5 and above.| | * configuration: Additional configuration for this tool.| Look for documentation of the toolchains-aware plugin which configuration elements| can be used. || See also http://maven.apache.org/guides/mini/guide-using-toolchains.html|| General example<toolchain><type/><provides> <version>1.0</version> </provides> <configuration/></toolchain>| JDK examples<toolchain><type>jdk</type><provides><version>1.5</version><vendor>sun</vendor></provides><configuration><jdkHome>/path/to/jdk/1.5</jdkHome></configuration></toolchain><toolchain><type>jdk</type><provides><version>1.6</version><vendor>sun</vendor></provides><configuration><jdkHome>/path/to/jdk/1.6</jdkHome></configuration></toolchain> --> <!--插入下面代碼--><toolchain><type>jdk</type><provides><version>1.6</version><vendor>sun</vendor></provides><configuration><!--這里是你安裝jdk的文件目錄--><jdkHome>C:\java\jdk1.6.0_10</jdkHome></configuration></toolchain> </toolchains>

?

總結

以上是生活随笔為你收集整理的部署shiro官方源码时,执行maven命令出错的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。