2016-12-13 2 views
1

Meine build.gradle sieht etwa so aus. Es ist so klar, dass meine web.xml ist in WebContent/WEB-INF, warum wird der Krieg mit web.xml unter WebContent/WEB-INF/lib Ordner erstellt?web.xml im Krieg bekommen verlegt mit Gradle

aufgeblasen ich den Krieg, und bekam diese

aufblähenden: WEB-INF/lib/web.xml

apply plugin: 'java' 
apply plugin: 'war' 

repositories { 
    jcenter() 
} 

dependencies { 
    compile 'org.slf4j:slf4j-api:1.7.21' 
    compile group: 'org.apache.tomcat', name: 'tomcat-catalina', version: '8.5.0' 
    compile group: 'log4j', name: 'log4j', version: '1.2.16' 

    compile files('WebContent/WEB-INF/lib/coregeneral.jar') 
    compile files('WebContent/WEB-INF/lib/operationserverendpoints.jar') 

    compile files('WebContent/WEB-INF/web.xml') 
    testCompile 'junit:junit:4.12' 
} 

sourceSets { 
    main { 
     java { 
      srcDir 'src' 
     } 
    } 
} 

Antwort

0

I web.xml als Kompilierung Option hinzugefügt hatte, das war falsch . Ich habe es von der Kompilieroption entfernt und hinzugefügt, es hat funktioniert.

war { 
webXml = file('WebContent/WEB-INF/web.xml') // copies a file to WEB-INF/web.xml 
} 
Verwandte Themen