Skip to content

Commit

Permalink
generate pom in the jar
Browse files Browse the repository at this point in the history
  • Loading branch information
Schmoho committed Aug 18, 2024
1 parent f433465 commit f7775cd
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ plugins {
id "com.github.ben-manes.versions" version "0.51.0"
id "java"
id "application"
id "maven-publish"
}

/** === Core Gradle configuration === **/
Expand Down Expand Up @@ -172,8 +173,27 @@ tasks.withType(Jar).configureEach {
"Main-Class": "edu.ucsd.sbrg.ModelPolisherCLILauncher"
)
}
into("META-INF/maven/${project.group}/${project.name}") {
from generatePomFileForMavenPublication
rename { it.replace('pom-default.xml', 'pom.xml') }
}
}


publishing {
publications {
maven(MavenPublication) {
groupId = 'edu.ucsd.sbrg'
artifactId = 'ModelPolisher'
version = '2.1'

from components.java
}
}
}



// enable deprecation linter in compilation
tasks.withType(JavaCompile).configureEach {
options.compilerArgs << '-Xlint:deprecation'
Expand Down Expand Up @@ -255,4 +275,4 @@ tasks.register('uberjar', Jar) {
*/
application {
mainClass.set('ModelPolisher')
}
}

0 comments on commit f7775cd

Please sign in to comment.