When I publish to a local maven repository from a Gradle project, I find that the main JAR file has a -plain suffix.
pdffer/pdffer-template/1.0-SNAPSHOT
➜ ll
total 32
-rw-r--r-- 1 fedmest staff 918B Sep 1 16:39 maven-metadata-local.xml
-rw-r--r-- 1 fedmest staff 3.8K Sep 1 16:39 pdffer-template-1.0-SNAPSHOT-plain.jar
-rw-r--r-- 1 fedmest staff 1.9K Sep 1 16:39 pdffer-template-1.0-SNAPSHOT.module
-rw-r--r-- 1 fedmest staff 1.7K Sep 1 16:39 pdffer-template-1.0-SNAPSHOT.pom
When I include this library as a Maven dependency from a POM file, it cannot find it - it only works if I rename the main JAR to exclude the -plain suffix. Can I get Gradle to generate the JAR without the suffix? Any idea why the suffix appears, please?
To disable 'plain', follow the springboot documentation: https://docs.spring.io/spring-boot/docs/current/gradle-plugin/reference/htmlsingle/#packaging-executable.and-plain-archives
jar {
classifier = ''
}
I also found the answer here: https://stackoverflow.com/a/67752182/11723872
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With