Skip to content

Jetty JARs get in both lib and lib-provided #1187

@hban

Description

@hban

When using Gradle to package application into a WAR, Jetty JARs end up in both lib and lib-provided folders. Those in lib folder will prevent application from being deployed in servlet container (for example, Tomcat).

This issue is present in versions 1.1.2 and 1.1.3. When using Spring Boot version 1.1.1 the resulting WAR file is correct (Jetty JARs are only in lib-provided folder).

build.gradle file to reproduce this problem:

buildscript {
  repositories { mavenCentral() }
  dependencies { classpath 'org.springframework.boot:spring-boot-gradle-plugin:1.1.3.RELEASE' }
}

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

sourceCompatibility = 1.7

repositories { mavenCentral() }

configurations.compile {
  exclude group: 'commons-logging'
  exclude module: 'spring-boot-starter-tomcat'
}

dependencies {
  compile 'org.springframework.boot:spring-boot-starter-web'
  providedCompile 'org.eclipse.jetty:jetty-webapp:9.2.1.v20140609'
  providedCompile 'org.eclipse.jetty.websocket:websocket-server:9.2.1.v20140609'
}

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions