Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build failures #8407

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

peterbro1
Copy link

@peterbro1 peterbro1 commented Mar 18, 2024

This fixes two issues that an average user will have when cloning the repository and attempting to build.

  1. The default gradle heap allocation is insufficient to build this project. The gradle.property change simply increases the heap on a project-scope
  2. This change fixes an error in the assemble task caused by duplicate resources. This can be mitigated by changes in the structure, but a 'default' installation will have this error.

Here's the stacktrace of the issue above:

peter@host:~/zaproxy^main ±
% git reset --hard && ./gradlew clean                                                                               24-03-18 - 11:50:23
HEAD is now at 1d1e2d6a6 Merge pull request #8404 from thc202/scripts/check-ex

BUILD SUCCESSFUL in 899ms
13 actionable tasks: 4 executed, 5 from cache, 4 up-to-date

peter@host:~/zaproxy^main ±
% ./gradlew assemble                                                                                                24-03-18 - 11:50:33

> Task :zap:cyclonedxRuntimeBom
Unknown keyword additionalItems - you should define your own Meta Schema. If the keyword is irrelevant for validation, just use a NonValidationKeyword

> Task :zap:distFiles FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':zap:distFiles'.
> Entry zap.ico is a duplicate but no duplicate handling strategy has been set. Please refer to https://docs.gradle.org/8.5/dsl/org.gradle.api.tasks.Copy.html#org.gradle.api.tasks.Copy:duplicatesStrategy for details.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

BUILD FAILED in 2s
17 actionable tasks: 6 executed, 1 from cache, 10 up-to-date

Copy link

github-actions bot commented Mar 18, 2024

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@peterbro1
Copy link
Author

peterbro1 commented Mar 18, 2024

I have read the CLA Document and I hereby sign the CLA

zapbot added a commit to zaproxy/cla that referenced this pull request Mar 18, 2024
@thc202
Copy link
Member

thc202 commented Mar 19, 2024

  1. Which task is failing with OOME?
  2. Interesting that in CI (and other hosts) the duplication does not happen. Please provide more details of your set up.

@peterbro1
Copy link
Author

@thc202 Hey! The heap error occurs seemingly at random, so I will disable the gradle jvm flag and update you if when it occurs again. Here's some info on my setup as well as gradle build logs:

Linux xxx76 6.6.10-76060610-generic #202401051437~1709085277~22.04~31d73d8 SMP PREEMPT_DYNAMIC Wed F x86_64 x86_64 x86_64 GNU/Linux

Build logs

Thanks for such a quick reply! Love the project 🥇

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

Successfully merging this pull request may close these issues.

None yet

2 participants