1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
package org.xwiki.extension.repository.aether.internal; |
21 |
|
|
22 |
|
import java.util.ArrayList; |
23 |
|
import java.util.List; |
24 |
|
|
25 |
|
import org.eclipse.aether.graph.Dependency; |
26 |
|
import org.xwiki.extension.DefaultExtensionDependency; |
27 |
|
import org.xwiki.extension.ExtensionDependency; |
28 |
|
import org.xwiki.extension.internal.maven.DefaultMavenExtensionDependency; |
29 |
|
import org.xwiki.extension.internal.maven.MavenUtils; |
30 |
|
import org.xwiki.extension.repository.ExtensionRepositoryDescriptor; |
31 |
|
import org.xwiki.extension.version.internal.DefaultVersionConstraint; |
32 |
|
|
33 |
|
|
34 |
|
@version |
35 |
|
@since |
36 |
|
|
|
|
| 93.3% |
Uncovered Elements: 1 (15) |
Complexity: 4 |
Complexity Density: 0.4 |
|
37 |
|
public class AetherExtensionDependency extends DefaultMavenExtensionDependency |
38 |
|
{ |
39 |
|
public static final String PKEY_AETHER_DEPENDENCY = "aether.Dependency"; |
40 |
|
|
|
|
| 88.9% |
Uncovered Elements: 1 (9) |
Complexity: 2 |
Complexity Density: 0.29 |
|
41 |
1029 |
public AetherExtensionDependency(ExtensionDependency extensionDependency, Dependency aetherDependency,... |
42 |
|
ExtensionRepositoryDescriptor extensionRepository) |
43 |
|
{ |
44 |
1029 |
super(extensionDependency); |
45 |
|
|
46 |
|
|
47 |
1029 |
if (extensionRepository != null) { |
48 |
1029 |
List<ExtensionRepositoryDescriptor> newRepositories = new ArrayList<>(getRepositories().size() + 1); |
49 |
|
|
50 |
1029 |
newRepositories.add(extensionRepository); |
51 |
1029 |
newRepositories.addAll(getRepositories()); |
52 |
|
|
53 |
1029 |
setRepositories(newRepositories); |
54 |
|
} |
55 |
|
|
56 |
|
|
57 |
1029 |
putProperty(PKEY_AETHER_DEPENDENCY, aetherDependency); |
58 |
|
} |
59 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
60 |
4 |
public AetherExtensionDependency(Dependency aetherDependency)... |
61 |
|
{ |
62 |
4 |
super(new DefaultExtensionDependency(MavenUtils.toExtensionId(aetherDependency.getArtifact().getGroupId(), |
63 |
|
aetherDependency.getArtifact().getArtifactId(), aetherDependency.getArtifact().getClassifier()), |
64 |
|
new DefaultVersionConstraint(aetherDependency.getArtifact().getVersion()), null)); |
65 |
|
|
66 |
|
|
67 |
4 |
putProperty(PKEY_AETHER_DEPENDENCY, aetherDependency); |
68 |
|
} |
69 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
70 |
10 |
public Dependency getAetherDependency()... |
71 |
|
{ |
72 |
10 |
return (Dependency) this.getProperty(PKEY_AETHER_DEPENDENCY); |
73 |
|
} |
74 |
|
} |