作者:admin发布时间:2021-09-29分类:传奇私服浏览:298评论:7

?="1.0"="UTF-8"?!--(ASF),(the"");-2.0Unlessrequiredbyapplicablelaworagreedtoinwriting,softwaredistributedundertheLicenseisdistributedonan"ASIS"BASIS,WITHOUTWARRANTIESORCONDITIONSOFANYKIND,eitherexpressorimplied.SeetheLicenseforthespecificlanguagegoverningpermissionsandlimitationsundertheLicense.--!--|ThisistheconfigurationfileforMaven.Itcanbespecifiedattwolevels:||1.UserLevel.Thissettings.xmlfileprovidesconfigurationforasingleuser,|andisnormallyprovidedin${user.home}/.m2/settings.xml.||NOTE:ThislocationcanbeoverriddenwiththeCLIoption:||-s/path/to/user/settings.xml||2.GlobalLevel.Thissettings.xmlfileprovidesconfigurationforallMaven|usersonamachine(assumingthey'reallusingthesameMaven|installation).It'snormallyprovidedin|${maven.home}/conf/settings.xml.||NOTE:ThislocationcanbeoverriddenwiththeCLIoption:||-gs/path/to/global/settings.xml||Thesectionsinthissamplefileareintendedtogiveyouarunningstartat|gettingthemostoutofyourMaveninstallation.Whereappropriate,thedefault|values(valuesusedwhenthesettingisnotspecified)areprovided.||--settingsxmlns="http://maven.apache.org/SETTINGS/1.0.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0http://maven.apache.org/xsd/settings-1.0.0.xsd"!--localRepository|Thepathtothelocalrepositorymavenwillusetostoreartifacts.||Default:~/.m2/repository--localRepository/Users/haiermacbookpro/.m2/repository/localRepository!--interactiveMode|Thiswilldeterminewhethermavenpromptsyouwhenitneedsinput.Ifsettofalse,|mavenwilluseasensibledefaultvalue,perhapsbasedonsomeothersetting,for|theparameterinquestion.||Default:trueinteractiveModetrue/interactiveMode--!--offline|Determineswhethermavenshouldattempttoconnecttothenetworkwhenexecutingabuild.|Thiswillhaveaneffectonartifactdownloads,artifactdeployment,andothers.||Default:falseofflinefalse/offline--!--pluginGroups|Thisisalistofadditionalgroupidentifiersthatwillbesearchedwhenresolvingpluginsbytheirprefix,i.e.|wheninvokingacommandlinelike"mvnprefix:goal".Mavenwillautomaticallyaddthegroupidentifiers|"org.apache.maven.plugins"and"org.codehaus.mojo"ifthesearenotalreadycontainedinthelist.|--pluginGroups!--pluginGroup|Specifiesafurthergroupidentifiertouseforpluginlookup.pluginGroupcom.your.plugins/pluginGroup--pluginGrouporg.mortbay.jetty/pluginGrouppluginGrouporg.sonarsource.scanner.maven/pluginGroup/pluginGroups!--proxies|Thisisalistofproxieswhichcanbeusedonthismachinetoconnecttothenetwork.|Unlessotherwisespecified(bysystempropertyorcommand-lineswitch),thefirstproxy|specificationinthislistmarkedasactivewillbeused.|--proxies!--proxy|Specificationforoneproxy,tobeusedinconnectingtothenetwork.|proxyidoptional/idactivetrue/activeprotocolhttp/protocolusernameproxyuser/usernamepasswordproxypass/passwordhostproxy.host.net/hostport80/portnonProxyHostslocal.net|some.host.com/nonProxyHosts/proxy--/proxies!--servers|Thisisalistofauthenticationprofiles,keyedbytheserver-idusedwithinthesystem.|Authenticationprofilescanbeusedwhenevermavenmustmakeaconnectiontoaremoteserver.|--servers!--server|Specifiestheauthenticationinformationtousewhenconnectingtoaparticularserver,identifiedby|auniquenamewithinthesystem(referredtobythe'id'attributebelow).||NOTE:Youshouldeitherspecifyusername/passwordORprivateKey/passphrase,sincethesepairingsare|usedtogether.|--serveriduhome-release/idusernamezhanghongpeng/usernamepasswordAP9tpWZxyNUAmrAuqEf3sVUtykV/password/serverserveriduhome-snapshot/idusernamezhanghongpeng/usernamepasswordAP9tpWZxyNUAmrAuqEf3sVUtykV/password/server/servers!--mirrors|Thisisalistofmirrorstobeusedindownloadingartifactsfromremoterepositories.||Itworkslikethis:aPOMmaydeclarearepositorytouseinresolvingcertainartifacts.|However,thisrepositorymayhaveproblemswithheavytrafficattimes,sopeoplehavemirrored|ittoseveralplaces.||Thatrepositorydefinitionwillhaveauniqueid,sowecancreateamirrorreferenceforthat|repository,tobeusedasanalternatedownloadsite.Themirrorsitewillbethepreferred|serverforthatrepository.|--mirrors!--mirror|Specifiesarepositorymirrorsitetouseinsteadofagivenrepository.Therepositorythat|thismirrorserveshasanIDthatmatchesthemirrorOfelementofthismirror.IDsareused|forinheritanceanddirectlookuppurposes,andmustbeuniqueacrossthesetofmirrors.|mirroridmirrorId/idmirrorOfrepositoryId/mirrorOfnameHumanReadableNameforthisMirror./nameurlhttp://my.repository.com/repo/path/url/mirror--/mirrors!--profiles|Thisisalistofprofileswhichcanbeactivatedinavarietyofways,andwhichcanmodify|thebuildprocess.Profilesprovidedinthesettings.xmlareintendedtoprovidelocalmachine-|specificpathsandrepositorylocationswhichallowthebuildtoworkinthelocalenvironment.||Forexample,ifyouhaveanintegrationtestingplugin-likecactus-thatneedstoknowwhere|yourTomcatinstanceisinstalled,youcanprovideavariableheresuchthatthevariableis|dereferencedduringthebuildprocesstoconfigurethecactusplugin.||Asnotedabove,profilescanbeactivatedinavarietyofways.Oneway-theactiveProfiles|sectionofthisdocument(settings.xml)-willbediscussedlater.Anotherwayessentially|reliesonthedetectionofasystemproperty,eithermatchingaparticularvaluefortheproperty,|ormerelytestingitsexistence.ProfilescanalsobeactivatedbyJDKversionprefix,wherea|valueof'1.4'mightactivateaprofilewhenthebuildisexecutedonaJDKversionof'1.4.2_07'.|Finally,thelistofactiveprofilescanbespecifieddirectlyfromthecommandline.||NOTE:Forprofilesdefinedinthesettings.xml,youarerestrictedtospecifyingonlyartifact|repositories,pluginrepositories,andfree-formpropertiestobeusedasconfiguration|variablesforpluginsinthePOM.||--profiles!--profile|Specifiesasetofintroductionstothebuildprocess,tobeactivatedusingoneormoreofthe|mechanismsdescribedabove.Forinheritancepurposes,andtoactivateprofilesviaactivatedProfiles/|orthecommandline,profileshavetohaveanIDthatisunique.||Anencouragedbestpracticeforprofileidentificationistouseaconsistentnamingconvention|forprofiles,suchas'env-dev','env-test','env-production','user-jdcasey','user-brett',etc.|Thiswillmakeitmoreintuitivetounderstandwhatthesetofintroducedprofilesisattempting|toaccomplish,particularlywhenyouonlyhavealistofprofileid'sfordebug.||ThisprofileexampleusestheJDKversiontotriggeractivation,andprovidesaJDK-specificrepo.profileidjdk-1.4/idactivationjdk1.4/jdk/activationrepositoriesrepositoryidjdk14/idnameRepositoryforJDK1.4builds/nameurlhttp://www.myhost.com/maven/jdk14/urllayoutdefault/layoutsnapshotPolicyalways/snapshotPolicy/repository/repositories/profile--!--|Hereisanotherprofile,activatedbythesystemproperty'target-env'withavalueof'dev',|whichprovidesaspecificpathtotheTomcatinstance.Tousethis,yourpluginconfiguration|mighthypotheticallylooklike:||...|plugin|groupIdorg.myco.myplugins/groupId|artifactIdmyplugin/artifactId||configuration|tomcatLocation${tomcatPath}/tomcatLocation|/configuration|/plugin|...||NOTE:Ifyoujustwantedtoinjectthisconfigurationwheneversomeoneset'target-env'to|anything,youcouldjustleaveoffthevalue/insidetheactivation-property.|profileidenv-dev/idactivationpropertynametarget-env/namevaluedev/value/property/activationpropertiestomcatPath/path/to/tomcat/instance/tomcatPath/properties/profile--profileidartifactory/idrepositoriesrepositoryidcentral/idurlhttp://10.159.42.37:18040/artifactory/uhome-repository/urlreleasesenabledtrue/enabledupdatePolicyalways/updatePolicy/releasessnapshotsenabledtrue/enabledupdatePolicyalways/updatePolicy/snapshots/repository!--新增阿里云--repositoryidaliyun/idurlhttp://maven.aliyun.com/nexus/content/groups/public//url/repository/repositoriespluginRepositoriespluginRepositoryidcentral/idurlhttp://10.159.42.37:18040/artifactory/uhome-repository/urlreleasesenabledtrue/enabledupdatePolicyalways/updatePolicy/releasessnapshotsenabledtrue/enabledupdatePolicyalways/updatePolicy/snapshots/pluginRepositorypluginRepositoryidaliyun/idurlhttp://maven.aliyun.com/nexus/content/groups/public//urlreleasesenabledtrue/enabledupdatePolicyalways/updatePolicy/releasessnapshotsenabledtrue/enabledupdatePolicyalways/updatePolicy/snapshots/pluginRepository/pluginRepositories/profile/profilesactiveProfilesactiveProfileartifactory/activeProfile/activeProfiles!--activeProfiles|Listofprofilesthatareactiveforallbuilds.|activeProfilesactiveProfilealwaysActiveProfile/activeProfileactiveProfileanotherAlwaysActiveProfile/activeProfile/activeProfiles--/settings
注意配置私服仓库访问的账号密码
定位问题原因*根据原因思考问题解决方案*实践验证方案有效性*提交验证结果
已有7位网友发表了看法: