mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-20 06:45:50 +00:00
task: nexus conf
This commit is contained in:
parent
6b64894474
commit
67513fde53
2 changed files with 67 additions and 6 deletions
36
build.gradle
36
build.gradle
|
@ -7,6 +7,7 @@ plugins {
|
|||
id 'io.spring.javaformat' version '0.0.43'
|
||||
id "io.spring.nohttp" version "0.0.11"
|
||||
id("pl.allegro.tech.build.axion-release") version "1.18.7"
|
||||
id 'maven-publish'
|
||||
}
|
||||
|
||||
apply plugin: 'java'
|
||||
|
@ -23,8 +24,41 @@ java {
|
|||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
from components.java
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven {
|
||||
name = "Nexus"
|
||||
url = uri("http://localhost:8081/repository/maven-releases/")
|
||||
allowInsecureProtocol = true
|
||||
credentials {
|
||||
username = "admin"
|
||||
password = System.getenv("NEXUS_PASSWORD")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register('publishToNexus') {
|
||||
dependsOn publish
|
||||
}
|
||||
|
||||
repositories {
|
||||
repositories {
|
||||
maven {
|
||||
url "http://localhost:8081/repository/maven-central/"
|
||||
allowInsecureProtocol = true
|
||||
credentials {
|
||||
username = "admin"
|
||||
password = System.getenv("NEXUS_PASSWORD")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ext.checkstyleVersion = "10.20.0"
|
||||
|
|
35
pom.xml
35
pom.xml
|
@ -21,10 +21,10 @@
|
|||
<name>petclinic</name>
|
||||
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>local-repo</id>
|
||||
<url>file:////Users/idvylyuk/local-maven-repo</url>
|
||||
</repository>
|
||||
<snapshotRepository>
|
||||
<id>nexus-snapshots</id>
|
||||
<url>http://localhost:8081/repository/maven-snapshots/</url>
|
||||
</snapshotRepository>
|
||||
</distributionManagement>
|
||||
|
||||
<properties>
|
||||
|
@ -156,6 +156,33 @@
|
|||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
<version>${maven-deploy-plugin.version}</version>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.sonatype.plugins</groupId>
|
||||
<artifactId>nexus-staging-maven-plugin</artifactId>
|
||||
<version>1.5.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>default-deploy</id>
|
||||
<phase>deploy</phase>
|
||||
<goals>
|
||||
<goal>deploy</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<serverId>nexus</serverId>
|
||||
<nexusUrl>http://localhost:8081/nexus/</nexusUrl>
|
||||
<skipStaging>true</skipStaging>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-release-plugin</artifactId>
|
||||
|
|
Loading…
Reference in a new issue