Community
Participate
Working Groups
FYI, this is a consequence of Bug 415482 being fixed. Consider the following scenario: The "private repository" option is enabled (which is IMHO the only reliable way to use multiple jobs invoking "Maven 3" with Hudson) as is the "Clean after checkout" option. As of version 2.2.8 of the Hudson Git plugin, the clean after checkout also deletes the local Maven repository below .maven/repository. This has the undesirable effect that jobs which use a "private repository" and "clean after checkout" (both options are IMHO necessary for proper reproducible builds) force Maven to download all necessary plugins and dependencies again. It would thus be great if the Hudson Git plugin became aware of the special nature of .maven/repository. On a related note: Is there a difference between "Wipe out workspace" and "Clean after checkout"? I feel that the former should indeed wipe out everything, including .maven/repository, but the latter should not.
(In reply to Andreas Sewe from comment #0) For the record, a partial workaround is adding an explicit "Execute shell" build action before the "Invoke Maven 3" build action: git clean -fdx -e .maven/ Unfortunately, this not only preserves .maven/repo/ but also (if "Private temporary directory" is enabled) .maven/tmp/ so the workaround is not quite perfect.
Would this do what you want? git clean -fdx -e .maven/repo/
(In reply to Bob Foster from comment #2) > Would this do what you want? > > git clean -fdx -e .maven/repo/ Unfortunately, no: > git init test > cd test > mkdir -p .maven/repo .maven/tmp > git clean -fdx -e .maven/repo/ Removing .maven/ So, the exclusion won't be effective, as the parent directory has been deleted already. Hence, the above workaround is only "partial".