Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8623177
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T07:13:21+00:00 2026-06-12T07:13:21+00:00

We have the following configuration in a project… configurations { //compile.exclude module: ‘commons’ //all*.exclude

  • 0

We have the following configuration in a project…

configurations {
    //compile.exclude module: 'commons'
    //all*.exclude group: 'org.gradle.test.excludes', module: 'reports'
    all*.exclude module: 'log4j'
}

dependencies {
    compile group: 'org.slf4j',          name: 'slf4j-api',               version: '1.6.6'
    compile group: 'org.slf4j',          name: 'log4j-over-slf4j',        version: '1.6.6'
    compile group: 'com.google.inject',  name: 'guice',                   version: '3.0'
    compile group: 'com.google.protobuf',name: 'protobuf-java',           version: '2.4.1'
    //compile group: 'org.asteriskjava',name: 'asterisk-java',         version: '1.0.0.M3'   

    //to be erased soon
    compile group: 'commons-configuration',name:'commons-configuration',version: '1.8'
    //compile group: 'org.bouncycastle',   name: 'bcpg-jdk16',              version: '1.46'

    compile project(':sdi-master')
    compile project(':sdi-webserver')
}

unfortunately, the project sdi-webserver has it’s own log4j brought in from a filetree like so

project(':sdi-webserver') {
    project.ext.genLibDir = file('lib')

    dependencies {    
        compile project(':sdi-master')
        compile fileTree(dir: '../webserver/lib', include: '*.jar')
        compile fileTree(dir: '../webserver/play-1.2.4/framework/lib', include: '*.jar')
        compile fileTree(dir: '../webserver/play-1.2.4/framework', include: 'play-*.jar')   
    }

How do we exclude this jar so it is not part of the dependencies. The above excludes that we have only works for repositories and transitive dependencies and doesn’t work for fileTree, but we still need to somehow exclude the jar file as we want eclipse task building correct .classpath, we want configurations.compile having accurate info for copying jars, etc. etc.

thanks,
Dean

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T07:13:22+00:00Added an answer on June 12, 2026 at 7:13 am

    Simply use an exclude on fileTree. Syntax is the same as for include.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following text: started: Project: ProjectA, Configuration: Release Any CPU ------ I
I have a following configuration: IIS 7.5 Website A - Authentication: all options disabled,
I have the following log4j.xml configuration: <log4j:configuration> <appender name = CONSOLE class = org.apache.log4j.ConsoleAppender>
For now I have the following lines in a project configuration on pylons: [server:main]
I have the following Phing configuration file: <?xml version=1.0 encoding=UTF-8?> <project name=ru.fractalizer.phpsweetpdo default=make-phar-packages basedir=..>
I have one bundle using the following configuration in pom.xml: <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <version>2.1.0</version>
I have the following configuration for PHPMailer, which worked perfectly on my localhost machine,
I have the following configuration: Visual Studio Team System 2008 SQL Server Developer Edition
I have the following configuration file for NHibernate : <?xml version=1.0 encoding=utf-8 ?> <hibernate-configuration
I have the following virtual host configuration <VirtualHost petyo.net:443> ServerAdmin m@petyo.net DocumentRoot /home/ren/public/ <Directory

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.