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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T00:19:18+00:00 2026-06-18T00:19:18+00:00

I have a gradle configuration which performs my compile and packaging of the war.

  • 0

I have a gradle configuration which performs my compile and packaging of the war.

I have an ant script that I want to invoke after the war enunciate.codehaus.org. The ant script needs access to the jars that were bundled into the war.

Gradle configuration:

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

repositories {
    mavenCentral()
}

dependencies {
    compile "javax.ws.rs:jsr311-api:1.1.1"

    compile 'com.sun.jersey:jersey-server:1.16'
    compile 'com.sun.jersey:jersey-core:1.16'
    compile 'com.sun.jersey:jersey-client:1.16'
    compile 'com.sun.jersey:jersey-servlet:1.16'
    compile 'com.sun.jersey:jersey-json:1.16'

    testCompile "junit:junit-dep:4.10"
}

ant.importBuild 'ant-builds/enunciate/targets.xml'

part of the enunciate ant file:

<path id="enunciate.classpath">
    <!--this pulls in enunciate library files to be used to generate documentation -->
    <fileset dir="${enunciate.home}/lib">
        <include name="*.jar"/>
    </fileset>

    <!-- this pulls in some java framework libraries used to generate documentation -->
    <fileset dir="${java.home}">
        <include name="lib/tools.jar"/>
    </fileset>
</path>

How can I add the dependencies of the war to this file set? When gradle compile the war, do the jars (that are dependencies and then packaged into the war) get put somewhere that I could reference?

I assume that it has to do with using the dependencies or configuration class, but cannot seem to pull this together.

  • 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-18T00:19:19+00:00Added an answer on June 18, 2026 at 12:19 am

    From gradle build, you can set the ant properties, for example. the ant classpath in the following target can be set in gralde build.

    <enunciate basedir="${enunciate.baseSourceDirectory}" configFile="enunciate.xml">
    <include name="**/*.java"/>
    <classpath refid="enunciate.classpath"/>
    <classpath>
        <pathelement path="${enunciate.dependencies}"/>
    </classpath>
    <export artifactId="docs" destination="${enunciate.destinationDirectory}/some-icd.tar"/>
    

    In build.gradle, “enunciate.dependencies” can be set as
    ant.properties[‘enunciate.dependencies’]=configurations.runtime.asPath

    I hope this helps.

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

Sidebar

Related Questions

I have a complex Gradle script that wraps up a load of functionality around
I am using configuration injection for gradle and have something like this subprojects {
I have a multi-project C++ Gradle build, which produces a number of libraries and
Gradle is giving me fits. I have a build.gravle that includes the java plug-in
I'm working on a build script with Gradle. We have multiple projects at our
We have the following configuration in a project... configurations { //compile.exclude module: 'commons' //all*.exclude
On an ubuntu jenkins master I have configured that gradle should be autoinstalled to:
I have a bunch of configuration files used by gradle. conf1 conf2 conf3 conf4
I am attempting to compile several WAR files, all that depend on a common
I have written the following task, which extracts all the compile dependencies for each

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.