import org.sonar.java.bytecode.asm.AsmClass;
import org.sonar.java.bytecode.asm.AsmEdge;
import org.sonar.java.bytecode.asm.AsmMethod;
+import org.sonar.java.bytecode.visitor.BytecodeVisitor;
import org.sonar.squid.api.CheckMessage;
import org.sonar.squid.api.SourceFile;
import org.sonar.squid.api.SourceMethod;
import com.google.common.collect.Maps;
@Rule(key = "ArchitecturalConstraint", cardinality = Cardinality.MULTIPLE, priority = Priority.MAJOR)
-public class ArchitectureCheck extends BytecodeCheck {
+public class ArchitectureCheck extends BytecodeVisitor {
@RuleProperty
private String fromClasses = "";
+++ /dev/null
-/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2008-2011 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * Sonar is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.java.bytecode.check;
-
-import org.sonar.java.bytecode.visitor.BytecodeVisitor;
-import org.sonar.squid.api.CodeCheck;
-
-public abstract class BytecodeCheck extends BytecodeVisitor {
-
-// public String getKey() {
-// return getClass().getSimpleName();
-// }
-}
import org.sonar.java.bytecode.asm.AsmClass;
import org.sonar.java.bytecode.asm.AsmEdge;
import org.sonar.java.bytecode.asm.AsmMethod;
+import org.sonar.java.bytecode.visitor.BytecodeVisitor;
import org.sonar.squid.api.CheckMessage;
import org.sonar.squid.api.SourceFile;
@Rule(key = "CallToDeprecatedMethod", priority = Priority.MINOR)
-public class CallToDeprecatedMethodCheck extends BytecodeCheck {
+public class CallToDeprecatedMethodCheck extends BytecodeVisitor {
private AsmClass asmClass;
import org.sonar.check.Rule;
import org.sonar.java.bytecode.asm.AsmClass;
import org.sonar.java.bytecode.asm.AsmMethod;
+import org.sonar.java.bytecode.visitor.BytecodeVisitor;
import org.sonar.squid.api.CheckMessage;
import org.sonar.squid.api.SourceFile;
import org.sonar.squid.api.SourceMethod;
@Rule(key = "UnusedPrivateMethod", priority = Priority.MAJOR)
-public class UnusedPrivateMethodCheck extends BytecodeCheck {
+public class UnusedPrivateMethodCheck extends BytecodeVisitor {
private AsmClass asmClass;
import org.sonar.check.Rule;
import org.sonar.java.bytecode.asm.AsmClass;
import org.sonar.java.bytecode.asm.AsmMethod;
+import org.sonar.java.bytecode.visitor.BytecodeVisitor;
import org.sonar.squid.api.CheckMessage;
import org.sonar.squid.api.SourceFile;
import org.sonar.squid.api.SourceMethod;
@Rule(key = "UnusedProtectedMethod", priority = Priority.MAJOR)
-public class UnusedProtectedMethodCheck extends BytecodeCheck {
+public class UnusedProtectedMethodCheck extends BytecodeVisitor {
private AsmClass asmClass;
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-
package org.sonar.java.squid.check;
import org.sonar.java.squid.visitor.SquidVisitor;
import org.sonar.squid.api.SourceMethod;
public class SquidCheck implements SquidVisitor {
-//
-// public String getKey() {
-// return getClass().getSimpleName();
-// }
public void visitFile(SourceFile sourceFile) {
}
*/
public final Module installChild(Module child) {
ComponentContainer childContainer = container.createChild();
- // register container as a component, because it used for example in BatchExtensionDictionnary,
- // but in fact this is anti-pattern - http://picocontainer.codehaus.org/container-dependency-antipattern.html
- //childContainer.addComponent(new IocContainer(childContainer));
child.init(childContainer);
return child;
}
/**
* Implementation of this method must not contain conditional logic and just should contain several invocations of
- * {@link #addCoreSingleton(Object)}, {@link #addComponent(Object, Object)} or {@link #addAdapter(ComponentAdapter)}.
+ * {@link #addCoreSingleton(Object)}, {@link #addExtension(org.sonar.api.platform.PluginMetadata, Object)} or {@link #addAdapter(ComponentAdapter)}.
*/
protected abstract void configure();
public final <T> List<T> getComponents(Class<T> componentType) {
return container.getComponentsByType(componentType);
}
-
-// /**
-// * TODO should not be used and should be removed
-// */
-// public final MutablePicoContainer getContainer() {
-// return container;
-// }
-
}
+++ /dev/null
-/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2008-2011 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * Sonar is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.batch;
-
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.sonar.api.database.model.Snapshot;
-import org.sonar.api.design.Dependency;
-import org.sonar.api.measures.CoreMetrics;
-import org.sonar.api.measures.Measure;
-import org.sonar.api.measures.PersistenceMode;
-import org.sonar.api.measures.RuleMeasure;
-import org.sonar.api.resources.JavaFile;
-import org.sonar.api.resources.JavaPackage;
-import org.sonar.api.resources.Project;
-import org.sonar.api.resources.Resource;
-import org.sonar.api.rules.RulePriority;
-import org.sonar.jpa.test.AbstractDbUnitTestCase;
-
-import javax.persistence.Query;
-import java.text.ParseException;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.CoreMatchers.nullValue;
-import static org.hamcrest.core.IsNot.not;
-import static org.junit.Assert.assertThat;
-
-@Ignore
-public class DefaultSensorContextTest extends AbstractDbUnitTestCase {
- private DefaultSensorContext context;
- private Project project;
-
- @Before
- public void before() {
- project = null;
- context = null;
- }
-
- @Test
- public void saveProjectMeasure() throws ParseException {
- setup("saveProjectMeasure");
- context.saveMeasure(CoreMetrics.NCLOC, 500.0);
- check("saveProjectMeasure", "projects", "snapshots", "project_measures");
- }
-
- @Test
- public void saveMeasureOnExistingResource() throws ParseException {
- setup("saveMeasureOnExistingResource");
- context.saveMeasure(new JavaPackage("org.sonar"), CoreMetrics.NCLOC, 200.0);
- check("saveMeasureOnExistingResource", "projects", "snapshots", "project_measures");
- }
-
- @Test
- public void avoidConflictWithResourceFromOtherProject() throws ParseException {
- setup("avoidConflictWithResourceFromOtherProject");
- context.saveMeasure(new JavaPackage("org.sonar"), CoreMetrics.NCLOC, 200.0);
- context.saveMeasure(new JavaPackage("org.sonar"), CoreMetrics.COVERAGE, 80.0);
- check("avoidConflictWithResourceFromOtherProject", "projects", "snapshots", "project_measures");
- }
-
- @Test
- public void doNotPersistInMemoryMeasures() throws ParseException {
- setup("doNotPersistInMemoryMeasures");
- Measure measure = new Measure(CoreMetrics.NCLOC, 30.0).setPersistenceMode(PersistenceMode.MEMORY);
- context.saveMeasure(measure);
-
- check("doNotPersistInMemoryMeasures", "projects", "snapshots", "project_measures");
- assertThat(context.getMeasure(CoreMetrics.NCLOC).getValue(), is(30.0));
- }
-
- @Test
- public void doNotCacheDatabaseMeasures() throws ParseException {
- setup("doNotCacheDatabaseMeasures");
- Measure measure = new Measure(CoreMetrics.NCLOC, 500.0).setPersistenceMode(PersistenceMode.DATABASE);
- context.saveMeasure(measure);
-
- check("doNotCacheDatabaseMeasures", "projects", "snapshots", "project_measures");
- assertThat(context.getMeasure(CoreMetrics.NCLOC), nullValue());
- }
-
- @Test
- public void saveRuleMeasures() throws ParseException {
- setup("saveRuleMeasures");
- context.saveMeasure(RuleMeasure.createForPriority(CoreMetrics.VIOLATIONS, RulePriority.CRITICAL, 500.0));
- context.saveMeasure(RuleMeasure.createForCategory(CoreMetrics.VIOLATIONS, 3, 200.0));
- //FIXME context.saveMeasure(RuleMeasure.createForRule(CoreMetrics.VIOLATIONS, 3).setIntValue(50.0));
- check("saveRuleMeasures", "projects", "snapshots", "project_measures");
- }
-
- @Test
- public void saveResourceTree() throws ParseException {
-// setup("saveResourceTree");
-//
-// assertThat(context.getResource("org.foo.Bar"), nullValue());
-// context.saveResource(new JavaFile("org.foo.Bar"));
-// assertThat(context.getResource("org.foo.Bar"), is((Resource) new JavaFile("org.foo.Bar")));
-//
-// check("saveResourceTree", "projects", "snapshots");
- }
-//
-// @Test
-// public void doNotSaveExcludedResources() throws ParseException {
-// setup("doNotSaveExcludedResources");
-//
-// JavaFile javaFile = new JavaFile("org.excluded.Bar");
-// ResourceFilters resourceFilters = mock(ResourceFilters.class);
-// when(resourceFilters.isExcluded(javaFile)).thenReturn(true);
-// context.setResourceFilters(resourceFilters);
-//
-// assertThat(context.getResource("org.excluded.Bar"), nullValue());
-// assertThat(context.saveResource(javaFile), nullValue());
-// assertThat(context.getResource("org.excluded.Bar"), nullValue());
-//
-// check("doNotSaveExcludedResources", "projects", "snapshots");
-// }
-
- @Test
- public void updateExistingResourceFields() throws ParseException {
- setup("updateExistingResourceFields");
-
- context.saveResource(new JavaPackage("org.foo"));
-
- check("updateExistingResourceFields", "projects", "snapshots");
- }
-
- @Test
- public void doNotSaveOptimizedBestValues() throws ParseException {
- setup("doNotSaveOptimizedBestValues");
-
- // best values of the metrics violations and blocker_violations are set as optimized
- assertThat(CoreMetrics.VIOLATIONS.getBestValue(), is(0.0));
- assertThat(CoreMetrics.BLOCKER_VIOLATIONS.getBestValue(), is(0.0));
- assertThat(CoreMetrics.VIOLATIONS.isOptimizedBestValue(), is(true));
- assertThat(CoreMetrics.BLOCKER_VIOLATIONS.isOptimizedBestValue(), is(true));
-
- final Resource javaFile = new JavaFile("org.foo.Bar");
- assertThat(context.getMeasure(javaFile, CoreMetrics.VIOLATIONS), nullValue());
- context.saveMeasure(javaFile, CoreMetrics.VIOLATIONS, 60.0); // saved
- assertThat(context.getMeasure(javaFile, CoreMetrics.VIOLATIONS).getValue(), is(60.0));
-
- assertThat(context.getMeasure(javaFile, CoreMetrics.BLOCKER_VIOLATIONS), nullValue());
- context.saveMeasure(javaFile, CoreMetrics.BLOCKER_VIOLATIONS, 0.0); // not saved in database
- assertThat(context.getMeasure(javaFile, CoreMetrics.BLOCKER_VIOLATIONS).getValue(), is(0.0));
-
- check("doNotSaveOptimizedBestValues", "projects", "snapshots", "project_measures");
- }
-
- @Test
- public void saveOptimizedBestValuesIfOptionalFields() throws ParseException {
- setup("saveOptimizedBestValuesIfOptionalFields");
-
- // best value of the metric violations is set as optimized
- assertThat(CoreMetrics.VIOLATIONS.getBestValue(), is(0.0));
- assertThat(CoreMetrics.VIOLATIONS.isOptimizedBestValue(), is(true));
-
- final Resource javaFile = new JavaFile("org.foo.Bar");
- assertThat(context.getMeasure(javaFile, CoreMetrics.VIOLATIONS), nullValue());
- Measure measure = new Measure(CoreMetrics.VIOLATIONS, 0.0).setTendency(1);
-
- context.saveMeasure(javaFile, measure); // saved
-
- assertThat(context.getMeasure(javaFile, CoreMetrics.VIOLATIONS).getValue(), is(0.0));
- assertThat(context.getMeasure(javaFile, CoreMetrics.VIOLATIONS).getTendency(), is(1));
-
- check("saveOptimizedBestValuesIfOptionalFields", "projects", "snapshots", "project_measures");
- }
-
-
- @Test
- public void saveDependency() throws ParseException {
- setup("saveDependency");
-
- JavaPackage pac1 = new JavaPackage("org.sonar.source");
- JavaPackage pac2 = new JavaPackage("org.sonar.target");
- context.saveResource(pac1);
- context.saveResource(pac2);
-
- Dependency dep = new Dependency(pac1, pac2)
- .setUsage("INHERITS")
- .setWeight(3);
- context.saveDependency(dep);
-
- assertThat(dep.getId(), not(nullValue()));
-
- check("saveDependency", "projects", "snapshots", "dependencies");
- }
-
- @Test(expected = IllegalArgumentException.class)
- public void saveResourcesBeforeBuildingDependencies() throws ParseException {
- setup("saveResourcesBeforeBuildingDependencies");
-
- JavaPackage pac1 = new JavaPackage("org.sonar.source");
- JavaPackage pac2 = new JavaPackage("org.sonar.target");
- context.saveDependency(new Dependency(pac1, pac2));
- }
-
-
- private void setup(String unitTest) throws ParseException {
-// setupData(unitTest);
-// project = mock(Project.class);
-// when(project.getAnalysisVersion()).thenReturn("1.0");
-// when(project.getAnalysisDate()).thenReturn(new SimpleDateFormat("yyyy-MM-dd").parse("2008-12-25"));
-// when(project.getKey()).thenReturn("group:artifact");
-// when(project.getScope()).thenReturn(Resource.SCOPE_SET);
-// when(project.getQualifier()).thenReturn(Resource.QUALIFIER_PROJECT);
-// when(project.getLanguage()).thenReturn(Java.INSTANCE);
-// when(project.getId()).thenReturn(10);
-// when(project.getName()).thenReturn("my project");
-// when(project.isRoot()).thenReturn(true);
-// ProjectBootstrap projectBootstrap = new ProjectBootstrap(null);
-// projectBootstrap.setProject(project);
-// projectBootstrap.setSnapshot(getSnapshot(1));
-// context = new DefaultSensorContext(getSession(), projectBootstrap.setProject(project), getDao().getMeasuresDao(), null, null, null);
- }
-
- private void check(String unitTest, String... tables) {
- getSession().commit();
- checkTables(unitTest, tables);
- }
-
- private Snapshot getSnapshot(int id) {
- Query query = getSession().createQuery("SELECT s FROM Snapshot s WHERE s.id=:id");
- query.setParameter("id", id);
- return (Snapshot) query.getSingleResult();
- }
-}
assertThat(coverageMeasures.get(0).getValue(), is(300.0));
}
- @Test
- @Ignore("to do")
- public void shouldInsertDataMeasure() {
-
- }
-
@Test
public void shouldDelaySaving() {
measurePersister.setDelayedMode(true);
+++ /dev/null
-<dataset>
- <metrics id="1" NAME="ncloc" VAL_TYPE="INT" DESCRIPTION="[null]" domain="[null]" short_name=""
- enabled="true" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/>
- <metrics id="2" NAME="coverage" VAL_TYPE="INT" DESCRIPTION="[null]" domain="[null]" short_name=""
- enabled="true" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/>
-
- <!-- conflicting resources -->
- <projects long_name="[null]" id="1" scope="PRJ" kee="othergroup:artifact" qualifier="TRK" name="my project"
- root_id="[null]"
- description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
- <projects long_name="[null]" id="2" scope="DIR" kee="othergroup:artifact:org.sonar" qualifier="PAC" name="org.sonar"
- root_id="2"
- description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
- <projects long_name="[null]" id="10" scope="PRJ" kee="group:artifact" qualifier="TRK" name="my project"
- root_id="[null]"
- description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
- <projects long_name="[null]" id="11" scope="DIR" kee="group:artifact:org.sonar" qualifier="PAC" name="org.sonar"
- root_id="10"
- description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
- <!-- the project snapshot -->
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="1" created_at="2008-12-25 00:00:00.00" version="1.0" project_id="10" scope="PRJ" qualifier="TRK"
- root_project_id="10" root_snapshot_id="[null]" parent_snapshot_id="[null]" STATUS="U" ISLAST="false"
- path=""
- depth="0"/>
-
- <!-- conflicting snapshots -->
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="2" created_at="2007-10-02 13:58:00.00" version="2.0" project_id="1" scope="PRJ" qualifier="TRK"
- root_project_id="1" root_snapshot_id="[null]" parent_snapshot_id="[null]" STATUS="U" ISLAST="false"
- path=""
- depth="0"/>
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="3" created_at="2007-10-02 13:58:00.00" version="[null]" project_id="2" scope="DIR" qualifier="PAC"
- root_project_id="1" root_snapshot_id="2" parent_snapshot_id="2" STATUS="U" ISLAST="false" path="3."
- depth="1"/>
-
- <!-- the package snapshot -->
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="4" created_at="2008-12-25 00:00:00.00" version="[null]" project_id="11" scope="DIR" qualifier="PAC"
- root_project_id="10" root_snapshot_id="1" parent_snapshot_id="1" STATUS="U" ISLAST="false" path="1."
- depth="1"/>
-
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="1" VALUE="200" METRIC_ID="1" SNAPSHOT_ID="4" RULES_CATEGORY_ID="[null]"
- RULE_ID="[null]" text_value="[null]" tendency="[null]" measure_date="[null]" project_id="[null]"
- alert_status="[null]" description="[null]"/>
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="2" VALUE="80" METRIC_ID="2" SNAPSHOT_ID="4" RULES_CATEGORY_ID="[null]"
- RULE_ID="[null]" text_value="[null]" tendency="[null]" measure_date="[null]" project_id="[null]"
- alert_status="[null]" description="[null]"/>
-
-</dataset>
\ No newline at end of file
+++ /dev/null
-<dataset>
- <metrics id="1" NAME="ncloc" VAL_TYPE="INT" DESCRIPTION="[null]" domain="[null]" short_name=""
- enabled="true" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/>
- <metrics id="2" NAME="coverage" VAL_TYPE="INT" DESCRIPTION="[null]" domain="[null]" short_name=""
- enabled="true" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/>
-
- <!-- conflicting resources -->
- <projects long_name="[null]" id="1" scope="PRJ" kee="othergroup:artifact" qualifier="TRK" name="my project"
- root_id="[null]"
- description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
- <projects long_name="[null]" id="2" scope="DIR" kee="othergroup:artifact:org.sonar" qualifier="PAC" name="org.sonar"
- root_id="2"
- description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
- <!-- the project -->
- <projects long_name="[null]" id="10" scope="PRJ" kee="group:artifact" qualifier="TRK" name="my project"
- root_id="[null]"
- description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
- <!-- the project snapshot -->
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="0" id="1" created_at="2008-12-25 00:00:00.00" version="1.0" project_id="10" scope="PRJ"
- qualifier="TRK" root_project_id="10" root_snapshot_id="[null]" parent_snapshot_id="[null]" STATUS="U"
- ISLAST="false" path=""/>
-
- <!-- conflicting snapshots -->
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="0" id="2" created_at="2007-10-02 13:58:00.00" version="2.0" project_id="1" scope="PRJ"
- qualifier="TRK" root_project_id="1" root_snapshot_id="[null]" parent_snapshot_id="[null]" STATUS="U"
- ISLAST="false" path=""/>
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="1" id="3" created_at="2007-10-02 13:58:00.00" version="[null]" project_id="2" scope="DIR"
- qualifier="PAC" root_project_id="1" root_snapshot_id="2" parent_snapshot_id="2" STATUS="U"
- ISLAST="false"
- path="3."/>
-
-
-</dataset>
\ No newline at end of file
+++ /dev/null
-<dataset>
- <metrics id="1" NAME="ncloc" VAL_TYPE="INT" DESCRIPTION="[null]" domain="[null]" short_name=""
- enabled="true" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/>
-
- <projects long_name="[null]" id="10" scope="PRJ" kee="group:artifact" qualifier="TRK" name="my project"
- root_id="[null]"
- description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="1" created_at="2008-12-25 00:00:00.00" version="1.0" project_id="10" scope="PRJ" qualifier="TRK"
- root_project_id="[null]" root_snapshot_id="[null]" parent_snapshot_id="[null]" STATUS="U" ISLAST="false"
- path=""
- depth="0"/>
-
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="1" VALUE="500" METRIC_ID="1" SNAPSHOT_ID="1" RULES_CATEGORY_ID="[null]"
- RULE_ID="[null]" text_value="[null]" tendency="[null]" measure_date="[null]" project_id="[null]"
- alert_status="[null]" description="[null]"/>
-
-</dataset>
\ No newline at end of file
+++ /dev/null
-<dataset>
- <metrics id="1" NAME="ncloc" VAL_TYPE="INT" DESCRIPTION="[null]" domain="[null]" short_name=""
- enabled="true" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/>
-
- <projects long_name="[null]" id="10" scope="PRJ" kee="group:artifact" qualifier="TRK" name="my project"
- root_id="[null]"
- description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="1" created_at="2008-12-25 00:00:00.00" version="1.0" project_id="10" scope="PRJ" qualifier="TRK"
- root_project_id="[null]" root_snapshot_id="[null]" parent_snapshot_id="[null]" STATUS="U" ISLAST="false"
- path=""
- depth="0"/>
-
-</dataset>
\ No newline at end of file
+++ /dev/null
-<dataset>
- <metrics id="1" NAME="ncloc" VAL_TYPE="INT" DESCRIPTION="[null]" domain="[null]" short_name=""
- enabled="true" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/>
-
- <metrics id="2" NAME="coverage" VAL_TYPE="INT" DESCRIPTION="[null]" domain="[null]" short_name=""
- enabled="true" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/>
-
- <projects long_name="[null]" id="10" scope="PRJ" kee="group:artifact" qualifier="TRK" name="my project"
- root_id="[null]"
- description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="1" created_at="2008-12-25 00:00:00.00" version="1.0" project_id="10" scope="PRJ" qualifier="TRK"
- root_project_id="[null]" root_snapshot_id="[null]" parent_snapshot_id="[null]" STATUS="U" ISLAST="false"
- path=""
- depth="0"/>
-
-
- <!-- other measure, just to avoid dbunit to fail -->
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="1" VALUE="100" METRIC_ID="2" SNAPSHOT_ID="1" RULES_CATEGORY_ID="[null]"
- RULE_ID="[null]" text_value="[null]" tendency="[null]" measure_date="[null]" project_id="[null]"
- alert_status="[null]" description="[null]"/>
-</dataset>
\ No newline at end of file
+++ /dev/null
-<dataset>
- <metrics id="1" NAME="ncloc" VAL_TYPE="INT" DESCRIPTION="[null]" domain="[null]" short_name=""
- enabled="true" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/>
-
- <metrics id="2" NAME="coverage" VAL_TYPE="INT" DESCRIPTION="[null]" domain="[null]" short_name=""
- enabled="true" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/>
-
- <projects long_name="[null]" id="10" scope="PRJ" kee="group:artifact" qualifier="TRK" name="my project"
- root_id="[null]"
- description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="1" created_at="2008-12-25 00:00:00.00" version="1.0" project_id="10" scope="PRJ" qualifier="TRK"
- root_project_id="[null]" root_snapshot_id="[null]" parent_snapshot_id="[null]" STATUS="U" ISLAST="false"
- path=""
- depth="0"/>
-
-
- <!-- other measure, just to avoid dbunit to fail -->
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="1" VALUE="100" METRIC_ID="2" SNAPSHOT_ID="1" RULES_CATEGORY_ID="[null]"
- RULE_ID="[null]" text_value="[null]" tendency="[null]" measure_date="[null]" project_id="[null]"
- alert_status="[null]" description="[null]"/>
-</dataset>
\ No newline at end of file
+++ /dev/null
-<dataset>
- <metrics id="1" NAME="ncloc" VAL_TYPE="INT" DESCRIPTION="[null]" domain="[null]" short_name=""
- enabled="true" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/>
-
- <projects long_name="[null]" id="10" scope="PRJ" kee="group:artifact" qualifier="TRK" name="my project"
- root_id="[null]"
- description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="1" created_at="2008-12-25 00:00:00.00" version="1.0" project_id="10" scope="PRJ" qualifier="TRK"
- root_project_id="[null]" root_snapshot_id="[null]" parent_snapshot_id="[null]" STATUS="U" ISLAST="false"
- path=""
- depth="0"/>
-
-</dataset>
\ No newline at end of file
+++ /dev/null
-<dataset>
- <metrics id="1" NAME="ncloc" VAL_TYPE="INT" DESCRIPTION="[null]" domain="[null]" short_name=""
- enabled="true" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/>
-
- <projects long_name="[null]" id="10" scope="PRJ" kee="group:artifact" qualifier="TRK" name="my project"
- root_id="[null]"
- description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="1" created_at="2008-12-25 00:00:00.00" version="1.0" project_id="10" scope="PRJ" qualifier="TRK"
- root_project_id="[null]" root_snapshot_id="[null]" parent_snapshot_id="[null]" STATUS="U" ISLAST="false"
- path=""
- depth="0"/>
-
-</dataset>
\ No newline at end of file
+++ /dev/null
-<dataset>
- <metrics id="1" NAME="violations" VAL_TYPE="INT" DESCRIPTION="[null]" DIRECTION="1" domain="[null]" short_name=""
- enabled="true" worst_value="[null]" best_value="0" optimized_best_value="true" hidden="false"/>
- <metrics id="2" NAME="blocker_violations" VAL_TYPE="INT" DESCRIPTION="[null]" DIRECTION="1" domain="[null]" short_name=""
- enabled="true" worst_value="[null]" best_value="0" optimized_best_value="true" hidden="false"/>
-
- <projects long_name="[null]" id="10" scope="PRJ" kee="group:artifact" qualifier="TRK" name="my project"
- root_id="[null]"
- description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
- <projects long_name="[null]" id="11" scope="DIR" kee="group:artifact:org.foo" qualifier="PAC" name="org.foo"
- root_id="10"
- description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
- <projects long_name="org.foo.Bar" id="12" scope="FIL" kee="group:artifact:org.foo.Bar" qualifier="CLA" name="Bar"
- root_id="10"
- description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="1" created_at="2008-12-25 00:00:00.00" version="1.0" project_id="10" scope="PRJ" qualifier="TRK"
- root_project_id="10" root_snapshot_id="[null]" parent_snapshot_id="[null]" STATUS="U" ISLAST="false"
- path=""
- depth="0"/>
-
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="2" created_at="2008-12-25 00:00:00.00" version="[null]" project_id="11" scope="DIR" qualifier="PAC"
- root_project_id="10" root_snapshot_id="1" parent_snapshot_id="1" STATUS="U" ISLAST="false" path="1."
- depth="1"/>
-
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="3" created_at="2008-12-25 00:00:00.00" version="[null]" project_id="12" scope="FIL" qualifier="CLA"
- root_project_id="10" root_snapshot_id="1" parent_snapshot_id="2" STATUS="U" ISLAST="false" path="1.2."
- depth="2"/>
-
- <!-- violations on file -->
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="1" VALUE="60" METRIC_ID="1" SNAPSHOT_ID="3" RULES_CATEGORY_ID="[null]"
- RULE_ID="[null]" text_value="[null]" tendency="[null]" measure_date="[null]" project_id="[null]"
- alert_status="[null]" description="[null]"/>
-
-</dataset>
\ No newline at end of file
+++ /dev/null
-<dataset>
- <metrics id="1" NAME="violations" VAL_TYPE="INT" DESCRIPTION="[null]" DIRECTION="1" domain="[null]" short_name=""
- enabled="true" worst_value="[null]" best_value="0" optimized_best_value="true" hidden="false" />
- <metrics id="2" NAME="blocker_violations" VAL_TYPE="INT" DESCRIPTION="[null]" DIRECTION="1" domain="[null]" short_name=""
- enabled="true" worst_value="[null]" best_value="0" optimized_best_value="true" hidden="false" />
-
- <projects long_name="[null]" id="10" scope="PRJ" kee="group:artifact" qualifier="TRK" name="my project"
- root_id="[null]"
- description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
- <projects long_name="[null]" id="11" scope="DIR" kee="group:artifact:org.foo" qualifier="PAC" name="org.foo"
- root_id="10"
- description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
- <projects long_name="org.foo.Bar" id="12" scope="FIL" kee="group:artifact:org.foo.Bar" qualifier="CLA" name="Bar"
- root_id="10"
- description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="1" created_at="2008-12-25 00:00:00.00" version="1.0" project_id="10" scope="PRJ" qualifier="TRK"
- root_project_id="10" root_snapshot_id="[null]" parent_snapshot_id="[null]" STATUS="U" ISLAST="false"
- path=""
- depth="0"/>
-
-</dataset>
\ No newline at end of file
+++ /dev/null
-<dataset>
- <projects long_name="[null]" id="10" scope="PRJ" kee="group:artifact" qualifier="TRK" name="my project"
- root_id="[null]"
- description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
- <projects long_name="[null]" id="11" scope="DIR" kee="group:artifact:org.sonar.source" qualifier="PAC"
- name="org.sonar.source"
- root_id="[null]"
- description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
- <projects long_name="[null]" id="12" scope="DIR" kee="group:artifact:org.sonar.target" qualifier="PAC"
- name="org.sonar.target"
- root_id="[null]"
- description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
-
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="1" created_at="2008-12-25 00:00:00.00" version="1.0" project_id="10" scope="PRJ" qualifier="TRK"
- root_project_id="10" root_snapshot_id="[null]" parent_snapshot_id="[null]" STATUS="U" ISLAST="false"
- path=""
- depth="0"/>
-
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="2" created_at="2008-12-25 00:00:00.00" version="[null]" project_id="11" scope="DIR" qualifier="PAC"
- root_project_id="10" root_snapshot_id="1" parent_snapshot_id="1" STATUS="U" ISLAST="false"
- path="1."
- depth="1"/>
-
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="3" created_at="2008-12-25 00:00:00.00" version="[null]" project_id="12" scope="DIR" qualifier="PAC"
- root_project_id="10" root_snapshot_id="1" parent_snapshot_id="1" STATUS="U" ISLAST="false"
- path="1."
- depth="1"/>
-
-
- <dependencies id="1" from_resource_id="11" from_snapshot_id="2" to_resource_id="12" to_snapshot_id="3"
- parent_dependency_id="[null]" project_snapshot_id="1"
- dep_usage="INHERITS" dep_weight="3" />
-</dataset>
\ No newline at end of file
+++ /dev/null
-<dataset>
- <projects long_name="[null]" id="10" scope="PRJ" kee="group:artifact" qualifier="TRK" name="my project"
- root_id="[null]"
- description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
- <projects long_name="[null]" id="11" scope="DIR" kee="group:artifact:org.sonar.source" qualifier="PAC"
- name="org.sonar.source"
- root_id="[null]"
- description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
- <projects long_name="[null]" id="12" scope="DIR" kee="group:artifact:org.sonar.target" qualifier="PAC"
- name="org.sonar.target"
- root_id="[null]"
- description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
-
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="1" created_at="2008-12-25 00:00:00.00" version="1.0" project_id="10" scope="PRJ" qualifier="TRK"
- root_project_id="10" root_snapshot_id="[null]" parent_snapshot_id="[null]" STATUS="U" ISLAST="false"
- path=""
- depth="0"/>
-
-</dataset>
\ No newline at end of file
+++ /dev/null
-<dataset>
- <metrics id="1" NAME="ncloc" VAL_TYPE="INT" DESCRIPTION="[null]" domain="[null]" short_name=""
- enabled="true" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/>
- <metrics id="2" NAME="other" VAL_TYPE="INT" DESCRIPTION="[null]" domain="[null]" short_name=""
- enabled="true" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/>
-
- <projects long_name="[null]" id="10" scope="PRJ" kee="group:artifact" qualifier="TRK" name="my project"
- root_id="[null]"
- description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
- <projects long_name="[null]" id="11" scope="DIR" kee="group:artifact:org.sonar" qualifier="PAC" name="org.sonar"
- root_id="10"
- description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="1" created_at="2008-12-25 00:00:00.00" version="1.0" project_id="10" scope="PRJ" qualifier="TRK"
- root_project_id="10" root_snapshot_id="[null]" parent_snapshot_id="[null]" STATUS="U" ISLAST="false"
- path=""
- depth="0"/>
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="2" created_at="2008-12-25 00:00:00.00" version="[null]" project_id="11" scope="DIR" qualifier="PAC"
- root_project_id="10" root_snapshot_id="1" parent_snapshot_id="1" STATUS="U" ISLAST="false" path="1."
- depth="1"/>
-
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="1" VALUE="200" METRIC_ID="1" SNAPSHOT_ID="2" RULES_CATEGORY_ID="[null]"
- RULE_ID="[null]" text_value="[null]" tendency="[null]" measure_date="[null]" project_id="[null]"
- alert_status="[null]" description="[null]"/>
-
-</dataset>
\ No newline at end of file
+++ /dev/null
-<dataset>
- <metrics id="1" NAME="ncloc" VAL_TYPE="INT" DESCRIPTION="[null]" domain="[null]" short_name=""
- enabled="true" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/>
- <metrics id="2" NAME="other" VAL_TYPE="INT" DESCRIPTION="[null]" domain="[null]" short_name=""
- enabled="true" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/>
-
- <projects long_name="[null]" id="10" scope="PRJ" kee="group:artifact" qualifier="TRK" name="my project"
- root_id="[null]"
- description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
- <projects long_name="[null]" id="11" scope="DIR" kee="group:artifact:org.sonar" qualifier="PAC" name="org.sonar"
- root_id="10"
- description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="1" created_at="2008-12-25 00:00:00.00" version="1.0" project_id="10" scope="PRJ" qualifier="TRK"
- root_project_id="10" root_snapshot_id="[null]" parent_snapshot_id="[null]" STATUS="U" ISLAST="false"
- path=""
- depth="0"/>
-</dataset>
\ No newline at end of file
+++ /dev/null
-<dataset>
- <metrics id="1" NAME="violations" VAL_TYPE="INT" DESCRIPTION="[null]" DIRECTION="1" domain="[null]" short_name=""
- enabled="true" worst_value="[null]" best_value="0" optimized_best_value="true" hidden="false"/>
-
- <projects long_name="[null]" id="10" scope="PRJ" kee="group:artifact" qualifier="TRK" name="my project"
- root_id="[null]"
- description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
- <projects long_name="[null]" id="11" scope="DIR" kee="group:artifact:org.foo" qualifier="PAC" name="org.foo"
- root_id="10"
- description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
- <projects long_name="org.foo.Bar" id="12" scope="FIL" kee="group:artifact:org.foo.Bar" qualifier="CLA" name="Bar"
- root_id="10"
- description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="1" created_at="2008-12-25 00:00:00.00" version="1.0" project_id="10" scope="PRJ" qualifier="TRK"
- root_project_id="10" root_snapshot_id="[null]" parent_snapshot_id="[null]" STATUS="U" ISLAST="false"
- path=""
- depth="0"/>
-
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="2" created_at="2008-12-25 00:00:00.00" version="[null]" project_id="11" scope="DIR" qualifier="PAC"
- root_project_id="10" root_snapshot_id="1" parent_snapshot_id="1" STATUS="U" ISLAST="false" path="1."
- depth="1"/>
-
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="3" created_at="2008-12-25 00:00:00.00" version="[null]" project_id="12" scope="FIL" qualifier="CLA"
- root_project_id="10" root_snapshot_id="1" parent_snapshot_id="2" STATUS="U" ISLAST="false" path="1.2."
- depth="2"/>
-
- <!-- violations with default value. It's saved because tendency is set -->
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="1" VALUE="0" METRIC_ID="1" SNAPSHOT_ID="3" RULES_CATEGORY_ID="[null]"
- RULE_ID="[null]" text_value="[null]" tendency="1" measure_date="[null]" project_id="[null]"
- alert_status="[null]" description="[null]"/>
-
-</dataset>
\ No newline at end of file
+++ /dev/null
-<dataset>
- <metrics id="1" NAME="violations" VAL_TYPE="INT" DESCRIPTION="[null]" DIRECTION="1" domain="[null]" short_name=""
- enabled="true" worst_value="[null]" best_value="0" optimized_best_value="true" hidden="false" />
-
- <projects long_name="[null]" id="10" scope="PRJ" kee="group:artifact" qualifier="TRK" name="my project"
- root_id="[null]"
- description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
- <projects long_name="[null]" id="11" scope="DIR" kee="group:artifact:org.foo" qualifier="PAC" name="org.foo"
- root_id="10"
- description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
- <projects long_name="org.foo.Bar" id="12" scope="FIL" kee="group:artifact:org.foo.Bar" qualifier="CLA" name="Bar"
- root_id="10"
- description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="1" created_at="2008-12-25 00:00:00.00" version="1.0" project_id="10" scope="PRJ" qualifier="TRK"
- root_project_id="10" root_snapshot_id="[null]" parent_snapshot_id="[null]" STATUS="U" ISLAST="false"
- path=""
- depth="0"/>
-
-</dataset>
\ No newline at end of file
+++ /dev/null
-<dataset>
- <metrics id="1" NAME="ncloc" VAL_TYPE="INT" DESCRIPTION="[null]" domain="[null]" short_name=""
- enabled="true" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/>
-
- <projects long_name="[null]" id="10" scope="PRJ" kee="group:artifact" qualifier="TRK" name="my project"
- root_id="[null]"
- description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="1" created_at="2008-12-25 00:00:00.00" version="1.0" project_id="10" scope="PRJ" qualifier="TRK"
- root_project_id="[null]" root_snapshot_id="[null]" parent_snapshot_id="[null]" STATUS="U" ISLAST="false"
- path=""
- depth="0"/>
-
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="1" VALUE="500" METRIC_ID="1" SNAPSHOT_ID="1" RULES_CATEGORY_ID="[null]"
- RULE_ID="[null]" text_value="[null]" tendency="[null]" measure_date="[null]" project_id="[null]"
- alert_status="[null]" description="[null]"/>
-
-</dataset>
\ No newline at end of file
+++ /dev/null
-<dataset>
- <metrics id="1" NAME="ncloc" VAL_TYPE="INT" DESCRIPTION="[null]" domain="[null]" short_name=""
- enabled="true" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/>
-
- <projects long_name="[null]" id="10" scope="PRJ" kee="group:artifact" qualifier="TRK" name="my project"
- root_id="[null]"
- description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="1" created_at="2008-12-25 00:00:00.00" version="1.0" project_id="10" scope="PRJ" qualifier="TRK"
- root_project_id="[null]" root_snapshot_id="[null]" parent_snapshot_id="[null]" STATUS="U" ISLAST="false"
- path=""
- depth="0"/>
-
-</dataset>
\ No newline at end of file
+++ /dev/null
-<dataset>
- <metrics id="1" NAME="ncloc" VAL_TYPE="INT" DESCRIPTION="[null]" domain="[null]" short_name=""
- enabled="true" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/>
-
- <projects long_name="[null]" id="10" scope="PRJ" kee="group:artifact" qualifier="TRK" name="my project"
- root_id="[null]"
- description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
- <projects long_name="[null]" id="11" scope="DIR" kee="group:artifact:org.foo" qualifier="PAC" name="org.foo"
- root_id="10"
- description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
- <projects long_name="org.foo.Bar" id="12" scope="FIL" kee="group:artifact:org.foo.Bar" qualifier="CLA" name="Bar"
- root_id="10"
- description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="1" created_at="2008-12-25 00:00:00.00" version="1.0" project_id="10" scope="PRJ" qualifier="TRK"
- root_project_id="10" root_snapshot_id="[null]" parent_snapshot_id="[null]" STATUS="U" ISLAST="false"
- path=""
- depth="0"/>
-
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="2" created_at="2008-12-25 00:00:00.00" version="[null]" project_id="11" scope="DIR" qualifier="PAC"
- root_project_id="10" root_snapshot_id="1" parent_snapshot_id="1" STATUS="U" ISLAST="false" path="1."
- depth="1"/>
-
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="3" created_at="2008-12-25 00:00:00.00" version="[null]" project_id="12" scope="FIL" qualifier="CLA"
- root_project_id="10" root_snapshot_id="1" parent_snapshot_id="2" STATUS="U" ISLAST="false" path="1.2."
- depth="2"/>
-
-</dataset>
\ No newline at end of file
+++ /dev/null
-<dataset>
- <metrics id="1" NAME="ncloc" VAL_TYPE="INT" DESCRIPTION="[null]" domain="[null]" short_name=""
- enabled="true" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/>
-
- <projects long_name="[null]" id="10" scope="PRJ" kee="group:artifact" qualifier="TRK" name="my project"
- root_id="[null]"
- description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="1" created_at="2008-12-25 00:00:00.00" version="1.0" project_id="10" scope="PRJ" qualifier="TRK"
- root_project_id="10" root_snapshot_id="[null]" parent_snapshot_id="[null]" STATUS="U" ISLAST="false"
- path=""
- depth="0"/>
-
-</dataset>
\ No newline at end of file
+++ /dev/null
-<dataset>
- <projects long_name="[null]" id="10" scope="PRJ" kee="group:artifact" qualifier="TRK" name="my project"
- root_id="[null]"
- description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="1" created_at="2008-12-25 00:00:00.00" version="1.0" project_id="10" scope="PRJ" qualifier="TRK"
- root_project_id="10" root_snapshot_id="[null]" parent_snapshot_id="[null]" STATUS="U" ISLAST="false"
- path=""
- depth="0"/>
-
-</dataset>
\ No newline at end of file
+++ /dev/null
-<dataset>
- <metrics id="1" NAME="violations" VAL_TYPE="INT" DESCRIPTION="[null]" domain="[null]" short_name=""
- enabled="true" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/>
-
- <projects long_name="[null]" id="10" scope="PRJ" kee="group:artifact" qualifier="TRK" name="my project"
- root_id="[null]"
- description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="1" created_at="2008-12-25 00:00:00.00" version="1.0" project_id="10" scope="PRJ" qualifier="TRK"
- root_project_id="[null]" root_snapshot_id="[null]" parent_snapshot_id="[null]" STATUS="U" ISLAST="false"
- path=""
- depth="0"/>
-
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]" rule_priority="3"
- alert_text="[null]" id="1" VALUE="500" METRIC_ID="1" SNAPSHOT_ID="1" RULES_CATEGORY_ID="[null]"
- RULE_ID="[null]" text_value="[null]" tendency="[null]" measure_date="[null]" project_id="[null]"
- alert_status="[null]" description="[null]"/>
-
- <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
- rule_priority="[null]"
- alert_text="[null]" id="2" VALUE="200" METRIC_ID="1" SNAPSHOT_ID="1" RULES_CATEGORY_ID="[null]"
- RULE_ID="[null]" text_value="[null]" tendency="[null]" measure_date="[null]" project_id="[null]"
- alert_status="[null]" description="[null]"/>
-
-
-</dataset>
\ No newline at end of file
+++ /dev/null
-<dataset>
- <metrics id="1" NAME="violations" VAL_TYPE="INT" DESCRIPTION="[null]" domain="[null]" short_name=""
- enabled="true" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/>
-
- <projects long_name="[null]" id="10" scope="PRJ" kee="group:artifact" qualifier="TRK" name="my project"
- root_id="[null]"
- description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="1" created_at="2008-12-25 00:00:00.00" version="1.0" project_id="10" scope="PRJ" qualifier="TRK"
- root_project_id="[null]" root_snapshot_id="[null]" parent_snapshot_id="[null]" STATUS="U" ISLAST="false"
- path=""
- depth="0"/>
-
-</dataset>
\ No newline at end of file
+++ /dev/null
-<dataset>
- <metrics id="1" NAME="ncloc" VAL_TYPE="INT" DESCRIPTION="[null]" domain="[null]" short_name=""
- enabled="true" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/>
-
- <projects long_name="[null]" id="10" scope="PRJ" kee="group:artifact" qualifier="TRK" name="my project"
- root_id="[null]"
- description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
- <projects long_name="[null]" id="11" scope="DIR" qualifier="PAC" kee="group:artifact:org.foo" name="org.foo"
- root_id="[null]"
- description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="1" created_at="2008-12-25 00:00:00.00" version="1.0" project_id="10" scope="PRJ" qualifier="TRK"
- root_project_id="10" root_snapshot_id="[null]" parent_snapshot_id="[null]" STATUS="U" ISLAST="false"
- path=""
- depth="0"/>
-
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="2" created_at="2008-12-25 00:00:00.00" version="[null]" project_id="11" scope="DIR" qualifier="PAC"
- root_project_id="10" root_snapshot_id="1" parent_snapshot_id="1" STATUS="U" ISLAST="false" path="1."
- depth="1"/>
-
-</dataset>
\ No newline at end of file
+++ /dev/null
-<dataset>
- <metrics id="1" NAME="ncloc" VAL_TYPE="INT" DESCRIPTION="[null]" domain="[null]" short_name=""
- enabled="true" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/>
-
- <projects long_name="[null]" id="10" scope="PRJ" kee="group:artifact" qualifier="TRK" name="my project"
- root_id="[null]"
- description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
- <projects long_name="[null]" id="11" scope="FOO" qualifier="BAR" kee="group:artifact:org.foo" name="org.foo"
- root_id="[null]"
- description="[null]" enabled="false" profile_id="[null]" language="java" copy_resource_id="[null]"/>
-
- <snapshots period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="1" created_at="2008-12-25 00:00:00.00" version="1.0" project_id="10" scope="PRJ" qualifier="TRK"
- root_project_id="10" root_snapshot_id="[null]" parent_snapshot_id="[null]" STATUS="U" ISLAST="false"
- path=""
- depth="0"/>
-
-</dataset>
\ No newline at end of file
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
+import org.apache.commons.lang.SystemUtils;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Ignore;
import static org.hamcrest.Matchers.greaterThan;
import static org.hamcrest.core.Is.is;
import static org.junit.Assert.assertThat;
+import static org.junit.Assume.assumeThat;
import static org.junit.internal.matchers.StringContains.containsString;
import static org.mockito.Matchers.anyObject;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
-@Ignore("Temporarily deactivated because it sometimes freezes on Windows")
public class HttpDownloaderTest {
private static ServletTester tester;
@BeforeClass
public static void startServer() throws Exception {
+ assumeThat(SystemUtils.IS_OS_WINDOWS, is(false)); // Temporarily deactivated on Windows because of frequent freezes
+
tester = new ServletTester();
tester.setContextPath("/");
tester.addServlet(RedirectServlet.class, "/redirect/");