Bug 399586 - It seems that "copy artifacts" (1.23-h-1) copies too much jars.
Summary: It seems that "copy artifacts" (1.23-h-1) copies too much jars.
Status: NEW
Alias: None
Product: Hudson
Classification: Technology
Component: Plugins (show other bugs)
Version: 3.0.0   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Winston Prakash CLA
QA Contact: Geoff Waymark CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-31 02:39 EST by Waldemar Tribus CLA
Modified: 2013-01-31 02:39 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Waldemar Tribus CLA 2013-01-31 02:39:13 EST
The reason is, the root directory for jar listing is set to WorkDir of the JOB, not just to WorkDir/out, so the whole jars inside WorkDir of the referenced Job gets copied, not just artifacts produced by the Job.

expected: all jars from workdir/out/** are copied to current JOB
current:  all jars from workdir/** are copied to current JOB


Example Message:

17:26:03  7 Artefakte aus "ECTR-42" Buildnummer 99 kopiert
=> 7 Artifacts copied from ECTR-42

ECTR-42 produces only 3 jars, the 4 other are just dependencies.

This problem come with upgrade from 2.x to 3.0.0.

I am pretty sure i already found the problem in the code, just don't remember where it was. It was something like 
"if the job is not instance of mavenjob then use the workdir as root for jar listing" - i think this is wrong logik. Maven or not, we want only artifacts to be copied, not the whole jars from another project.