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

  • Home
  • SEARCH
  • 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 235375
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T20:15:36+00:00 2026-05-11T20:15:36+00:00

I have a project using Gradle as the build tool and I have to

  • 0

I have a project using Gradle as the build tool and I have to make use of the Ant Java task. One of the sub elements in this task is a reference to a classpath and I would like to use refid. The build script uses Gradle’s WAR plugin. Since the compile task works without any problem I know that the classpath is set up correctly:

dependencies {
  compile 'commons-beanutils:commons-beanutils:1.8.0'
  compile group: 'commons-lang', name: 'commons-lang', version: '2.4'
  ...
}

No I would like to reference this classpath in my Gradle build script.

I’ve tried the following:

Using classpathId (built in?)
Searched the Gradle mailinglists and found a suggestion:


project.dependencies.antpath('compile')

This results in an error. Also tried some variants of this, but no luck so far. Any suggestions are appreciated.

  • 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-05-11T20:15:36+00:00Added an answer on May 11, 2026 at 8:15 pm

    The following will access the configured depedencies:

    configurations.compile.asPath
    

    If you have defined your own configuration you can utilize this also:

    configurations {
        gwtCompile
    }
    ....
    ant.java(classname:'com.google.gwt.dev.Compiler', fork:'true', failOnError: 'true') {
        jvmarg(value: '-Xmx184M')
        arg(line: '-war ' + gwtBuildDir)
        arg(value: 'com.yoobits.ocs.WebApp')
        classpath {
            pathElement(location: srcRootName + '/' + srcDirNames[0])
            pathElement(path: configurations.compile.asPath)
            pathElement(path: configurations.gwtCompile.asPath)
        }
    }
    

    In the example above I’ve accessed the compile path and my own configuration which is only interesting during a special phase during the build – compiling with the GWT compiler.

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

Sidebar

Related Questions

I have a jar dependency for the build.gradle file itself. I'm using this definition:
I have a small Java/Gradle project. I'm using the Application plugin to create a
we use Gradle for building Java projects and at the moment we have Ivy
I have an project using Hibernate. This has a class named Question . Each
I'm a student and i want make a build tool as a side project
I have pretty sophisticated build using gradle - with a number of own gradle
I use ASP .Net 4 and I have a project using the form web
I have one project that is using ESAPI4PHP which is a port of OWASP's
I have a project using curses and sockets to make a talking program. Basically
I'm working on a project using Maven as tool. Within the project I have

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.