mavenmavenmaven私服REAI2023-06-032024-04-18maven的setting文件中 在servers下 创建 12345 <server> <id>github</id> <username>用户名</username> <password>密码</password> </server> 12345678910111213141516171819202122232425262728293031323334353637383940414243<build> <plugins> <!--maven-deploy-plugin maven发布插件--> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-deploy-plugin</artifactId> <version>2.8.2</version> <configuration> <altDeploymentRepository> internal.repo::default::file://${project.build.directory}/maven-repo </altDeploymentRepository> </configuration> </plugin> <!--site-maven-plugin--> <plugin> <groupId>com.github.github</groupId> <artifactId>site-maven-plugin</artifactId> <version>0.12</version> <configuration> <message>常用依赖, version: ${project.version}</message><!--提交信息--> <noJekyll>true</noJekyll> <outputDirectory>${project.build.directory}/maven-repo</outputDirectory> <!--本地jar地址--> <branch>refs/heads/main</branch><!--分支的名称--> <merge>true</merge> <includes> <include>**/*</include> </includes> <repositoryName>maven-repo</repositoryName><!--对应github上创建的仓库名称 name--> <repositoryOwner>qwe</repositoryOwner><!--github 仓库所有者即登录用户名--> </configuration> <executions> <execution> <goals> <goal>site</goal> </goals> <phase>deploy</phase> </execution> </executions> </plugin> </plugins></build>