Browse Source

新增私服配置

hubin 1 year ago
parent
commit
512c249ba9
2 changed files with 24 additions and 4 deletions
  1. 7 4
      build.gradle
  2. 17 0
      pom.xml

+ 7 - 4
build.gradle

@@ -9,6 +9,13 @@ ext {
         maven {
             allowInsecureProtocol = true
             url 'http://git.aizuda.com/api/packages/aizuda/maven'
+            credentials(HttpHeaderCredentials) {
+                name = "Authorization"
+                value = "token 7d725429ef7ac5c9fa9a6779f70032d6e42d7f34"
+            }
+            authentication {
+                header(HttpHeaderAuthentication)
+            }
         }
         maven { url 'https://maven.aliyun.com/repository/central' }
         maven { url 'https://maven.aliyun.com/repository/spring' }
@@ -29,10 +36,6 @@ buildscript {
     // 仓库配置
     repositories {
         mavenLocal()
-        maven {
-            allowInsecureProtocol = true
-            url 'http://git.aizuda.com/api/packages/aizuda/maven'
-        }
         maven { url 'https://maven.aliyun.com/repository/central' }
         maven { url 'https://maven.aliyun.com/repository/spring' }
         maven { url 'https://maven.aliyun.com/repository/google' }

+ 17 - 0
pom.xml

@@ -25,6 +25,23 @@
 		<repository>
 			<id>gitea</id>
 			<url>http://git.aizuda.com/api/packages/aizuda/maven</url>
+			<!-- 私服软件下载 maven 配置 settings.xml 文件中:
+			<settings>
+			  <servers>
+				<server>
+				  <id>gitea</id>
+				  <configuration>
+					<httpHeaders>
+					  <property>
+						<name>Authorization</name>
+						<value>token 7d725429ef7ac5c9fa9a6779f70032d6e42d7f34</value>
+					  </property>
+					</httpHeaders>
+				  </configuration>
+				</server>
+			  </servers>
+			</settings>
+			-->
 		</repository>
 	</repositories>