简体   繁体   中英

Gradle provided dependencies present in war

I would like to set several dependencies in my war as provided because theses jar are provided by the server.

So I set my build.gradle like this:

apply plugin: 'war'
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'eclipse-wtp'

dependencies {
    compile project(':project1')
    providedCompile 'xml-apis:xml-apis:2.0.2',
        'javax.servlet:servlet-api:2.5',
        'javax.servlet.jsp:jsp-api:2.1',
        'javax.servlet:jstl:1.2',
        'com.sun.faces:jsf-api:2.1.6',
        'com.sun.faces:jsf-impl:2.1.6',
        'javax.transaction:jta:1.1'
}

But when I deploy my generated war in my server, all jars set in provided are present and my server doesn't start.

What is wrong in my configuration?

Thanks.

Looks correct, and works fine for me. Chances are that the problem is somewhere else.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM