Commit c6d910ef86f1032a2c81c8e40cf04f88b8f382c3
1 parent
46b411aa
Exists in
master
Experimentos com o Cobertura e Jacoco
Showing
2 changed files
with
84 additions
and
2 deletions
Show diff stats
impl/core/pom.xml
@@ -107,7 +107,60 @@ | @@ -107,7 +107,60 @@ | ||
107 | <groupId>org.codehaus.mojo</groupId> | 107 | <groupId>org.codehaus.mojo</groupId> |
108 | <artifactId>cobertura-maven-plugin</artifactId> | 108 | <artifactId>cobertura-maven-plugin</artifactId> |
109 | </plugin> | 109 | </plugin> |
110 | + | ||
111 | + <!-- | ||
112 | + <plugin> | ||
113 | + <groupId>org.jacoco</groupId> | ||
114 | + <artifactId>jacoco-maven-plugin</artifactId> | ||
115 | + <version>${jacoco.version}</version> | ||
116 | + <executions> | ||
117 | + <execution> | ||
118 | + <goals> | ||
119 | + <goal>prepare-agent</goal> | ||
120 | + </goals> | ||
121 | + </execution> | ||
122 | + <execution> | ||
123 | + <id>report</id> | ||
124 | + <phase>prepare-package</phase> | ||
125 | + <goals> | ||
126 | + <goal>report</goal> | ||
127 | + </goals> | ||
128 | + </execution> | ||
129 | + </executions> | ||
130 | + </plugin> | ||
131 | + --> | ||
110 | </plugins> | 132 | </plugins> |
133 | + | ||
134 | + <!-- | ||
135 | + <pluginManagement> | ||
136 | + <plugins> | ||
137 | + <plugin> | ||
138 | + <groupId>org.eclipse.m2e</groupId> | ||
139 | + <artifactId>lifecycle-mapping</artifactId> | ||
140 | + <version>1.0.0</version> | ||
141 | + <configuration> | ||
142 | + <lifecycleMappingMetadata> | ||
143 | + <pluginExecutions> | ||
144 | + <pluginExecution> | ||
145 | + <pluginExecutionFilter> | ||
146 | + <groupId>org.jacoco</groupId> | ||
147 | + <artifactId>jacoco-maven-plugin</artifactId> | ||
148 | + <versionRange>[${jacoco.version},)</versionRange> | ||
149 | + <goals> | ||
150 | + <goal>prepare-agent</goal> | ||
151 | + </goals> | ||
152 | + </pluginExecutionFilter> | ||
153 | + <action> | ||
154 | + <ignore></ignore> | ||
155 | + </action> | ||
156 | + </pluginExecution> | ||
157 | + </pluginExecutions> | ||
158 | + </lifecycleMappingMetadata> | ||
159 | + </configuration> | ||
160 | + </plugin> | ||
161 | + </plugins> | ||
162 | + </pluginManagement> | ||
163 | + --> | ||
111 | </build> | 164 | </build> |
112 | 165 | ||
113 | <dependencies> | 166 | <dependencies> |
@@ -179,6 +232,31 @@ | @@ -179,6 +232,31 @@ | ||
179 | <version>${weld.se.version}</version> | 232 | <version>${weld.se.version}</version> |
180 | <scope>test</scope> | 233 | <scope>test</scope> |
181 | </dependency> | 234 | </dependency> |
235 | + | ||
236 | + <!-- | ||
237 | + <dependency> | ||
238 | + <groupId>org.jboss.arquillian.extension</groupId> | ||
239 | + <artifactId>arquillian-jacoco</artifactId> | ||
240 | + <version>1.0.0.Alpha5</version> | ||
241 | + <scope>test</scope> | ||
242 | + </dependency> | ||
243 | + <dependency> | ||
244 | + <groupId>org.jacoco</groupId> | ||
245 | + <artifactId>org.jacoco.core</artifactId> | ||
246 | + <version>${jacoco.version}</version> | ||
247 | + <scope>test</scope> | ||
248 | + </dependency> | ||
249 | + --> | ||
250 | + | ||
251 | + <!-- | ||
252 | + <dependency> | ||
253 | + <groupId>org.jboss.shrinkwrap.descriptors</groupId> | ||
254 | + <artifactId>shrinkwrap-descriptors-spi</artifactId> | ||
255 | + <version>2.0.0-alpha-4</version> | ||
256 | + <scope>test</scope> | ||
257 | + </dependency> | ||
258 | + --> | ||
259 | + | ||
182 | <!-- | 260 | <!-- |
183 | <dependency> | 261 | <dependency> |
184 | <groupId>javax.el</groupId> | 262 | <groupId>javax.el</groupId> |
@@ -222,5 +300,9 @@ | @@ -222,5 +300,9 @@ | ||
222 | <arquillian.version>1.0.3.Final</arquillian.version> | 300 | <arquillian.version>1.0.3.Final</arquillian.version> |
223 | <arquillian.weld.se.embedded.version>1.0.0.CR6</arquillian.weld.se.embedded.version> | 301 | <arquillian.weld.se.embedded.version>1.0.0.CR6</arquillian.weld.se.embedded.version> |
224 | <weld.se.version>1.1.8.Final</weld.se.version> | 302 | <weld.se.version>1.1.8.Final</weld.se.version> |
303 | + | ||
304 | + <!-- | ||
305 | + <jacoco.version>0.6.0.201210061924</jacoco.version> | ||
306 | + --> | ||
225 | </properties> | 307 | </properties> |
226 | </project> | 308 | </project> |
impl/core/src/main/java/br/gov/frameworkdemoiselle/internal/configuration/ConfigurationLoader.java
@@ -209,6 +209,7 @@ public class ConfigurationLoader implements Serializable { | @@ -209,6 +209,7 @@ public class ConfigurationLoader implements Serializable { | ||
209 | return (T) value; | 209 | return (T) value; |
210 | } | 210 | } |
211 | 211 | ||
212 | + @SuppressWarnings("unchecked") | ||
212 | private <T> Object getMap(Key key, Field field, org.apache.commons.configuration.Configuration config) { | 213 | private <T> Object getMap(Key key, Field field, org.apache.commons.configuration.Configuration config) { |
213 | Map<String, Object> value = null; | 214 | Map<String, Object> value = null; |
214 | 215 | ||
@@ -220,8 +221,7 @@ public class ConfigurationLoader implements Serializable { | @@ -220,8 +221,7 @@ public class ConfigurationLoader implements Serializable { | ||
220 | String mapKey; | 221 | String mapKey; |
221 | String confKey; | 222 | String confKey; |
222 | 223 | ||
223 | - for (@SuppressWarnings("unchecked") | ||
224 | - Iterator<String> iter = config.getKeys(); iter.hasNext();) { | 224 | + for (Iterator<String> iter = config.getKeys(); iter.hasNext();) { |
225 | iterKey = iter.next(); | 225 | iterKey = iter.next(); |
226 | matcher = pattern.matcher(iterKey); | 226 | matcher = pattern.matcher(iterKey); |
227 | 227 |