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.javaformat' version '0.0.43'
|
||||||
id "io.spring.nohttp" version "0.0.11"
|
id "io.spring.nohttp" version "0.0.11"
|
||||||
id("pl.allegro.tech.build.axion-release") version "1.18.7"
|
id("pl.allegro.tech.build.axion-release") version "1.18.7"
|
||||||
|
id 'maven-publish'
|
||||||
}
|
}
|
||||||
|
|
||||||
apply plugin: 'java'
|
apply plugin: 'java'
|
||||||
|
@ -23,8 +24,41 @@ java {
|
||||||
sourceCompatibility = JavaVersion.VERSION_17
|
sourceCompatibility = JavaVersion.VERSION_17
|
||||||
}
|
}
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
publications {
|
||||||
|
mavenJava(MavenPublication) {
|
||||||
|
from components.java
|
||||||
|
}
|
||||||
|
}
|
||||||
|
repositories {
|
||||||
|
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 {
|
||||||
mavenCentral()
|
repositories {
|
||||||
|
maven {
|
||||||
|
url "http://localhost:8081/repository/maven-central/"
|
||||||
|
allowInsecureProtocol = true
|
||||||
|
credentials {
|
||||||
|
username = "admin"
|
||||||
|
password = System.getenv("NEXUS_PASSWORD")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ext.checkstyleVersion = "10.20.0"
|
ext.checkstyleVersion = "10.20.0"
|
||||||
|
|
37
pom.xml
37
pom.xml
|
@ -21,11 +21,11 @@
|
||||||
<name>petclinic</name>
|
<name>petclinic</name>
|
||||||
|
|
||||||
<distributionManagement>
|
<distributionManagement>
|
||||||
<repository>
|
<snapshotRepository>
|
||||||
<id>local-repo</id>
|
<id>nexus-snapshots</id>
|
||||||
<url>file:////Users/idvylyuk/local-maven-repo</url>
|
<url>http://localhost:8081/repository/maven-snapshots/</url>
|
||||||
</repository>
|
</snapshotRepository>
|
||||||
</distributionManagement>
|
</distributionManagement>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
|
||||||
|
@ -156,6 +156,33 @@
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<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>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-release-plugin</artifactId>
|
<artifactId>maven-release-plugin</artifactId>
|
||||||
|
|
Loading…
Reference in a new issue