1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
package org.xwiki.extension.internal.maven; |
21 |
|
|
22 |
|
import org.apache.maven.model.Dependency; |
23 |
|
import org.xwiki.extension.DefaultExtensionDependency; |
24 |
|
import org.xwiki.extension.ExtensionDependency; |
25 |
|
import org.xwiki.extension.version.VersionConstraint; |
26 |
|
|
27 |
|
|
28 |
|
@link |
29 |
|
|
30 |
|
@version |
31 |
|
@since |
32 |
|
|
|
|
| 55% |
Uncovered Elements: 9 (20) |
Complexity: 8 |
Complexity Density: 0.73 |
|
33 |
|
public class DefaultMavenExtensionDependency extends DefaultExtensionDependency implements MavenExtensionDependency |
34 |
|
{ |
35 |
|
|
36 |
|
|
37 |
|
|
38 |
|
public static final String PKEY_MAVEN_DEPENDENCY = "maven.Dependency"; |
39 |
|
|
40 |
|
|
41 |
|
|
42 |
|
|
43 |
|
@since |
44 |
|
|
45 |
|
public static final String PKEY_MAVEN_DEPENDENCY_SCOPE = "maven.dependency.scope"; |
46 |
|
|
47 |
|
|
48 |
|
|
49 |
|
|
50 |
|
@since |
51 |
|
|
52 |
|
public static final String PKEY_MAVEN_DEPENDENCY_OPTIONAL = "maven.dependency.optional"; |
53 |
|
|
54 |
|
|
55 |
|
|
56 |
|
|
57 |
|
@param |
58 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
59 |
1033 |
public DefaultMavenExtensionDependency(ExtensionDependency dependency)... |
60 |
|
{ |
61 |
1033 |
super(dependency); |
62 |
|
} |
63 |
|
|
64 |
|
|
65 |
|
@param |
66 |
|
@param |
67 |
|
@param |
68 |
|
|
|
|
| 85.7% |
Uncovered Elements: 1 (7) |
Complexity: 2 |
Complexity Density: 0.4 |
|
69 |
722419 |
public DefaultMavenExtensionDependency(String extensionId, VersionConstraint constraint, Dependency mavenDependency)... |
70 |
|
{ |
71 |
722419 |
super(extensionId, constraint); |
72 |
|
|
73 |
722419 |
if (mavenDependency != null) { |
74 |
|
|
75 |
722419 |
putProperty(PKEY_MAVEN_DEPENDENCY, mavenDependency); |
76 |
|
|
77 |
722419 |
putProperty(PKEY_MAVEN_DEPENDENCY_SCOPE, mavenDependency.getScope()); |
78 |
722419 |
putProperty(PKEY_MAVEN_DEPENDENCY_OPTIONAL, mavenDependency.isOptional()); |
79 |
|
} |
80 |
|
} |
81 |
|
|
82 |
|
|
83 |
|
@param |
84 |
|
@return |
85 |
|
@since |
86 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
87 |
0 |
public static String getScope(ExtensionDependency dependency)... |
88 |
|
{ |
89 |
0 |
return (String) dependency.getProperty(PKEY_MAVEN_DEPENDENCY_SCOPE); |
90 |
|
} |
91 |
|
|
92 |
|
|
93 |
|
@param |
94 |
|
@return |
95 |
|
@since |
96 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
97 |
0 |
public static boolean isOptional(ExtensionDependency dependency)... |
98 |
|
{ |
99 |
0 |
return dependency.getProperty(PKEY_MAVEN_DEPENDENCY_OPTIONAL, false); |
100 |
|
} |
101 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
102 |
6465 |
@Override... |
103 |
|
public Dependency getMavenDependency() |
104 |
|
{ |
105 |
6465 |
return (Dependency) getProperty(PKEY_MAVEN_DEPENDENCY); |
106 |
|
} |
107 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
108 |
0 |
@Override... |
109 |
|
public String getScope() |
110 |
|
{ |
111 |
0 |
return getScope(this); |
112 |
|
} |
113 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
114 |
0 |
@Override... |
115 |
|
public boolean isOptional() |
116 |
|
{ |
117 |
0 |
return isOptional(this); |
118 |
|
} |
119 |
|
} |