Skip to content

Local jars in lib dir are not included in the jar anymore with gradle #672

@oliverwehrens

Description

@oliverwehrens

My build.gradle looks like this:

buildscript {
    repositories {
        maven { url "http://repo.spring.io/libs-snapshot" }
        mavenLocal()
    }
    dependencies {
        classpath("org.springframework.boot:spring-boot-gradle-plugin:1.0.1.RELEASE")
    }
}

apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'spring-boot'

jar {
    baseName = 'jpowermeter'
    version =  '0.1.0'
}

repositories {
    mavenCentral()
    maven { url "http://repo.spring.io/libs-snapshot" }
}

dependencies {
    compile("org.springframework.boot:spring-boot-starter-web:1.0.1.RELEASE") {
        exclude module: "spring-boot-starter-tomcat"
    }
    compile("org.springframework.boot:spring-boot-starter-jetty:1.0.1.RELEASE")
    compile("org.springframework.boot:spring-boot-starter-actuator:1.0.1.RELEASE")
    compile("org.springframework.boot:spring-boot-starter-data-jpa:1.0.1.RELEASE")
    compile("org.thymeleaf:thymeleaf-spring3:2.0.16")
    testCompile("junit:junit:4.11")
    compile files("libs/jsml-1.0.15.jar")
    compile("com.h2database:h2:1.3.172")
    compile files("libs/rxtxcomm_api-2.1.7.jar")
}

task wrapper(type: Wrapper) {
    gradleVersion = '1.8'
}

What happens is that jsml-1.0.15.jar and rxtxcomm_api-2.1.7.jar which are in the libs dir are not included anymore in the resulting jar file.

When I change it back to e.g. version 0.5.0M6, they are included.

Desired behavior or bug?

Example can be found here:

https://github.com/oliverwehrens/jpowermeter

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions