Hi,

our webapplication contains a JAR with common features for all WARs. It is placed at a shared tomcat folder. All dependend JARs (Spring, JSF, Apache commons, ...) are also placed at this shared folder.

But there are also dependencies to Tomcat libaries which are provided (Servlet, JSP, tomcat).

I want to copy the dependencies and all dependencies of them to a special folder for the installation/release.

This works fine, but how can I exclude the provided dependencies (servlet, JPS, tomcat)?

I think a "providedCompile" would be very useful for the java plugin (JAR).

Or is there a better solution for this problem?

common-JAR:
-------------------------
apply plugin: 'java'

dependencies {
    testCompile group: 'junit', name: 'junit', version: '4.8+'

    compile group: 'org.apache.tomcat', name: 'catalina', version: '6.0.20'
    compile group: 'javax.servlet', name: 'servlet-api', version: '2.5'
    compile group: 'javax.servlet.jsp', name: 'jsp-api', version: '2.1'

compile group: 'org.springframework', name: 'spring-aop', version: '3.0.+'
    ....

-----------------------

Web-WARs:
-------------------------
apply plugin: 'war'

dependencies {
    testCompile group: 'junit', name: 'junit', version: '4.8+'

    providedCompile project(':common')

    compile group: 'com.lowagie', name: 'itext', version: '2.1.+'
    ...
}
------------------------

regards,
Mathias Kalb


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to