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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T17:55:03+00:00 2026-06-10T17:55:03+00:00

I have a project built by gradle that publishes an artifact to a local

  • 0

I have a project built by gradle that publishes an artifact to a local ivy repository. Historically, we have used gradle purely with flatDir repositories, as we want to keep everything local. However, I’m starting to see the benefit of using ivy over copying the generated artifacts everywhere.

I can publish the artifact to ivy easily, but other projects that use the repository to pull this artifact in fail on its transient flatDir dependencies.

I’m trying to work out the best way to handle these transient dependencies. It’s clear they are needed by anyone using the artifact as they have classes that artifact uses. Should I publish the transient dependencies with my artifact to ivy? What’s the best way to do this?

I’ve tried (what I consider a hack) declaring the jars in the flatLib dir as artifacts themselves with:

group 'utils'

repositories {
    flatDir {
        dirs 'lib'
        name 'librepo'
    }
}

dependencies {
    compile ":antlr:3.4"
    // ...
}

artifacts {
    project.repositories.librepo.dirs.each { dir ->
        dir.eachFile {
            if (it.isFile()) {
                archives file(it)
            }
        }
    }
}

However, projects that include the artifact fail because the flatDir files are uploaded to the same group as the main artifact (in this case, ‘utils’), but are defined with no group in the dependencies section, and so the entries in ivy.xml have no org value, i.e.

<dependency org="" name="antlr" rev="3.4" conf="compile->default"/>

I think I’m missing something, any help would be appreciated on how to mix flatDir and ivy.

Should I migrate the flatDir dependencies to ivy so they resolve correctly, and I can then change my build to use just the ivy repository it’s publishing to as a source as well? I can’t really think of a better way, but if I do this, it’ll have quite an impact in that every dependency will have to move out of the main project dir’s lib dir, to ivy, and I only really want to use the ivy repository to manage our generated artifacts, not third party libraries.

  • 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-10T17:55:04+00:00Added an answer on June 10, 2026 at 5:55 pm

    For completeness, I couldn’t find a decent solution to this and ended up moving all the lib/ jars to ivy too with the help of this article. Still, this question ended up earning me the tumbleweed award!

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

Sidebar

Related Questions

In my Gradle script (version 0.8), I have a local ivy repository which I
I have a project that is built and managed by Maven. I have a
I have a project that when built from my machine everything runs smoothly. However,
We have a project that has been built in Flash and as3. It is
I have a project that comprises pre-build Dll modules, built some time in the
I currently have a project built with maven-archetype-webapp artifact. The default packaging for this
I have a gradle project that has java applications as well as android applications.
I have a pretty standard Gradle build that's building a Java project. When I
I have a deployment project built with Visual Studio 2008 that fails to install.
I have a project that is built with native C++, as well as C++/CLI.

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.