Fixup in syntax

This commit is contained in:
JustFiesta 2024-04-28 13:42:43 +02:00
parent 449d1730c9
commit 664a740b9a
2 changed files with 33 additions and 39 deletions

32
Jenkinsfile vendored Normal file
View file

@ -0,0 +1,32 @@
pipeline {
agent any
tools {
// Install the Maven version configured as "M3" and add it to the path.
gradle "8.6"
}
stages {
stage('Build') {
steps {
// Get some code from a GitHub repository
git 'https://github.com/jglick/simple-maven-project-with-tests.git'
// Run Maven on a Unix agent.
sh "mvn -Dmaven.test.failure.ignore=true clean package"
// To run Maven on a Windows agent, use
// bat "mvn -Dmaven.test.failure.ignore=true clean package"
}
post {
// If Maven was able to run the tests, even if some of the test
// failed, record the test results and archive the jar file.
success {
junit '**/target/surefire-reports/TEST-*.xml'
archiveArtifacts 'target/*.jar'
}
}
}
}
}

View file

@ -1,9 +1,5 @@
import java.awt.Desktop
ext {
checkstyleVersion = '10.14.2'
}
plugins {
id 'java'
id 'org.springframework.boot' version '3.2.0'
@ -41,15 +37,11 @@ java {
}
checkstyle {
toolVersion = checkstyleVersion
toolVersion = '10.14.2'
}
repositories {
mavenCentral()
maven {
url 'http://localhost:9081/repository/maven-central-proxy/'
allowInsecureProtocol = true
}
}
ext.webjarsFontawesomeVersion = "4.7.0"
@ -130,36 +122,6 @@ task listRepos {
}
}
publishing {
publications {
maven(MavenPublication) {
artifact("build/libs/$rootProject.name-$version"+".jar") {
extension 'jar'
}
}
}
repositories {
maven {
name 'nexus-releases-private'
name 'Nexus_Repo'
def releasesRepoUrl = 'http://localhost:9081/repository/maven-releases-private/'
def snapshotsRepoUrl = 'http://localhost:9081/repository/maven-snapshost-private/'
url = project.version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
allowInsecureProtocol = true
credentials {
username project.repoUser
password project.repoPassword
}
}
}
}
tasks.named('publishMavenPublicationToNexus_RepoRepository') {
mustRunAfter('bootJar')
}
checkstyleAot.enabled = false
checkstyleAotTest.enabled = false