Skip to content

Commit

Permalink
deploy to a local tempdir instead of upstream archives
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Reed committed Jun 22, 2023
1 parent dff27dd commit 56c394a
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 19 deletions.
4 changes: 2 additions & 2 deletions buildSrc/src/main/groovy/MavenBomPlugin.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ public class MavenBomPlugin implements Plugin<Project> {
project.plugins.apply(MavenPlugin)
project.task(MAVEN_BOM_TASK_NAME, type: MavenBomTask, group: 'Generate', description: 'Configures the pom as a Maven Build of Materials (BOM)')
project.install.dependsOn project.mavenBom
project.uploadArchives.dependsOn project.mavenBom
// project.uploadArchives.dependsOn project.mavenBom
}
}
}
10 changes: 5 additions & 5 deletions buildSrc/src/main/groovy/MavenBomTask.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ public class MavenBomTask extends DefaultTask {
}
}

project.uploadArchives {
repositories.mavenDeployer {
customizePom(pom)
}
}
// project.uploadArchives {
// repositories.mavenDeployer {
// customizePom(pom)
// }
// }
}

public void customizePom(pom) {
Expand Down
16 changes: 11 additions & 5 deletions gradle/deploy-artifacts.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
def isSnapshot = version?.matches(/^.*[.-]BUILD-SNAPSHOT$/)

apply plugin: 'maven'

uploadArchives {
repositories {
mavenDeployer {
repository(url: "file:///tmp/spring-security")
}
}
}

task deployArtifacts {
group = 'Deploy tasks'
description = "Deploys the artifacts to either Artifactory or Maven Central"
if(isSnapshot) {
dependsOn "artifactoryPublish"
} else {
dependsOn "uploadArchives"
}
dependsOn "uploadArchives"
}
4 changes: 2 additions & 2 deletions gradle/javaprojects.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ apply plugin: 'javadocHotfix'
apply plugin: 'propdeps'
apply plugin: 'propdeps-maven'

sourceCompatibility = 1.6
targetCompatibility = 1.6
sourceCompatibility = 1.8
targetCompatibility = 1.8

ext.apacheDsVersion = '1.5.5'
ext.aspectjVersion = '1.8.14'
Expand Down
10 changes: 5 additions & 5 deletions gradle/maven-deployment.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ install {
}
}

uploadArchives {
repositories.mavenDeployer {
customizePom(pom, project)
}
}
//uploadArchives {
// repositories.mavenDeployer {
// customizePom(pom, project)
// }
//}

def customizePom(pom, gradleProject) {
pom.whenConfigured { p ->
Expand Down

0 comments on commit 56c394a

Please sign in to comment.