GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Assembling source jar (`sourcesJar` Gradle task) on generated library fails due to duplicate source directory entries · Issue #893 · googleapis/sdk-platform-java

This repository was archived by the owner on Oct 29, 2026. It is now read-only.
This repository was archived by the owner on Oct 29, 2026. It is now read-only.

Assembling source jar (sourcesJar Gradle task) on generated library fails due to duplicate source directory entries  #893

Copy link
Copy link
Closed
#894
Closed
Assembling source jar (sourcesJar Gradle task) on generated library fails due to duplicate source directory entries #893
#894
Copy link
Assignees
chanseokoh
Labels
priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Description

@chanseokoh
chanseokoh
opened on Jan 7, 2022
Issue body actions

b/211697397

> Task :grpc-google-cloud-retail-v2alpha-java:sourcesJar FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':grpc-google-cloud-retail-v2alpha-java:sourcesJar'.
> Entry com/google/cloud/retail/v2alpha/CompletionServiceGrpc.java is a duplicate but no duplicate handling strategy has been set. Please refer to https://docs.gradle.org/7.3.1/dsl/org.gradle.api.tasks.Copy.html#org.gradle.api.tasks.Copy:duplicatesStrategy for details.

Starting with Gradle 7, copying files fail when there are duplicate entries. Some relevant details are here. However, unlike the workarounds suggested there, we should fix the root cause.

In our case, the cause is the following configuration

sourceSets {
  main {
    java {
      srcDir 'src/main/java'
    }
  }
}

where srcDir adds the directory to the main source set. The default value of main.srcDirs is [ 'src/main/java' ], so calling srcDir 'src/main/java' results in [ 'src/main/java', 'src.main/java' ] (duplicates).

Activity

  1. chanseokoh
    added
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    priority: p2Moderately-important priority. Fix may not be included in next release.
    on Jan 7, 2022
  2. chanseokoh
    self-assigned this
    on Jan 7, 2022
  3. chanseokoh
    closed this as completedin #894on Jan 10, 2022
  4. suztomo
    added 3 commits that reference this issue on Mar 21, 2023

    deps: update dependency com.google.http-client:google-http-client-bom…

    21e7515

    chore(main): release 3.0.6 (#888)

    38cd9f3

    chore(main): release 2.8.7-SNAPSHOT (#893)

    5c223b3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @chanseokoh
    chanseokoh

Labels

priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.