Chen Bucheng I 2022-06-24 07:44:11 阅读数:97
effect : commonly , The repository is downloaded and deployed in pom.xml In the document repositories and distributionManagement Element . However , Generally similar to user name 、 password ( Some warehouse access requires security authentication ) Information should not be in pom.xml Configuration in file , This information can be configured in settings.xml in .
<settings xmlns="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.0 https://maven.apache.org/xsd/settings-1.0.0.xsd"> ... <!-- Configure some settings of the server . Some settings such as security certificates should not be associated with pom.xml Distribute together . This type of information should exist on the build server settings.xml In file . --> <servers> <!-- The server element contains the information needed to configure the server --> <server> <!-- This is a server Of id( Note that it's not the user who logs in id), The id And distributionManagement in repository Elemental id Match . --> <id>server001</id> <!-- Authentication user name . Authentication user name and authentication password represent the login name and password required for server authentication . --> <username>my_login</username> <!-- Authentication code . Authentication user name and authentication password represent the login name and password required for server authentication . Password encryption has been added to 2.1.0 +. For details, please visit the password encryption page --> <password>my_password</password> <!-- The location of the private key used in Authentication . Similar to the first two elements , The private key location and private key password specify a path for the private key ( The default is ${user.home}/.ssh/id_dsa) And if necessary , A secret language . future passphrase and password Elements may be extracted to the outside , But at the moment they have to be in settings.xml Documents are declared in plain text . --> <privateKey>${usr.home}/.ssh/id_dsa</privateKey> <!-- The private key password used in Authentication . --> <passphrase>some_passphrase</passphrase> <!-- Permissions when the file is created . If a warehouse file or directory is created during deployment , At this time, you can use permissions (permission). The legal value of these two elements is a three digit number , It corresponds to unix File system permissions , Such as 664, perhaps 775. --> <filePermissions>664</filePermissions> <!-- Permissions when the directory is created . --> <directoryPermissions>775</directoryPermissions> </server> </servers> ... </settings>
copyright:author[Chen Bucheng I],Please bring the original link to reprint, thank you. https://en.javamana.com/2022/175/20210628191924043I.html