|
2 | 2 | package org.jfrog.build.extractor.ci;
|
3 | 3 |
|
4 | 4 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
5 |
| -import com.thoughtworks.xstream.annotations.XStreamAlias; |
6 | 5 | import org.apache.commons.lang3.StringUtils;
|
7 | 6 | import org.jfrog.build.api.Build;
|
8 | 7 | import org.jfrog.build.api.builder.ModuleType;
|
|
18 | 17 | import java.util.Properties;
|
19 | 18 | import java.util.stream.Collectors;
|
20 | 19 |
|
21 |
| -import static org.jfrog.build.extractor.ci.BuildBean.ROOT; |
22 |
| - |
23 | 20 | /**
|
24 | 21 | * A temporary build-info for CI use (e.g. Artifactory jenkins plugin, Maven plugin, etc.).
|
25 |
| - * BuildInfo class should be converted to {@link org.jfrog.build.api.Build} before publishing / getting build-info from Artifactory. |
| 22 | + * BuildInfo class should be converted to {@link org.jfrog.build.api.Build} before publishing / getting build-info from Artifactory. |
26 | 23 | */
|
27 |
| -@XStreamAlias(ROOT) |
28 | 24 | @JsonIgnoreProperties(ignoreUnknown = true, value = {"project", "startedMillis"})
|
29 | 25 | public class BuildInfo extends BaseBuildBean {
|
30 | 26 |
|
@@ -52,10 +48,8 @@ public class BuildInfo extends BaseBuildBean {
|
52 | 48 |
|
53 | 49 | private BuildRetention buildRetention;
|
54 | 50 |
|
55 |
| - @XStreamAlias(RUN_PARAMETERS) |
56 | 51 | private List<MatrixParameter> runParameters;
|
57 | 52 |
|
58 |
| - @XStreamAlias(MODULES) |
59 | 53 | private List<Module> modules;
|
60 | 54 |
|
61 | 55 | private List<PromotionStatus> statuses;
|
@@ -620,10 +614,9 @@ public Build ToBuild() {
|
620 | 614 | return builder.build();
|
621 | 615 | }
|
622 | 616 |
|
623 |
| - public static BuildInfo ToBuildInfo( org.jfrog.build.api.Build build) { |
| 617 | + public static BuildInfo ToBuildInfo(org.jfrog.build.api.Build build) { |
624 | 618 | BuildInfoBuilder builder = new BuildInfoBuilder(build.getName());
|
625 |
| - builder |
626 |
| - .number(build.getNumber()) |
| 619 | + builder.number(build.getNumber()) |
627 | 620 | .setProject(build.getProject())
|
628 | 621 | .agent(build.getAgent() == null ? null : new Agent(build.getAgent().getName(), build.getAgent().getVersion()))
|
629 | 622 | .buildAgent(build.getBuildAgent() == null ? null : new BuildAgent(build.getBuildAgent().getName(), build.getBuildAgent().getVersion()))
|
|
0 commit comments