spring-session SpringNexusPublishPlugin 源码
spring-session SpringNexusPublishPlugin 代码
文件路径:/buildSrc/src/main/java/org/springframework/gradle/maven/SpringNexusPublishPlugin.java
package org.springframework.gradle.maven;
import io.github.gradlenexus.publishplugin.NexusPublishExtension;
import io.github.gradlenexus.publishplugin.NexusPublishPlugin;
import io.github.gradlenexus.publishplugin.NexusRepository;
import org.gradle.api.Action;
import org.gradle.api.Plugin;
import org.gradle.api.Project;
import java.net.URI;
import java.time.Duration;
public class SpringNexusPublishPlugin implements Plugin<Project> {
@Override
public void apply(Project project) {
project.getPlugins().apply(NexusPublishPlugin.class);
NexusPublishExtension nexusPublishing = project.getExtensions().findByType(NexusPublishExtension.class);
nexusPublishing.getRepositories().create("ossrh", new Action<NexusRepository>() {
@Override
public void execute(NexusRepository nexusRepository) {
nexusRepository.getNexusUrl().set(URI.create("https://s01.oss.sonatype.org/service/local/"));
nexusRepository.getSnapshotRepositoryUrl().set(URI.create("https://s01.oss.sonatype.org/content/repositories/snapshots/"));
}
});
nexusPublishing.getConnectTimeout().set(Duration.ofMinutes(3));
nexusPublishing.getClientTimeout().set(Duration.ofMinutes(3));
}
}
相关信息
相关文章
spring-session MavenPublishingConventionsPlugin 源码
spring-session PublishAllJavaComponentsPlugin 源码
spring-session PublishArtifactsPlugin 源码
spring-session PublishLocalPlugin 源码
0
赞
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
8、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦