Skip to content

Commit

Permalink
WIP 314 Add jar build configuration
Browse files Browse the repository at this point in the history
The final jar needs to contain several files built by
and for Maven as it is required for Maven plugins.
  • Loading branch information
ascheman committed Nov 25, 2024
1 parent ba9e0c7 commit 840f126
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions htmlSanityCheck-maven-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,30 @@ java {
withJavadocJar()
}

jar.configure {
dependsOn(generateMavenPlugin, "generatePomFileForMavenJavaPublication")
doFirst {
copy {
from('build/maven') {
include 'pom.properties'
}
into "build/classes/java/main/META-INF/maven/${project.group}/${project.name}"
}
copy {
from 'build/publications/mavenJava/pom-default.xml'
into "build/classes/java/main/META-INF/maven/${project.group}/${project.name}"
rename { 'pom.xml' }
}
copy {
from('build/maven/target/classes') {
include '**/*.xml'
exclude '**/*.class'
}
into 'build/classes/java/main'
}
}
}

publishing {
publications {
mavenJava(MavenPublication) {
Expand Down

0 comments on commit 840f126

Please sign in to comment.