|
40 | 40 | import org.jfrog.build.api.builder.DependencyBuilder;
|
41 | 41 | import org.jfrog.build.api.builder.ModuleBuilder;
|
42 | 42 | import org.jfrog.build.api.util.FileChecksumCalculator;
|
43 |
| -import org.jfrog.build.client.*; |
| 43 | +import org.jfrog.build.client.DeployDetails; |
44 | 44 | import org.jfrog.build.extractor.BuildInfoExtractor;
|
45 | 45 | import org.jfrog.build.extractor.BuildInfoExtractorUtils;
|
46 | 46 | import org.jfrog.build.extractor.clientConfiguration.ArtifactoryClientConfiguration;
|
|
49 | 49 | import org.jfrog.build.extractor.clientConfiguration.PatternMatcher;
|
50 | 50 | import org.jfrog.build.extractor.maven.resolver.ResolutionHelper;
|
51 | 51 | import org.xml.sax.InputSource;
|
| 52 | + |
52 | 53 | import javax.xml.xpath.*;
|
53 | 54 | import java.io.File;
|
54 | 55 | import java.io.FileInputStream;
|
@@ -105,7 +106,8 @@ public void setConfiguration(ArtifactoryClientConfiguration conf) {
|
105 | 106 | /**
|
106 | 107 | * The repository listeners (either ArtifactoryEclipseRepositoryListener or ArtifactorySonatypeRepositoryListener) invoke this method
|
107 | 108 | * with each artifact being resolved by Maven.
|
108 |
| - * @param artifact The artifact being resolved by Maven. |
| 109 | + * |
| 110 | + * @param artifact The artifact being resolved by Maven. |
109 | 111 | */
|
110 | 112 | public void artifactResolved(Artifact artifact) {
|
111 | 113 | if (artifact != null) {
|
@@ -410,13 +412,14 @@ private void extractModuleDependencies(MavenProject project) {
|
410 | 412 |
|
411 | 413 | /**
|
412 | 414 | * Merge the dependencies taken from the MavenProject object with those collected inside the resolvedArtifacts collection.
|
413 |
| - * @param projectDependencies The artifacts taken from the MavenProject object. |
| 415 | + * |
| 416 | + * @param projectDependencies The artifacts taken from the MavenProject object. |
414 | 417 | */
|
415 | 418 | private void mergeProjectDependencies(Set<Artifact> projectDependencies) {
|
416 | 419 | // Go over all the artifacts taken from the MavenProject object, and replace their equals method, so that we are
|
417 | 420 | // able to merge them together with the artifacts inside the resolvedArtifacts set:
|
418 | 421 | Set<Artifact> dependecies = Sets.newHashSet();
|
419 |
| - for(Artifact artifact : projectDependencies) { |
| 422 | + for (Artifact artifact : projectDependencies) { |
420 | 423 | String classifier = artifact.getClassifier();
|
421 | 424 | classifier = classifier == null ? "" : classifier;
|
422 | 425 | DefaultArtifact art = new DefaultArtifact(artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion(),
|
@@ -595,7 +598,7 @@ private void addDependenciesToCurrentModule(ModuleBuilder module) {
|
595 | 598 | dependency.getClassifier(), getExtension(depFile)));
|
596 | 599 | String scopes = dependency.getScope();
|
597 | 600 | if (StringUtils.isNotBlank(scopes)) {
|
598 |
| - dependencyBuilder.scopes(Lists.newArrayList(scopes)); |
| 601 | + dependencyBuilder.scopes(Sets.newHashSet(scopes)); |
599 | 602 | }
|
600 | 603 | setDependencyChecksums(depFile, dependencyBuilder);
|
601 | 604 | module.addDependency(dependencyBuilder.build());
|
|
0 commit comments