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.Model; |
23 |
|
import org.xwiki.extension.AbstractExtension; |
24 |
|
import org.xwiki.extension.Extension; |
25 |
|
import org.xwiki.extension.ExtensionId; |
26 |
|
import org.xwiki.extension.repository.ExtensionRepository; |
27 |
|
import org.xwiki.extension.version.Version; |
28 |
|
|
29 |
|
|
30 |
|
@link |
31 |
|
|
32 |
|
@version |
33 |
|
@since |
34 |
|
|
|
|
| 73.1% |
Uncovered Elements: 7 (26) |
Complexity: 9 |
Complexity Density: 0.56 |
|
35 |
|
public abstract class AbstractMavenExtension extends AbstractExtension implements MavenExtension |
36 |
|
{ |
37 |
|
|
38 |
|
|
39 |
|
|
40 |
|
public static final String PKEY_MAVEN_MODEL = "maven.Model"; |
41 |
|
|
42 |
|
|
43 |
|
|
44 |
|
|
45 |
|
public static final String PKEY_MAVEN_ARTIFACTID = "maven.artifactid"; |
46 |
|
|
47 |
|
|
48 |
|
|
49 |
|
|
50 |
|
public static final String PKEY_MAVEN_GROUPID = "maven.groupid"; |
51 |
|
|
52 |
|
|
53 |
|
@param |
54 |
|
@param |
55 |
|
@param |
56 |
|
@param |
57 |
|
@param |
58 |
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
59 |
0 |
public AbstractMavenExtension(ExtensionRepository repository, String groupId, String artifactId, String version,... |
60 |
|
String type) |
61 |
|
{ |
62 |
0 |
super(repository, new ExtensionId(groupId + ':' + artifactId, version), type); |
63 |
|
|
64 |
0 |
setMavenGroupId(groupId); |
65 |
0 |
setMavenArtifactId(artifactId); |
66 |
|
} |
67 |
|
|
68 |
|
|
69 |
|
@param |
70 |
|
@param |
71 |
|
@param |
72 |
|
@param |
73 |
|
@param |
74 |
|
@since |
75 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
76 |
24406 |
public AbstractMavenExtension(ExtensionRepository repository, String groupId, String artifactId, Version version,... |
77 |
|
String type) |
78 |
|
{ |
79 |
24406 |
super(repository, new ExtensionId(groupId + ':' + artifactId, version), type); |
80 |
|
|
81 |
24406 |
setMavenGroupId(groupId); |
82 |
24406 |
setMavenArtifactId(artifactId); |
83 |
|
} |
84 |
|
|
85 |
|
|
86 |
|
|
87 |
|
|
88 |
|
@param |
89 |
|
@param |
90 |
|
|
|
|
| 85.7% |
Uncovered Elements: 1 (7) |
Complexity: 2 |
Complexity Density: 0.4 |
|
91 |
51 |
public AbstractMavenExtension(ExtensionRepository repository, Extension extension)... |
92 |
|
{ |
93 |
51 |
super(repository, extension); |
94 |
|
|
95 |
51 |
if (extension instanceof MavenExtension) { |
96 |
51 |
MavenExtension mavenExtension = (MavenExtension) extension; |
97 |
|
|
98 |
51 |
setMavenArtifactId(mavenExtension.getMavenArtifactId()); |
99 |
51 |
setMavenGroupId(mavenExtension.getMavenGroupId()); |
100 |
|
} |
101 |
|
} |
102 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
103 |
51 |
@Override... |
104 |
|
public String getMavenGroupId() |
105 |
|
{ |
106 |
51 |
return getProperty(PKEY_MAVEN_GROUPID); |
107 |
|
} |
108 |
|
|
109 |
|
|
110 |
|
@param |
111 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
112 |
24457 |
public void setMavenGroupId(String groupId)... |
113 |
|
{ |
114 |
24457 |
putProperty(PKEY_MAVEN_GROUPID, groupId); |
115 |
|
} |
116 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
117 |
51 |
@Override... |
118 |
|
public String getMavenArtifactId() |
119 |
|
{ |
120 |
51 |
return getProperty(PKEY_MAVEN_ARTIFACTID); |
121 |
|
} |
122 |
|
|
123 |
|
|
124 |
|
@param |
125 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
126 |
24457 |
public void setMavenArtifactId(String artifactId)... |
127 |
|
{ |
128 |
24457 |
putProperty(PKEY_MAVEN_ARTIFACTID, artifactId); |
129 |
|
} |
130 |
|
|
131 |
|
|
132 |
|
@return |
133 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
134 |
0 |
public Model getMavenModel()... |
135 |
|
{ |
136 |
0 |
return (Model) getProperty(PKEY_MAVEN_MODEL); |
137 |
|
} |
138 |
|
} |