Skip to content

Track published outputs to avoid conflict with :clean task #410

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

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

Conversation

marcphilipp
Copy link

@marcphilipp marcphilipp commented Aug 14, 2025

Tasks of type PublishToMavenRepository do not track their outputs as
they are typically used to publish to an external Maven repository.
However, here such tasks are used to publish to build/maven-repo in
the root project. Since Gradle's task graph was not aware of these
untracked outputs, the :clean task was allowed to run in parallel of
the subproject's publishing tasks. In some cases, this caused :clean
to fail; in other cases, the contents of the custom local Maven
repository were incomplete which caused downstream tasks to fail.

This should resolve the problem of running
./gradlew clean check integrationTest repeatedly.

Tasks of type `PublishToMavenRepository` do not track their outputs as
they are typically used to publish to an external Maven repository.
However, here such tasks are used to publish to `build/maven-repo` in
the root project. Since Gradle's task graph was not aware of these
untracked outputs, the `:clean` task was allowed to run in parallel of
the subproject's publishing tasks. In some cases, this caused `:clean`
to fail; in other cases, the contents of the custom local Maven
repository were incomplete which caused downstream tasks to fail.
@marcphilipp
Copy link
Author

marcphilipp commented Aug 14, 2025

Looks like the GitHub Actions workflows are not set up to support contribution from forks. I think run-sonar needs to be conditional on the repo being the main repo because otherwise secrets won't be injected:

I think something like run-sonar: ${{ github.repository == 'aim42/htmlSanityCheck }} should work

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

Successfully merging this pull request may close these issues.

1 participant