Gradle – jar file name in java plugin

Here is the directory structure:

trunk
˪ build
  ˪ libs
    ˪ project1-1.0-SNAPSHOT.jar 
˪ build.gradle

Include the following in build.gradle:

apply plugin: 'java'
apply plugin: 'maven'

archivesBaseName="project1"
version = '1.0-SNAPSHOT'
group = 'example'
     

This will produce the correct ZIPs, POMs and JARs.


Additionally, try setting:

archivesBaseName="project1"

or (deprecated):

jar.baseName="project1"

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)