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 8556619
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T15:23:37+00:00 2026-06-11T15:23:37+00:00

apply plugin: ‘java’ archivesBaseName = ‘foo-client’ sourceCompatibility = JavaVersion.VERSION_1_7 targetCompatibility = JavaVersion.VERSION_1_7 //version =

  • 0
apply plugin: 'java'

archivesBaseName = 'foo-client'
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
//version = '1.0'
dependencies{
    compile 'foo:bar:1.0-SNAPSHOT', 
            'foo:bar-common:1.0-SNAPSHOT', 
            'foo:bar-communication-api:1.0-SNAPSHOT'
}
repositories{ 
    flatDir{
        dirs '/lib'
    }
}

When executing the inherited jar task, this will create foo-client.jar in the build/lib directory of the project. What I need to do is include several jars to be put in that same directory, otherwise the project will not run correctly.

How can I do this?

  • 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-11T15:23:38+00:00Added an answer on June 11, 2026 at 3:23 pm

    Using Gradle 1.1 the following did the trick,

    apply plugin: 'java'
    
    archivesBaseName = 'foo-client'
    sourceCompatibility = JavaVersion.VERSION_1_7
    targetCompatibility = JavaVersion.VERSION_1_7
    
    task copyToLib(type: Copy){
        into 'bar\\lib'
        from configurations.runtime
        from configurations.default.allArtifacts.getFiles()
    }
    
    dependencies{
        compile 'foo:bar-agent-dist:2.0.0-SNAPSHOT', 
                'foo:bar-common:2.0.0-SNAPSHOT', 
                'foo:bar-communication-api:2.0.0-SNAPSHOT'
    }
    
    
    repositories{ 
        flatDir{
            dirs '/lib'
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

everyone here is the build script apply{ plugin 'java' } sourceCompatibility=1.5 List spring =
I am running my next gradle-javadoc-doclet task: apply plugin: com.myproject.build.gradle.web.WebPlugin apply plugin: 'java' apply
This is my gradle build script. apply plugin: 'groovy' project.group = test.tree archivesBaseName =
i have run a code snippet from Gradle Cookbook apply plugin: 'java' task create-dirs
my build.gradle looks like: apply plugin: 'java' apply plugin: 'eclipse' apply plugin: 'application' ......
So I'm writing a jQuery plugin to apply retina graphics. I need to select
I need to apply a jQuery plugin to an HTML element that will be
I need to apply a tooltip plugin to a bunch of different elements on
I have a page where I'm trying to apply the tinyscrollbar plugin to some
The gedit external tools plugin allows tools to apply to only one or more

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.