[
https://issues.apache.org/jira/browse/GEODE-6323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16752752#comment-16752752
]
Bill Burcham commented on GEODE-6323:
-------------------------------------
The particular place where this bit me was in the {{geode-assembly}} module.
The {{cp}} closure is used to compute the transitive list of external
dependencies (Jars). That closure is accessed in the {{doFirst}} of two tasks:
{{depsJar}} and {{gfshDepsJar}}.
For reasons given in the link [~rhoughton] gave in the ticket description
(above), Gradle fails to recompute that closure often enough. Because of that,
when I added a {{compile()}} dependency in the {{geode-core}} module, the
associated Jar did not get onto the {{cp}} list, and code that was working fine
on my laptop, gave {{ClassNotFound}} exceptions when run in the Hydra
environment.
> Configuration in doFirst and doLast blocks are not valid for task
> configuration.
> --------------------------------------------------------------------------------
>
> Key: GEODE-6323
> URL: https://issues.apache.org/jira/browse/GEODE-6323
> Project: Geode
> Issue Type: Bug
> Components: ci
> Reporter: Patrick Rhomberg
> Assignee: Robert Houghton
> Priority: Major
> Labels: pull-request-available
> Time Spent: 20m
> Remaining Estimate: 0h
>
> See
> https://guides.gradle.org/using-build-cache/#suggestions_for_authoring_your_build
> {{doFirst}} and {{doLast}} occur at execution, but the up-to-date state of
> the task is required at configuration-time. More importantly, these task
> actions are cacheable and can be returned incorrectly if the declared inputs
> to the task are unchanged. Notably for {{gfshDepsJar}} and {{depsJar}}, if
> the {{cp()}} changes, these changes will not be detected and a cached version
> of the manifest can be used rather than the new intended classpath.
> This is not an issue in the Concourse pipeline, since no cache exists, but it
> can be troublesome for a developer.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)