]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-2797 end of support of maven archetypes
authorSimon Brandhof <simon.brandhof@gmail.com>
Fri, 30 Sep 2011 11:30:22 +0000 (13:30 +0200)
committerSimon Brandhof <simon.brandhof@gmail.com>
Fri, 30 Sep 2011 11:30:22 +0000 (13:30 +0200)
75 files changed:
archetypes/sonar-basic-plugin/README.txt [deleted file]
archetypes/sonar-basic-plugin/pom.xml [deleted file]
archetypes/sonar-basic-plugin/project/pom.xml [deleted file]
archetypes/sonar-basic-plugin/project/src/main/java/org/sonar/plugins/sample/SampleDashboardWidget.java [deleted file]
archetypes/sonar-basic-plugin/project/src/main/java/org/sonar/plugins/sample/SampleMetrics.java [deleted file]
archetypes/sonar-basic-plugin/project/src/main/java/org/sonar/plugins/sample/SamplePlugin.java [deleted file]
archetypes/sonar-basic-plugin/project/src/main/java/org/sonar/plugins/sample/SampleSensor.java [deleted file]
archetypes/sonar-basic-plugin/project/src/main/resources/sample_dashboard_widget.html.erb [deleted file]
archetypes/sonar-basic-plugin/src/main/resources/META-INF/maven/archetype-metadata.xml [deleted file]
archetypes/sonar-basic-plugin/src/main/resources/META-INF/maven/archetype.xml [deleted file]
archetypes/sonar-basic-plugin/src/main/resources/archetype-resources/pom.xml [deleted file]
archetypes/sonar-basic-plugin/src/main/resources/archetype-resources/src/main/java/SampleDashboardWidget.java [deleted file]
archetypes/sonar-basic-plugin/src/main/resources/archetype-resources/src/main/java/SampleMetrics.java [deleted file]
archetypes/sonar-basic-plugin/src/main/resources/archetype-resources/src/main/java/SamplePlugin.java [deleted file]
archetypes/sonar-basic-plugin/src/main/resources/archetype-resources/src/main/java/SampleSensor.java [deleted file]
archetypes/sonar-basic-plugin/src/main/resources/archetype-resources/src/main/resources/sample_dashboard_widget.html.erb [deleted file]
archetypes/sonar-gwt-plugin/pom.xml [deleted file]
archetypes/sonar-gwt-plugin/project/pom.xml [deleted file]
archetypes/sonar-gwt-plugin/project/src/main/java/org/sonar/plugins/gwtsample/GwtSamplePlugin.java [deleted file]
archetypes/sonar-gwt-plugin/project/src/main/java/org/sonar/plugins/gwtsample/page/GwtSamplePage.java [deleted file]
archetypes/sonar-gwt-plugin/project/src/main/java/org/sonar/plugins/gwtsample/page/SamplePage.gwt.xml [deleted file]
archetypes/sonar-gwt-plugin/project/src/main/java/org/sonar/plugins/gwtsample/page/client/I18nConstants.java [deleted file]
archetypes/sonar-gwt-plugin/project/src/main/java/org/sonar/plugins/gwtsample/page/client/I18nConstants_fr.properties [deleted file]
archetypes/sonar-gwt-plugin/project/src/main/java/org/sonar/plugins/gwtsample/page/client/SamplePage.java [deleted file]
archetypes/sonar-gwt-plugin/project/src/main/java/org/sonar/plugins/gwtsample/page/public/test.html [deleted file]
archetypes/sonar-gwt-plugin/project/src/main/java/org/sonar/plugins/gwtsample/resourcetab/GwtSampleResourceTab.java [deleted file]
archetypes/sonar-gwt-plugin/project/src/main/java/org/sonar/plugins/gwtsample/resourcetab/SampleResourceTab.gwt.xml [deleted file]
archetypes/sonar-gwt-plugin/project/src/main/java/org/sonar/plugins/gwtsample/resourcetab/client/SampleResourceTab.java [deleted file]
archetypes/sonar-gwt-plugin/src/main/resources/META-INF/maven/archetype-metadata.xml [deleted file]
archetypes/sonar-gwt-plugin/src/main/resources/META-INF/maven/archetype.xml [deleted file]
archetypes/sonar-gwt-plugin/src/main/resources/archetype-resources/pom.xml [deleted file]
archetypes/sonar-gwt-plugin/src/main/resources/archetype-resources/src/main/java/GwtSamplePlugin.java [deleted file]
archetypes/sonar-gwt-plugin/src/main/resources/archetype-resources/src/main/java/page/GwtSamplePage.java [deleted file]
archetypes/sonar-gwt-plugin/src/main/resources/archetype-resources/src/main/java/page/SamplePage.gwt.xml [deleted file]
archetypes/sonar-gwt-plugin/src/main/resources/archetype-resources/src/main/java/page/client/I18nConstants.java [deleted file]
archetypes/sonar-gwt-plugin/src/main/resources/archetype-resources/src/main/java/page/client/I18nConstants_fr.properties [deleted file]
archetypes/sonar-gwt-plugin/src/main/resources/archetype-resources/src/main/java/page/client/SamplePage.java [deleted file]
archetypes/sonar-gwt-plugin/src/main/resources/archetype-resources/src/main/java/page/public/test.html [deleted file]
archetypes/sonar-gwt-plugin/src/main/resources/archetype-resources/src/main/java/resourcetab/GwtSampleResourceTab.java [deleted file]
archetypes/sonar-gwt-plugin/src/main/resources/archetype-resources/src/main/java/resourcetab/SampleResourceTab.gwt.xml [deleted file]
archetypes/sonar-gwt-plugin/src/main/resources/archetype-resources/src/main/java/resourcetab/client/SampleResourceTab.java [deleted file]
pom.xml
samples/README.txt [deleted file]
samples/assembly.xml [deleted file]
samples/checkstyle-extensions-plugin/pom.xml [deleted file]
samples/checkstyle-extensions-plugin/src/main/java/com/mycompany/sonar/checkstyle/CheckstyleExtensionRepository.java [deleted file]
samples/checkstyle-extensions-plugin/src/main/java/com/mycompany/sonar/checkstyle/CheckstyleExtensionsPlugin.java [deleted file]
samples/checkstyle-extensions-plugin/src/main/java/com/mycompany/sonar/checkstyle/MethodsCountCheck.java [deleted file]
samples/checkstyle-extensions-plugin/src/main/resources/com/mycompany/sonar/checkstyle/extensions.xml [deleted file]
samples/gwt-plugin/pom.xml [deleted file]
samples/gwt-plugin/src/main/java/com/mycompany/sonar/gwt/GwtPlugin.java [deleted file]
samples/gwt-plugin/src/main/java/com/mycompany/sonar/gwt/page/SamplePage.java [deleted file]
samples/gwt-plugin/src/main/java/com/mycompany/sonar/gwt/page/client/I18nConstants.java [deleted file]
samples/gwt-plugin/src/main/java/com/mycompany/sonar/gwt/page/client/SamplePagePanel.java [deleted file]
samples/gwt-plugin/src/main/java/com/mycompany/sonar/gwt/viewer/SampleViewer.java [deleted file]
samples/gwt-plugin/src/main/java/com/mycompany/sonar/gwt/viewer/client/SampleViewerPanel.java [deleted file]
samples/gwt-plugin/src/main/resources/com/mycompany/sonar/gwt/page/SamplePage.gwt.xml [deleted file]
samples/gwt-plugin/src/main/resources/com/mycompany/sonar/gwt/page/client/I18nConstants_fr.properties [deleted file]
samples/gwt-plugin/src/main/resources/com/mycompany/sonar/gwt/page/public/test.html [deleted file]
samples/gwt-plugin/src/main/resources/com/mycompany/sonar/gwt/viewer/SampleViewer.gwt.xml [deleted file]
samples/pmd-extensions-plugin/pom.xml [deleted file]
samples/pmd-extensions-plugin/src/main/java/com/mycompany/sonar/pmd/MaximumMethodsCountCheck.java [deleted file]
samples/pmd-extensions-plugin/src/main/java/com/mycompany/sonar/pmd/PmdExtensionRepository.java [deleted file]
samples/pmd-extensions-plugin/src/main/java/com/mycompany/sonar/pmd/PmdExtensionsPlugin.java [deleted file]
samples/pmd-extensions-plugin/src/main/resources/com/mycompany/sonar/pmd/extensions.xml [deleted file]
samples/pmd-extensions-plugin/src/main/resources/com/mycompany/sonar/pmd/rulesets.xml [deleted file]
samples/pom.xml [deleted file]
samples/standard-plugin/pom.xml [deleted file]
samples/standard-plugin/src/main/java/com/mycompany/sonar/standard/SampleMetrics.java [deleted file]
samples/standard-plugin/src/main/java/com/mycompany/sonar/standard/SamplePlugin.java [deleted file]
samples/standard-plugin/src/main/java/com/mycompany/sonar/standard/batch/RandomDecorator.java [deleted file]
samples/standard-plugin/src/main/java/com/mycompany/sonar/standard/batch/SampleSensor.java [deleted file]
samples/standard-plugin/src/main/java/com/mycompany/sonar/standard/ui/SampleFooter.java [deleted file]
samples/standard-plugin/src/main/java/com/mycompany/sonar/standard/ui/SampleRubyWidget.java [deleted file]
samples/standard-plugin/src/main/resources/sample_ruby_widget.html.erb [deleted file]

diff --git a/archetypes/sonar-basic-plugin/README.txt b/archetypes/sonar-basic-plugin/README.txt
deleted file mode 100644 (file)
index a4dca47..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-To update the archetype project :
-
-1. update sources of the initial project (/project directory)
-2. /project$ mvn install -DsonarTargetVersion=<version>
-3. copy the content of /project/target/generated-sources/archetype/src/main/resources to src/main/resources. Be careful with .svn files !
-
-To execute the archetype :
-mvn archetype:generate -B -DarchetypeGroupId=org.codehaus.sonar.archetypes -DarchetypeArtifactId=sonar-basic-plugin-archetype -DarchetypeVersion=<SONAR VERSION> -DgroupId=com.mycompany.sonar -DartifactId=sonar-basic-sample-plugin -Dversion=0.1-SNAPSHOT
\ No newline at end of file
diff --git a/archetypes/sonar-basic-plugin/pom.xml b/archetypes/sonar-basic-plugin/pom.xml
deleted file mode 100644 (file)
index 0b8e3ae..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <groupId>org.codehaus.sonar</groupId>
-    <artifactId>sonar</artifactId>
-    <version>2.12-SNAPSHOT</version>
-    <relativePath>../..</relativePath>
-  </parent>
-
-  <groupId>org.codehaus.sonar.archetypes</groupId>
-  <artifactId>sonar-basic-plugin-archetype</artifactId>
-  <packaging>maven-archetype</packaging>
-  <name>Sonar :: Archetypes :: Basic</name>
-  <description>Maven archetype to create a basic Sonar plugin</description>
-
-  <properties>
-    <sonarTargetVersion>${project.version}</sonarTargetVersion>
-  </properties>
-
-  <dependencies>
-    <dependency>
-      <groupId>org.codehaus.sonar</groupId>
-      <artifactId>sonar-plugin-api</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <resources>
-      <resource>
-        <filtering>true</filtering>
-        <directory>${basedir}/src/main/resources</directory>
-      </resource>
-    </resources>
-    <extensions>
-      <extension>
-        <groupId>org.apache.maven.archetype</groupId>
-        <artifactId>archetype-packaging</artifactId>
-        <version>2.0-alpha-4</version>
-      </extension>
-    </extensions>
-    <plugins>
-      <plugin>
-        <artifactId>maven-archetype-plugin</artifactId>
-        <version>2.0-alpha-4</version>
-        <extensions>true</extensions>
-      </plugin>
-    </plugins>
-  </build>
-</project>
diff --git a/archetypes/sonar-basic-plugin/project/pom.xml b/archetypes/sonar-basic-plugin/project/pom.xml
deleted file mode 100644 (file)
index 15fc124..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <groupId>org.codehaus.sonar.archetypes</groupId>
-  <artifactId>sonar-basic-plugin</artifactId>
-  <packaging>sonar-plugin</packaging>
-  <version>1.0-SNAPSHOT</version>
-  <name>My Sonar plugin</name>
-  <description>plugin description</description>
-
-  <!-- optional -->
-  <organization>
-    <name>My company</name>
-    <url>http://www.mycompany.com</url>
-  </organization>
-  
-  <dependencies>
-    <dependency>
-      <groupId>org.codehaus.sonar</groupId>
-      <artifactId>sonar-plugin-api</artifactId>
-      <version>${sonarTargetVersion}</version>
-    </dependency>
-    
-    <!-- add your dependencies here -->
-    
-    <!-- unit tests -->
-    <dependency>
-      <groupId>org.codehaus.sonar</groupId>
-      <artifactId>sonar-testing-harness</artifactId>
-      <version>${sonarTargetVersion}</version>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.codehaus.sonar</groupId>
-        <artifactId>sonar-packaging-maven-plugin</artifactId>
-        <version>1.0</version>
-        <extensions>true</extensions>
-        <configuration>
-          <pluginClass>${package}.SamplePlugin</pluginClass>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <version>2.0.2</version>
-        <configuration>
-          <source>1.5</source>
-          <target>1.5</target>
-          <encoding>UTF-8</encoding>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-</project>
diff --git a/archetypes/sonar-basic-plugin/project/src/main/java/org/sonar/plugins/sample/SampleDashboardWidget.java b/archetypes/sonar-basic-plugin/project/src/main/java/org/sonar/plugins/sample/SampleDashboardWidget.java
deleted file mode 100644 (file)
index 1b5d5e2..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-package org.sonar.plugins.sample;
-
-import org.sonar.api.web.*;
-
-@UserRole(UserRole.USER)
-@Description("Show how to use Ruby Widget API")
-@WidgetProperties({
-  @WidgetProperty(key="param1",
-    description="This is a mandatory parameter",
-    optional=false
-  ),
-  @WidgetProperty(key="max",
-    description="max threshold",
-    type=WidgetPropertyType.INTEGER,
-    defaultValue="80"
-  ),
-  @WidgetProperty(key="param2",
-    description="This is an optional parameter"
-  ),
-  @WidgetProperty(key="floatprop",
-    description="test description"
-  )
-})
-public class SampleDashboardWidget extends AbstractRubyTemplate implements RubyRailsWidget {
-
-  public String getId() {
-    return "sample";
-  }
-
-  public String getTitle() {
-    return "Sample";
-  }
-
-  @Override
-  protected String getTemplatePath() {
-    return "/sample_dashboard_widget.html.erb";
-  }
-}
\ No newline at end of file
diff --git a/archetypes/sonar-basic-plugin/project/src/main/java/org/sonar/plugins/sample/SampleMetrics.java b/archetypes/sonar-basic-plugin/project/src/main/java/org/sonar/plugins/sample/SampleMetrics.java
deleted file mode 100644 (file)
index 294bc5c..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-package org.sonar.plugins.sample;
-
-import org.sonar.api.measures.Metrics;
-import org.sonar.api.measures.Metric;
-import org.sonar.api.measures.CoreMetrics;
-
-import java.util.List;
-import java.util.Arrays;
-
-public class SampleMetrics implements Metrics {
-
-  public static final Metric MESSAGE = new Metric("message_key", "Message",
-    "This is a metric to store a well known message", Metric.ValueType.STRING, -1, false,
-    CoreMetrics.DOMAIN_GENERAL);
-
-
-  public static final Metric RANDOM = new Metric("random", "Random",
-    "Random value", Metric.ValueType.FLOAT, Metric.DIRECTION_BETTER, false,
-    CoreMetrics.DOMAIN_GENERAL);
-
-  // getMetrics() method is defined in the Metrics interface and is used by
-  // Sonar to retrieve the list of new Metric
-  public List<Metric> getMetrics() {
-    return Arrays.asList(MESSAGE, RANDOM);
-  }
-}
diff --git a/archetypes/sonar-basic-plugin/project/src/main/java/org/sonar/plugins/sample/SamplePlugin.java b/archetypes/sonar-basic-plugin/project/src/main/java/org/sonar/plugins/sample/SamplePlugin.java
deleted file mode 100644 (file)
index 5856d41..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-package org.sonar.plugins.sample;\r
-\r
-import org.sonar.api.Plugin;\r
-\r
-import java.util.ArrayList;\r
-import java.util.List;\r
-\r
-/**\r
- * This class is the entry point for all extensions\r
- */\r
-public class SamplePlugin implements Plugin {\r
-\r
-  /**\r
-   * @deprecated this is not used anymore\r
-   */\r
-  public String getKey() {\r
-    return "sample";\r
-  }\r
-\r
-  /**\r
-   * @deprecated this is not used anymore\r
-   */\r
-  public String getName() {\r
-    return "My Sonar plugin";\r
-  }\r
-\r
-  /**\r
-   * @deprecated this is not used anymore\r
-   */\r
-  public String getDescription() {\r
-    return "You shouldn't expect too much from this plugin except displaying the Hello World message.";\r
-  }\r
-\r
-  // This is where you're going to declare all your Sonar extensions\r
-  public List getExtensions() {\r
-    return Arrays.asList(SampleMetrics.class, SampleSensor.class, SampleDashboardWidget.class);\r
-  }\r
-\r
-  @Override\r
-  public String toString() {\r
-    return getClass().getSimpleName();\r
-  }\r
-}
\ No newline at end of file
diff --git a/archetypes/sonar-basic-plugin/project/src/main/java/org/sonar/plugins/sample/SampleSensor.java b/archetypes/sonar-basic-plugin/project/src/main/java/org/sonar/plugins/sample/SampleSensor.java
deleted file mode 100644 (file)
index 6e0deb7..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-package org.sonar.plugins.sample;
-
-import org.apache.commons.lang.math.RandomUtils;
-import org.sonar.api.batch.Sensor;
-import org.sonar.api.batch.SensorContext;
-import org.sonar.api.measures.Measure;
-import org.sonar.api.resources.Project;
-
-public class SampleSensor implements Sensor {
-
-  public boolean shouldExecuteOnProject(Project project) {
-    // this sensor is executed on any type of project
-    return true;
-  }
-
-  public void analyse(Project project, SensorContext sensorContext) {
-    saveLabelMeasure(sensorContext);
-    saveNumericMeasure(sensorContext);
-  }
-
-  private void saveNumericMeasure(SensorContext context) {
-    // Sonar API includes many libraries like commons-lang and google-collections
-    context.saveMeasure(SampleMetrics.RANDOM, RandomUtils.nextDouble());
-  }
-
-  private void saveLabelMeasure(SensorContext context) {
-    Measure measure = new Measure(SampleMetrics.MESSAGE, "Hello World!");
-    context.saveMeasure(measure);
-  }
-}
diff --git a/archetypes/sonar-basic-plugin/project/src/main/resources/sample_dashboard_widget.html.erb b/archetypes/sonar-basic-plugin/project/src/main/resources/sample_dashboard_widget.html.erb
deleted file mode 100644 (file)
index d52038f..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-<div class="dashbox">
-  <h3><span title="<%= metric('random').description -%>"></span></h3>
-  <p>
-    <span class="big">
-      <%= format_measure('random') -%> <%= tendency_icon(measure('random')) %>
-    </span>
-  </p>
-  <p><%= format_measure('message') -%></p>
-  <p>
-    <%= format_measure('ncloc', :suffix => ' lines', :url => url_for_drilldown('ncloc')) -%>
-  </p>
-</div>
-<div class="dashbox">
-       <h3>Help</h3>
-         <p>
-      Read configuration : <%= configuration('sonar.jdbc.username') -%>
-    </p>
-
-       <p>
-           Sample of Jfree Eastwood chart : <br/>
-               <%= gchart('cht=bhs&chco=FF0000,00FF00,0000FF&chs=200x125&chd=s:FOE,THE,Bar&chxt=x,y&chxl=1:|Dec|Nov|Oct|0:||20K||60K||100K|') -%>
-         </p>
-       <p>
-               Widget properties:
-               <table>
-                 <tr>
-                   <td>max:</td>
-                   <td><%= widget_properties['max'] -%></td>   
-                 </tr> 
-               <tr>
-                   <td>param1:</td>
-                   <td><%= widget_properties['param1'] -%></td>        
-                 </tr>
-               <tr>
-                   <td>param2:</td>
-                   <td><%= widget_properties['param2'] -%></td>        
-                 </tr>
-               </table>
-       </p>
-</div>
diff --git a/archetypes/sonar-basic-plugin/src/main/resources/META-INF/maven/archetype-metadata.xml b/archetypes/sonar-basic-plugin/src/main/resources/META-INF/maven/archetype-metadata.xml
deleted file mode 100644 (file)
index 4333c92..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><archetype-descriptor name="sonar-basic-plugin">
-  <fileSets>
-    <fileSet filtered="true" packaged="true" encoding="UTF-8">
-      <directory>src/main/java</directory>
-      <includes>
-        <include>**/*.java</include>
-      </includes>
-    </fileSet>
-    <fileSet encoding="UTF-8">
-      <directory>src/main/resources</directory>
-      <includes>
-        <include>**/*.erb</include>
-      </includes>
-    </fileSet>
-  </fileSets>
-</archetype-descriptor>
\ No newline at end of file
diff --git a/archetypes/sonar-basic-plugin/src/main/resources/META-INF/maven/archetype.xml b/archetypes/sonar-basic-plugin/src/main/resources/META-INF/maven/archetype.xml
deleted file mode 100644 (file)
index 4c51c1c..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><archetype>
-  <id>sonar-basic-plugin</id>
-  <sources>
-    <source>src/main/java/SampleDashboardWidget.java</source>
-    <source>src/main/java/SampleMetrics.java</source>
-    <source>src/main/java/SamplePlugin.java</source>
-    <source>src/main/java/SampleSensor.java</source>
-  </sources>
-  <resources>
-    <resource>src/main/resources/sample_dashboard_widget.html.erb</resource>
-  </resources>
-</archetype>
\ No newline at end of file
diff --git a/archetypes/sonar-basic-plugin/src/main/resources/archetype-resources/pom.xml b/archetypes/sonar-basic-plugin/src/main/resources/archetype-resources/pom.xml
deleted file mode 100644 (file)
index 9d8f2a1..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">\r
-  <modelVersion>4.0.0</modelVersion>\r
-  <groupId>$groupId</groupId>\r
-  <artifactId>$artifactId</artifactId>\r
-  <packaging>sonar-plugin</packaging>\r
-  <version>$version</version>\r
-  <name>My Sonar plugin</name>\r
-  <description>plugin description</description>\r
-\r
-  <!-- optional -->\r
-  <organization>\r
-    <name>My company</name>\r
-    <url>http://www.mycompany.com</url>\r
-  </organization>\r
-  \r
-  <dependencies>\r
-    <dependency>\r
-      <groupId>org.codehaus.sonar</groupId>\r
-      <artifactId>sonar-plugin-api</artifactId>\r
-      <version>${sonarTargetVersion}</version>\r
-    </dependency>\r
-    \r
-    <!-- add your dependencies here -->\r
-    \r
-    <!-- unit tests -->\r
-    <dependency>\r
-      <groupId>org.codehaus.sonar</groupId>\r
-      <artifactId>sonar-testing-harness</artifactId>\r
-      <version>${sonarTargetVersion}</version>\r
-      <scope>test</scope>\r
-    </dependency>\r
-  </dependencies>\r
-\r
-  <build>\r
-    <plugins>\r
-      <plugin>\r
-        <groupId>org.codehaus.sonar</groupId>\r
-        <artifactId>sonar-packaging-maven-plugin</artifactId>\r
-        <version>1.0</version>\r
-        <extensions>true</extensions>\r
-        <configuration>\r
-          <pluginClass>${package}.SamplePlugin</pluginClass>\r
-        </configuration>\r
-      </plugin>\r
-      <plugin>\r
-        <groupId>org.apache.maven.plugins</groupId>\r
-        <artifactId>maven-compiler-plugin</artifactId>\r
-        <version>2.0.2</version>\r
-        <configuration>\r
-          <source>1.5</source>\r
-          <target>1.5</target>\r
-          <encoding>UTF-8</encoding>\r
-        </configuration>\r
-      </plugin>\r
-    </plugins>\r
-  </build>\r
-</project>\r
diff --git a/archetypes/sonar-basic-plugin/src/main/resources/archetype-resources/src/main/java/SampleDashboardWidget.java b/archetypes/sonar-basic-plugin/src/main/resources/archetype-resources/src/main/java/SampleDashboardWidget.java
deleted file mode 100644 (file)
index f368bda..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-package ${package};
-
-import org.sonar.api.web.*;
-
-@UserRole(UserRole.USER)
-@Description("Show how to use Ruby Widget API")
-@WidgetProperties({
-        @WidgetProperty(key="param1",
-                        description="This is a mandatory parameter",
-                        optional=false
-        ),
-        @WidgetProperty(key="max",
-                        description="max threshold",
-                        type=WidgetPropertyType.INTEGER,
-                        defaultValue="80"
-        ),
-        @WidgetProperty(key="param2",
-                        description="This is an optional parameter"
-        ),
-        @WidgetProperty(key="floatprop",
-                        description="test description"
-        )
-})
-public class SampleDashboardWidget extends AbstractRubyTemplate implements RubyRailsWidget {
-
-  public String getId() {
-    return "sample";
-  }
-
-  public String getTitle() {
-    return "Sample";
-  }
-
-  @Override
-  protected String getTemplatePath() {
-    return "/sample_dashboard_widget.html.erb";
-  }
-}
\ No newline at end of file
diff --git a/archetypes/sonar-basic-plugin/src/main/resources/archetype-resources/src/main/java/SampleMetrics.java b/archetypes/sonar-basic-plugin/src/main/resources/archetype-resources/src/main/java/SampleMetrics.java
deleted file mode 100644 (file)
index 0f675d6..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-package ${package};
-
-import org.sonar.api.measures.Metrics;
-import org.sonar.api.measures.Metric;
-import org.sonar.api.measures.CoreMetrics;
-
-import java.util.List;
-import java.util.Arrays;
-
-public class SampleMetrics implements Metrics {
-
-  public static final Metric MESSAGE = new Metric("message_key", "Message",
-    "This is a metric to store a well known message", Metric.ValueType.STRING, -1, false,
-    CoreMetrics.DOMAIN_GENERAL);
-
-
-  public static final Metric RANDOM = new Metric("random", "Random",
-    "Random value", Metric.ValueType.FLOAT, Metric.DIRECTION_BETTER, false,
-    CoreMetrics.DOMAIN_GENERAL);
-
-  // getMetrics() method is defined in the Metrics interface and is used by
-  // Sonar to retrieve the list of new Metric
-  public List<Metric> getMetrics() {
-    return Arrays.asList(MESSAGE, RANDOM);
-  }
-}
diff --git a/archetypes/sonar-basic-plugin/src/main/resources/archetype-resources/src/main/java/SamplePlugin.java b/archetypes/sonar-basic-plugin/src/main/resources/archetype-resources/src/main/java/SamplePlugin.java
deleted file mode 100644 (file)
index 79c4b32..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-#set( $symbol_pound = '#' )\r
-#set( $symbol_dollar = '$' )\r
-#set( $symbol_escape = '\' )\r
-package ${package};\r
-\r
-import org.sonar.api.Plugin;\r
-\r
-import java.util.Arrays;\r
-import java.util.List;\r
-\r
-/**\r
- * This class is the entry point for all extensions\r
- */\r
-public class SamplePlugin implements Plugin {\r
-\r
-  /**\r
-   * @deprecated this is not used anymore\r
-   */\r
-  public String getKey() {\r
-    return "sample";\r
-  }\r
-\r
-  /**\r
-   * @deprecated this is not used anymore\r
-   */\r
-  public String getName() {\r
-    return "My Sonar plugin";\r
-  }\r
-\r
-  /**\r
-   * @deprecated this is not used anymore\r
-   */\r
-  public String getDescription() {\r
-    return "You shouldn't expect too much from this plugin except displaying the Hello World message.";\r
-  }\r
-\r
-  // This is where you're going to declare all your Sonar extensions\r
-  public List getExtensions() {\r
-    return Arrays.asList(SampleMetrics.class, SampleSensor.class, SampleDashboardWidget.class);\r
-  }\r
-\r
-  @Override\r
-  public String toString() {\r
-    return getClass().getSimpleName();\r
-  }\r
-}\r
diff --git a/archetypes/sonar-basic-plugin/src/main/resources/archetype-resources/src/main/java/SampleSensor.java b/archetypes/sonar-basic-plugin/src/main/resources/archetype-resources/src/main/java/SampleSensor.java
deleted file mode 100644 (file)
index d28f80c..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-package ${package};
-
-import org.apache.commons.lang.math.RandomUtils;
-import org.sonar.api.batch.Sensor;
-import org.sonar.api.batch.SensorContext;
-import org.sonar.api.measures.Measure;
-import org.sonar.api.resources.Project;
-
-public class SampleSensor implements Sensor {
-
-  public boolean shouldExecuteOnProject(Project project) {
-    // this sensor is executed on any type of project
-    return true;
-  }
-
-  public void analyse(Project project, SensorContext sensorContext) {
-    saveLabelMeasure(sensorContext);
-    saveNumericMeasure(sensorContext);
-  }
-
-  private void saveNumericMeasure(SensorContext context) {
-    // Sonar API includes many libraries like commons-lang and google-collections
-    context.saveMeasure(SampleMetrics.RANDOM, RandomUtils.nextDouble());
-  }
-
-  private void saveLabelMeasure(SensorContext context) {
-    Measure measure = new Measure(SampleMetrics.MESSAGE, "Hello World!");
-    context.saveMeasure(measure);
-  }
-}
diff --git a/archetypes/sonar-basic-plugin/src/main/resources/archetype-resources/src/main/resources/sample_dashboard_widget.html.erb b/archetypes/sonar-basic-plugin/src/main/resources/archetype-resources/src/main/resources/sample_dashboard_widget.html.erb
deleted file mode 100644 (file)
index d52038f..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-<div class="dashbox">
-  <h3><span title="<%= metric('random').description -%>"></span></h3>
-  <p>
-    <span class="big">
-      <%= format_measure('random') -%> <%= tendency_icon(measure('random')) %>
-    </span>
-  </p>
-  <p><%= format_measure('message') -%></p>
-  <p>
-    <%= format_measure('ncloc', :suffix => ' lines', :url => url_for_drilldown('ncloc')) -%>
-  </p>
-</div>
-<div class="dashbox">
-       <h3>Help</h3>
-         <p>
-      Read configuration : <%= configuration('sonar.jdbc.username') -%>
-    </p>
-
-       <p>
-           Sample of Jfree Eastwood chart : <br/>
-               <%= gchart('cht=bhs&chco=FF0000,00FF00,0000FF&chs=200x125&chd=s:FOE,THE,Bar&chxt=x,y&chxl=1:|Dec|Nov|Oct|0:||20K||60K||100K|') -%>
-         </p>
-       <p>
-               Widget properties:
-               <table>
-                 <tr>
-                   <td>max:</td>
-                   <td><%= widget_properties['max'] -%></td>   
-                 </tr> 
-               <tr>
-                   <td>param1:</td>
-                   <td><%= widget_properties['param1'] -%></td>        
-                 </tr>
-               <tr>
-                   <td>param2:</td>
-                   <td><%= widget_properties['param2'] -%></td>        
-                 </tr>
-               </table>
-       </p>
-</div>
diff --git a/archetypes/sonar-gwt-plugin/pom.xml b/archetypes/sonar-gwt-plugin/pom.xml
deleted file mode 100644 (file)
index 283cd64..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <groupId>org.codehaus.sonar</groupId>
-    <artifactId>sonar</artifactId>
-    <version>2.12-SNAPSHOT</version>
-    <relativePath>../..</relativePath>
-  </parent>
-
-  <groupId>org.codehaus.sonar.archetypes</groupId>
-  <artifactId>sonar-gwt-plugin-archetype</artifactId>
-  <packaging>maven-archetype</packaging>
-  <name>Sonar :: Archetypes :: GWT</name>
-  <description>Maven archetype to create a Sonar plugin including GWT pages</description>
-
-  <properties>
-    <sonarTargetVersion>${project.version}</sonarTargetVersion>
-    <dollar>$</dollar>
-  </properties>
-
-  <dependencies>
-    <dependency>
-      <groupId>org.codehaus.sonar</groupId>
-      <artifactId>sonar-plugin-api</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.codehaus.sonar</groupId>
-      <artifactId>sonar-gwt-api</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <resources>
-      <resource>
-        <filtering>true</filtering>
-        <directory>${basedir}/src/main/resources</directory>
-      </resource>
-    </resources>
-
-    <extensions>
-      <extension>
-        <groupId>org.apache.maven.archetype</groupId>
-        <artifactId>archetype-packaging</artifactId>
-        <version>2.0-alpha-4</version>
-      </extension>
-    </extensions>
-    <plugins>
-      <plugin>
-        <artifactId>maven-archetype-plugin</artifactId>
-        <version>2.0-alpha-4</version>
-        <extensions>true</extensions>
-      </plugin>
-    </plugins>
-  </build>
-</project>
diff --git a/archetypes/sonar-gwt-plugin/project/pom.xml b/archetypes/sonar-gwt-plugin/project/pom.xml
deleted file mode 100644 (file)
index 5111399..0000000
+++ /dev/null
@@ -1,123 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-
-  <groupId>org.codehaus.sonar.archetypes</groupId>
-  <artifactId>sonar-gwt-plugin</artifactId>
-  <packaging>sonar-plugin</packaging>
-  <version>1.0-SNAPSHOT</version>
-  <name>My Sonar GWT plugin</name>
-  <description>GWT Sample description</description>
-  
-  <!-- optional -->
-  <organization>
-    <name>My company</name>
-    <url>http://www.mycompany.com</url>
-  </organization>
-
-  <repositories>
-    <repository>
-      <!-- for gwt-incubator -->
-      <id>sonar</id>
-      <name>Sonar</name>
-      <url>http://repository.sonarsource.org/content/repositories/sonar</url>
-      <releases>
-        <enabled>true</enabled>
-      </releases>
-      <snapshots>
-        <enabled>false</enabled>
-      </snapshots>
-    </repository>
-  </repositories>
-
-  <dependencies>
-    <dependency>
-      <groupId>org.codehaus.sonar</groupId>
-      <artifactId>sonar-plugin-api</artifactId>
-      <version>${sonarTargetVersion}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.codehaus.sonar</groupId>
-      <artifactId>sonar-gwt-api</artifactId>
-      <version>${sonarTargetVersion}</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>com.google.gwt</groupId>
-      <artifactId>gwt-user</artifactId>
-      <version>2.0.3</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>com.google.gwt</groupId>
-      <artifactId>gwt-incubator</artifactId>
-      <version>2.0.1</version>
-      <scope>provided</scope>
-    </dependency>
-
-    <!-- unit tests -->
-    <dependency>
-      <groupId>org.codehaus.sonar</groupId>
-      <artifactId>sonar-testing-harness</artifactId>
-      <version>${sonarTargetVersion}</version>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>4.7</version>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <resources>
-      <resource>
-        <directory>src/main/java</directory>
-      </resource>
-    </resources>
-    <plugins>
-      <plugin>
-        <groupId>org.codehaus.sonar</groupId>
-        <artifactId>sonar-packaging-maven-plugin</artifactId>
-        <version>1.0</version>
-        <extensions>true</extensions>
-        <configuration>
-          <pluginClass>${package}.GwtSamplePlugin</pluginClass>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>gwt-maven-plugin</artifactId>
-        <version>1.2</version>
-        <executions>
-          <execution>
-            <configuration>
-              <modules>
-                <module>${package}.resourcetab.SampleResourceTab</module>
-                <module>${package}.page.SamplePage</module>
-              </modules>
-              <webappDirectory>${project.build.directory}/classes</webappDirectory>
-              <!-- do not break the following property on two lines -->
-              <extraJvmArgs>-Xmx512m -Dgwt.jjs.permutationWorkerFactory=com.google.gwt.dev.ThreadedPermutationWorkerFactory</extraJvmArgs>
-            </configuration>
-            <goals>
-              <goal>compile</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <version>2.0.2</version>
-        <configuration>
-          <source>1.5</source>
-          <target>1.5</target>
-          <encoding>UTF-8</encoding>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-</project>
diff --git a/archetypes/sonar-gwt-plugin/project/src/main/java/org/sonar/plugins/gwtsample/GwtSamplePlugin.java b/archetypes/sonar-gwt-plugin/project/src/main/java/org/sonar/plugins/gwtsample/GwtSamplePlugin.java
deleted file mode 100644 (file)
index 6bb1950..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-package org.sonar.plugins.gwtsample;\r
-\r
-import org.sonar.api.Plugin;\r
-import org.sonar.plugins.gwtsample.page.GwtSamplePage;\r
-import org.sonar.plugins.gwtsample.resourcetab.GwtSampleResourceTab;\r
-\r
-import java.util.Arrays;\r
-import java.util.List;\r
-\r
-public class GwtSamplePlugin implements Plugin {\r
-\r
-  /**\r
-   * @deprecated this is not used anymore\r
-   */\r
-  public String getKey() {\r
-    return "gwt-sample";\r
-  }\r
-\r
-  /**\r
-   * @deprecated this is not used anymore\r
-   */\r
-  public String getName() {\r
-    return "GWT Sample";\r
-  }\r
-\r
-  /**\r
-   * @deprecated this is not used anymore\r
-   */\r
-  public String getDescription() {\r
-    return "GWT Sample description";\r
-  }\r
-\r
-  public List getExtensions() {\r
-    return Arrays.asList(GwtSampleResourceTab.class, GwtSamplePage.class);\r
-  }\r
-\r
-  public String toString() {\r
-    return getKey();\r
-  }\r
-}\r
diff --git a/archetypes/sonar-gwt-plugin/project/src/main/java/org/sonar/plugins/gwtsample/page/GwtSamplePage.java b/archetypes/sonar-gwt-plugin/project/src/main/java/org/sonar/plugins/gwtsample/page/GwtSamplePage.java
deleted file mode 100644 (file)
index 1313737..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-package org.sonar.plugins.gwtsample.page;
-
-import org.sonar.api.web.GwtPage;
-import org.sonar.api.web.NavigationSection;
-import org.sonar.api.web.UserRole;
-
-@NavigationSection(NavigationSection.RESOURCE)
-@UserRole(UserRole.USER)
-public class GwtSamplePage extends GwtPage {
-
-  public String getGwtId() {
-    return "org.sonar.plugins.gwtsample.page.SamplePage";
-  }
-
-  public String getTitle() {
-    return "Sample";
-  }
-}
diff --git a/archetypes/sonar-gwt-plugin/project/src/main/java/org/sonar/plugins/gwtsample/page/SamplePage.gwt.xml b/archetypes/sonar-gwt-plugin/project/src/main/java/org/sonar/plugins/gwtsample/page/SamplePage.gwt.xml
deleted file mode 100644 (file)
index 5fcbdcd..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<module>
-
-  <inherits name='com.google.gwt.user.User'/>
-  <inherits name="com.google.gwt.json.JSON"/>
-  <inherits name="com.google.gwt.http.HTTP"/>
-  <inherits name="org.sonar.Sonar"/>
-
-  <entry-point class='org.sonar.plugins.gwtsample.page.client.SamplePage'/>
-
-  <extend-property name="locale" values="en"/>
-  <extend-property name="locale" values="fr"/>
-
-</module>
diff --git a/archetypes/sonar-gwt-plugin/project/src/main/java/org/sonar/plugins/gwtsample/page/client/I18nConstants.java b/archetypes/sonar-gwt-plugin/project/src/main/java/org/sonar/plugins/gwtsample/page/client/I18nConstants.java
deleted file mode 100644 (file)
index d4b3879..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-package org.sonar.plugins.gwtsample.page.client;
-
-import com.google.gwt.core.client.GWT;
-
-public interface I18nConstants extends com.google.gwt.i18n.client.Constants {
-
-  static I18nConstants INSTANCE = GWT.create(I18nConstants.class);
-
-  @DefaultStringValue("This is a sample")
-  String sample();
-}
diff --git a/archetypes/sonar-gwt-plugin/project/src/main/java/org/sonar/plugins/gwtsample/page/client/I18nConstants_fr.properties b/archetypes/sonar-gwt-plugin/project/src/main/java/org/sonar/plugins/gwtsample/page/client/I18nConstants_fr.properties
deleted file mode 100644 (file)
index aa92d17..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-# This file must use UTF-8 encoding
-sample=Ceci est un exemple
\ No newline at end of file
diff --git a/archetypes/sonar-gwt-plugin/project/src/main/java/org/sonar/plugins/gwtsample/page/client/SamplePage.java b/archetypes/sonar-gwt-plugin/project/src/main/java/org/sonar/plugins/gwtsample/page/client/SamplePage.java
deleted file mode 100644 (file)
index c7a2235..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-package org.sonar.plugins.gwtsample.page.client;
-
-import com.google.gwt.user.client.ui.Label;
-import com.google.gwt.user.client.ui.VerticalPanel;
-import com.google.gwt.user.client.ui.Widget;
-import org.sonar.gwt.ui.Page;
-import org.sonar.wsclient.services.Resource;
-
-public class SamplePage extends Page {
-
-  @Override
-  protected Widget doOnResourceLoad(Resource resource) {
-    VerticalPanel panel = new VerticalPanel();
-    panel.add(new Label(resource.getName(true)));
-    panel.add(new Label(I18nConstants.INSTANCE.sample()));
-    return panel;
-  }
-}
diff --git a/archetypes/sonar-gwt-plugin/project/src/main/java/org/sonar/plugins/gwtsample/page/public/test.html b/archetypes/sonar-gwt-plugin/project/src/main/java/org/sonar/plugins/gwtsample/page/public/test.html
deleted file mode 100644 (file)
index 04371e3..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-    "http://www.w3.org/TR/html4/loose.dtd">
-
-<html>
-<head>
-  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
-  <title>GWT Smaple</title>
-  <link href="http://localhost:9000/dev/stylesheets/yui-2.6.0.css" media="all" rel="Stylesheet" type="text/css" />
-  <link href="http://localhost:9000/dev/stylesheets/style.css" media="all" rel="Stylesheet" type="text/css" />
-  <script src="http://localhost:9000/dev/javascripts/application.js" type="text/javascript"></script>
-  <script src="http://localhost:9000/dev/javascripts/prototype.js" type="text/javascript"></script>
-  <script src="http://localhost:9000/dev/javascripts/scriptaculous.js" type="text/javascript"></script>
-</head>
-
-<body>
-<script type="text/javascript">
-var config = {
-  "sonar_url": "http://localhost:9000/dev",
-  "resource_key" : "org.codehaus.sonar:sonar",
-};
-</script>
-
-<div class="error" id="error" style="display:none"><span id="errormsg"></span> &nbsp;&nbsp;[<a href="#" onclick="javascript:$('error').hide();return false;">hide</a>]</div>
-<div class="warning" id="warning" style="display:none"><span id="warningmsg"></span> &nbsp;&nbsp;[<a href="#" onclick="javascript:$('warning').hide();return false;">hide</a>]</div>
-<div class="notice" id="info" style="display:none"><span id="infomsg"></span> &nbsp;&nbsp;[<a href="#" onclick="javascript:$('info').hide();return false;">hide</a>]</div>
-
-<div id="gwtpage">
-</div>
-
-<script type="text/javascript" language="javascript" src="org.sonar.plugins.gwtsample.page.GwtSamplePage.nocache.js"></script>
-</body>
-</html>
\ No newline at end of file
diff --git a/archetypes/sonar-gwt-plugin/project/src/main/java/org/sonar/plugins/gwtsample/resourcetab/GwtSampleResourceTab.java b/archetypes/sonar-gwt-plugin/project/src/main/java/org/sonar/plugins/gwtsample/resourcetab/GwtSampleResourceTab.java
deleted file mode 100644 (file)
index 34c84b8..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-package org.sonar.plugins.gwtsample.resourcetab;
-
-import org.sonar.api.web.GwtPage;
-import org.sonar.api.web.NavigationSection;
-import org.sonar.api.web.UserRole;
-
-@NavigationSection(NavigationSection.RESOURCE_TAB)
-@UserRole(UserRole.USER)
-public class GwtSampleResourceTab extends GwtPage {
-  public String getTitle() {
-    return "Sample";
-  }
-
-  public String getGwtId() {
-    return "org.sonar.plugins.gwtsample.resourcetab.SampleResourceTab";
-  }
-}
\ No newline at end of file
diff --git a/archetypes/sonar-gwt-plugin/project/src/main/java/org/sonar/plugins/gwtsample/resourcetab/SampleResourceTab.gwt.xml b/archetypes/sonar-gwt-plugin/project/src/main/java/org/sonar/plugins/gwtsample/resourcetab/SampleResourceTab.gwt.xml
deleted file mode 100644 (file)
index cf665cd..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-<module>
-
-  <inherits name='com.google.gwt.user.User'/>
-  <inherits name="com.google.gwt.json.JSON"/>
-  <inherits name="com.google.gwt.http.HTTP"/>
-  <inherits name="org.sonar.Sonar"/>
-
-  <entry-point class='org.sonar.plugins.gwtsample.resourcetab.client.SampleResourceTab'/>
-
-</module>
diff --git a/archetypes/sonar-gwt-plugin/project/src/main/java/org/sonar/plugins/gwtsample/resourcetab/client/SampleResourceTab.java b/archetypes/sonar-gwt-plugin/project/src/main/java/org/sonar/plugins/gwtsample/resourcetab/client/SampleResourceTab.java
deleted file mode 100644 (file)
index 9315b83..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-package org.sonar.plugins.gwtsample.resourcetab.client;
-
-import com.google.gwt.user.client.ui.Label;
-import com.google.gwt.user.client.ui.Widget;
-import org.sonar.gwt.ui.Page;
-import org.sonar.wsclient.services.Resource;
-
-public class SampleResourceTab extends Page {
-
-  @Override
-  protected Widget doOnResourceLoad(Resource resource) {
-    return new Label("This is a sample");
-  }
-}
\ No newline at end of file
diff --git a/archetypes/sonar-gwt-plugin/src/main/resources/META-INF/maven/archetype-metadata.xml b/archetypes/sonar-gwt-plugin/src/main/resources/META-INF/maven/archetype-metadata.xml
deleted file mode 100644 (file)
index f0aa4ec..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><archetype-descriptor name="sonar-gwt-plugin-archetype">
-  <fileSets>
-    <fileSet filtered="true" packaged="true" encoding="UTF-8">
-      <directory>src/main/java</directory>
-      <includes>
-        <include>**/*.xml</include>
-        <include>**/*.html</include>
-        <include>**/*.java</include>
-        <include>**/*.properties</include>
-      </includes>
-    </fileSet>
-  </fileSets>
-</archetype-descriptor>
\ No newline at end of file
diff --git a/archetypes/sonar-gwt-plugin/src/main/resources/META-INF/maven/archetype.xml b/archetypes/sonar-gwt-plugin/src/main/resources/META-INF/maven/archetype.xml
deleted file mode 100644 (file)
index e60be8b..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><archetype>
-  <id>sonar-gwt-plugin</id>
-  <sources>
-    <source>src/main/java/GwtSamplePlugin.java</source>
-    <source>src/main/java/page/client/I18nConstants.java</source>
-    <source>src/main/java/page/client/I18nConstants_fr.properties</source>
-    <source>src/main/java/page/client/SamplePage.java</source>
-    <source>src/main/java/page/GwtSamplePage.java</source>
-    <source>src/main/java/page/public/test.html</source>
-    <source>src/main/java/page/SamplePage.gwt.xml</source>
-    <source>src/main/java/resourcetab/client/SampleResourceTab.java</source>
-    <source>src/main/java/resourcetab/GwtSampleResourceTab.java</source>
-    <source>src/main/java/resourcetab/SampleResourceTab.gwt.xml</source>
-  </sources>
-</archetype>
\ No newline at end of file
diff --git a/archetypes/sonar-gwt-plugin/src/main/resources/archetype-resources/pom.xml b/archetypes/sonar-gwt-plugin/src/main/resources/archetype-resources/pom.xml
deleted file mode 100644 (file)
index cad5e84..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">\r
-  <modelVersion>4.0.0</modelVersion>\r
-\r
-  <groupId>$groupId</groupId>\r
-  <artifactId>$artifactId</artifactId>\r
-  <packaging>sonar-plugin</packaging>\r
-  <version>1.0-SNAPSHOT</version>\r
-  <name>My Sonar GWT plugin</name>\r
-  <description>GWT Sample description</description>\r
-\r
-  <!-- optional -->\r
-  <organization>\r
-    <name>My company</name>\r
-    <url>http://www.mycompany.com</url>\r
-  </organization>\r
-\r
-  <repositories>\r
-    <repository>\r
-      <!-- for gwt-incubator -->\r
-      <id>sonar</id>\r
-      <name>Sonar</name>\r
-      <url>http://repository.sonarsource.org/content/repositories/sonar</url>\r
-      <releases>\r
-      </releases>\r
-      <snapshots>\r
-        <enabled>false</enabled>\r
-      </snapshots>\r
-    </repository>\r
-  </repositories>\r
-\r
-  <dependencies>\r
-    <dependency>\r
-      <groupId>org.codehaus.sonar</groupId>\r
-      <artifactId>sonar-plugin-api</artifactId>\r
-      <version>${sonarTargetVersion}</version>\r
-    </dependency>\r
-    <dependency>\r
-      <groupId>org.codehaus.sonar</groupId>\r
-      <artifactId>sonar-gwt-api</artifactId>\r
-      <version>${sonarTargetVersion}</version>\r
-      <scope>provided</scope>\r
-    </dependency>\r
-    <dependency>\r
-      <groupId>com.google.gwt</groupId>\r
-      <artifactId>gwt-user</artifactId>\r
-      <version>2.0.3</version>\r
-      <scope>provided</scope>\r
-    </dependency>\r
-    <dependency>\r
-      <groupId>com.google.gwt</groupId>\r
-      <artifactId>gwt-incubator</artifactId>\r
-      <version>2.0.1</version>\r
-      <scope>provided</scope>\r
-    </dependency>\r
-\r
-    <!-- unit tests -->\r
-    <dependency>\r
-      <groupId>org.codehaus.sonar</groupId>\r
-      <artifactId>sonar-testing-harness</artifactId>\r
-      <version>${sonarTargetVersion}</version>\r
-      <scope>test</scope>\r
-    </dependency>\r
-    <dependency>\r
-      <groupId>junit</groupId>\r
-      <artifactId>junit</artifactId>\r
-      <version>4.7</version>\r
-      <scope>test</scope>\r
-    </dependency>\r
-  </dependencies>\r
-\r
-  <build>\r
-    <resources>\r
-      <resource>\r
-        <directory>src/main/java</directory>\r
-      </resource>\r
-    </resources>\r
-    <plugins>\r
-      <plugin>\r
-        <groupId>org.codehaus.sonar</groupId>\r
-        <artifactId>sonar-packaging-maven-plugin</artifactId>\r
-        <version>1.0</version>\r
-        <extensions>true</extensions>\r
-        <configuration>\r
-          <pluginClass>${package}.GwtSamplePlugin</pluginClass>\r
-        </configuration>\r
-      </plugin>\r
-      <plugin>\r
-        <groupId>org.codehaus.mojo</groupId>\r
-        <artifactId>gwt-maven-plugin</artifactId>\r
-        <version>1.2</version>\r
-        <executions>\r
-          <execution>\r
-            <configuration>\r
-              <modules>\r
-                <module>${package}.resourcetab.SampleResourceTab</module>\r
-                <module>${package}.page.SamplePage</module>\r
-              </modules>\r
-              <webappDirectory>target/classes</webappDirectory>\r
-              <!-- do not break the following property on two lines -->\r
-              <extraJvmArgs>-Xmx512m -Dgwt.jjs.permutationWorkerFactory=com.google.gwt.dev.ThreadedPermutationWorkerFactory</extraJvmArgs>\r
-            </configuration>\r
-            <goals>\r
-              <goal>compile</goal>\r
-            </goals>\r
-          </execution>\r
-        </executions>\r
-      </plugin>\r
-      <plugin>\r
-        <groupId>org.apache.maven.plugins</groupId>\r
-        <artifactId>maven-compiler-plugin</artifactId>\r
-        <version>2.0.2</version>\r
-        <configuration>\r
-          <source>1.5</source>\r
-          <target>1.5</target>\r
-          <encoding>UTF-8</encoding>\r
-        </configuration>\r
-      </plugin>\r
-    </plugins>\r
-  </build>\r
-</project>\r
diff --git a/archetypes/sonar-gwt-plugin/src/main/resources/archetype-resources/src/main/java/GwtSamplePlugin.java b/archetypes/sonar-gwt-plugin/src/main/resources/archetype-resources/src/main/java/GwtSamplePlugin.java
deleted file mode 100644 (file)
index deab27b..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-#set( $symbol_pound = '#' )\r
-#set( $symbol_dollar = '$' )\r
-#set( $symbol_escape = '\' )\r
-package ${package};\r
-\r
-import org.sonar.api.Plugin;\r
-import ${package}.page.GwtSamplePage;\r
-import ${package}.resourcetab.GwtSampleResourceTab;\r
-\r
-import java.util.Arrays;\r
-import java.util.List;\r
-\r
-public class GwtSamplePlugin implements Plugin {\r
-\r
-  /**\r
-   * @deprecated this is not used anymore\r
-   */\r
-  public String getKey() {\r
-    return "gwt-sample";\r
-  }\r
-\r
-  /**\r
-   * @deprecated this is not used anymore\r
-   */\r
-  public String getName() {\r
-    return "GWT Sample";\r
-  }\r
-\r
-  /**\r
-   * @deprecated this is not used anymore\r
-   */\r
-  public String getDescription() {\r
-    return "GWT Sample description";\r
-  }\r
-\r
-  public List getExtensions() {\r
-    return Arrays.asList(GwtSampleResourceTab.class, GwtSamplePage.class);\r
-  }\r
-\r
-  public String toString() {\r
-    return getKey();\r
-  }\r
-}\r
diff --git a/archetypes/sonar-gwt-plugin/src/main/resources/archetype-resources/src/main/java/page/GwtSamplePage.java b/archetypes/sonar-gwt-plugin/src/main/resources/archetype-resources/src/main/java/page/GwtSamplePage.java
deleted file mode 100644 (file)
index 3dea837..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-package ${package}.page;
-
-import org.sonar.api.web.GwtPage;
-import org.sonar.api.web.NavigationSection;
-import org.sonar.api.web.UserRole;
-
-@NavigationSection(NavigationSection.RESOURCE)
-@UserRole(UserRole.USER)
-public class GwtSamplePage extends GwtPage {
-
-  public String getGwtId() {
-    return "${package}.page.SamplePage";
-  }
-
-  public String getTitle() {
-    return "Sample";
-  }
-}
diff --git a/archetypes/sonar-gwt-plugin/src/main/resources/archetype-resources/src/main/java/page/SamplePage.gwt.xml b/archetypes/sonar-gwt-plugin/src/main/resources/archetype-resources/src/main/java/page/SamplePage.gwt.xml
deleted file mode 100644 (file)
index 89a0800..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-<module>
-
-  <inherits name='com.google.gwt.user.User'/>
-  <inherits name="com.google.gwt.json.JSON"/>
-  <inherits name="com.google.gwt.http.HTTP"/>
-  <inherits name="org.sonar.Sonar"/>
-
-  <entry-point class='${package}.page.client.SamplePage'/>
-
-  <extend-property name="locale" values="en"/>
-  <extend-property name="locale" values="fr"/>
-
-</module>
diff --git a/archetypes/sonar-gwt-plugin/src/main/resources/archetype-resources/src/main/java/page/client/I18nConstants.java b/archetypes/sonar-gwt-plugin/src/main/resources/archetype-resources/src/main/java/page/client/I18nConstants.java
deleted file mode 100644 (file)
index 1c34bd1..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-package ${package}.page.client;
-
-import com.google.gwt.core.client.GWT;
-
-public interface I18nConstants extends com.google.gwt.i18n.client.Constants {
-
-  static I18nConstants INSTANCE = GWT.create(I18nConstants.class);
-
-  @DefaultStringValue("This is a sample")
-  String sample();
-}
diff --git a/archetypes/sonar-gwt-plugin/src/main/resources/archetype-resources/src/main/java/page/client/I18nConstants_fr.properties b/archetypes/sonar-gwt-plugin/src/main/resources/archetype-resources/src/main/java/page/client/I18nConstants_fr.properties
deleted file mode 100644 (file)
index 89a9d6f..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-${symbol_pound} This file must use UTF-8 encoding
-sample=Ceci est un exemple
\ No newline at end of file
diff --git a/archetypes/sonar-gwt-plugin/src/main/resources/archetype-resources/src/main/java/page/client/SamplePage.java b/archetypes/sonar-gwt-plugin/src/main/resources/archetype-resources/src/main/java/page/client/SamplePage.java
deleted file mode 100644 (file)
index bb9b716..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-package ${package}.page.client;
-
-import com.google.gwt.user.client.ui.Label;
-import com.google.gwt.user.client.ui.VerticalPanel;
-import com.google.gwt.user.client.ui.Widget;
-import org.sonar.gwt.ui.Page;
-import org.sonar.wsclient.services.Resource;
-
-public class SamplePage extends Page {
-
-  @Override
-  protected Widget doOnResourceLoad(Resource resource) {
-    VerticalPanel panel = new VerticalPanel();
-    panel.add(new Label(resource.getName(true)));
-    panel.add(new Label(I18nConstants.INSTANCE.sample()));
-    return panel;
-  }
-}
diff --git a/archetypes/sonar-gwt-plugin/src/main/resources/archetype-resources/src/main/java/page/public/test.html b/archetypes/sonar-gwt-plugin/src/main/resources/archetype-resources/src/main/java/page/public/test.html
deleted file mode 100644 (file)
index 5d26e9a..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-    "http://www.w3.org/TR/html4/loose.dtd">
-
-<html>
-<head>
-  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
-  <title>GWT Smaple</title>
-  <link href="http://localhost:9000/dev/stylesheets/yui-2.6.0.css" media="all" rel="Stylesheet" type="text/css" />
-  <link href="http://localhost:9000/dev/stylesheets/style.css" media="all" rel="Stylesheet" type="text/css" />
-  <script src="http://localhost:9000/dev/javascripts/application.js" type="text/javascript"></script>
-  <script src="http://localhost:9000/dev/javascripts/prototype.js" type="text/javascript"></script>
-  <script src="http://localhost:9000/dev/javascripts/scriptaculous.js" type="text/javascript"></script>
-</head>
-
-<body>
-<script type="text/javascript">
-var config = {
-  "sonar_url": "http://localhost:9000/dev",
-  "resource_key" : "org.codehaus.sonar:sonar",
-};
-</script>
-
-<div class="error" id="error" style="display:none"><span id="errormsg"></span> &nbsp;&nbsp;[<a href="${symbol_pound}" onclick="javascript:${symbol_dollar}('error').hide();return false;">hide</a>]</div>
-<div class="warning" id="warning" style="display:none"><span id="warningmsg"></span> &nbsp;&nbsp;[<a href="${symbol_pound}" onclick="javascript:${symbol_dollar}('warning').hide();return false;">hide</a>]</div>
-<div class="notice" id="info" style="display:none"><span id="infomsg"></span> &nbsp;&nbsp;[<a href="${symbol_pound}" onclick="javascript:${symbol_dollar}('info').hide();return false;">hide</a>]</div>
-
-<div id="gwtpage">
-</div>
-
-<script type="text/javascript" language="javascript" src="${package}.page.GwtSamplePage.nocache.js"></script>
-</body>
-</html>
\ No newline at end of file
diff --git a/archetypes/sonar-gwt-plugin/src/main/resources/archetype-resources/src/main/java/resourcetab/GwtSampleResourceTab.java b/archetypes/sonar-gwt-plugin/src/main/resources/archetype-resources/src/main/java/resourcetab/GwtSampleResourceTab.java
deleted file mode 100644 (file)
index a5253b4..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-package ${package}.resourcetab;
-
-import org.sonar.api.web.GwtPage;
-import org.sonar.api.web.NavigationSection;
-import org.sonar.api.web.UserRole;
-
-@NavigationSection(NavigationSection.RESOURCE_TAB)
-@UserRole(UserRole.USER)
-public class GwtSampleResourceTab extends GwtPage {
-  public String getTitle() {
-    return "Sample";
-  }
-
-  public String getGwtId() {
-    return "${package}.resourcetab.SampleResourceTab";
-  }
-}
\ No newline at end of file
diff --git a/archetypes/sonar-gwt-plugin/src/main/resources/archetype-resources/src/main/java/resourcetab/SampleResourceTab.gwt.xml b/archetypes/sonar-gwt-plugin/src/main/resources/archetype-resources/src/main/java/resourcetab/SampleResourceTab.gwt.xml
deleted file mode 100644 (file)
index 079fb36..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-<module>
-
-  <inherits name='com.google.gwt.user.User'/>
-  <inherits name="com.google.gwt.json.JSON"/>
-  <inherits name="com.google.gwt.http.HTTP"/>
-  <inherits name="org.sonar.Sonar"/>
-
-  <entry-point class='${package}.resourcetab.client.SampleResourceTab'/>
-
-</module>
diff --git a/archetypes/sonar-gwt-plugin/src/main/resources/archetype-resources/src/main/java/resourcetab/client/SampleResourceTab.java b/archetypes/sonar-gwt-plugin/src/main/resources/archetype-resources/src/main/java/resourcetab/client/SampleResourceTab.java
deleted file mode 100644 (file)
index c75748d..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-package ${package}.resourcetab.client;
-
-import com.google.gwt.user.client.ui.Label;
-import com.google.gwt.user.client.ui.Widget;
-import org.sonar.gwt.ui.Page;
-import org.sonar.wsclient.services.Resource;
-
-public class SampleResourceTab extends Page {
-
-  @Override
-  protected Widget doOnResourceLoad(Resource resource) {
-    return new Label("This is a sample");
-  }
-}
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index bffcfc986bb219a86d02d0712fbd101feb5b1e7c..43fa0542cb4c2dc810c61b27c97d2d3e5b962d0e 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -12,8 +12,6 @@
 
   <modules>
     <!-- public artifacts to be deployed to central repository -->
-    <module>archetypes/sonar-basic-plugin</module>
-    <module>archetypes/sonar-gwt-plugin</module>
     <module>sonar-application</module>
     <module>sonar-batch</module>
     <module>sonar-batch-bootstrapper</module>
     </extensions>
 
     <pluginManagement>
-      <!-- Plugins ordered by shortname (archetype, assembly ...) -->
+      <!-- Plugins ordered by shortname (assembly, antrun ...) -->
       <plugins>
         <plugin>
           <groupId>org.codehaus.mojo</groupId>
           <artifactId>maven-antrun-plugin</artifactId>
           <version>1.6</version>
         </plugin>
-        <plugin>
-          <!-- not thread safe -->
-          <groupId>org.apache.maven.plugins</groupId>
-          <artifactId>maven-archetype-plugin</artifactId>
-          <version>2.0-alpha-4</version>
-        </plugin>
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-assembly-plugin</artifactId>
   </developers>
 
   <profiles>
-    <profile>
-      <id>all</id>
-      <activation>
-        <activeByDefault>true</activeByDefault>
-      </activation>
-      <modules>
-        <module>samples</module>
-      </modules>
-    </profile>
 
     <profile>
       <id>dev</id>
diff --git a/samples/README.txt b/samples/README.txt
deleted file mode 100644 (file)
index 82c059c..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-=== How to install a plugin
-
-1. Build plugin with Maven : mvn clean install
-2. Copy the JAR file generated into target/ to the directory extensions/plugins/ of the Sonar server 
-3. Restart the Sonar server
-
-
-=== How to activate Checkstyle extensions
-
-Install the plugin "checkstyle-extensions-plugin" then search for the rule "Methods count"  in the administration console of Quality profiles.
-
-
-=== How to activate PMD extensions
-
-Install the plugin "pmd-extensions-plugin" then search for the rules "MaximumMethodsCountCheck", "AvoidIfWithoutBrace" and "PreventUseOfEmptyClass"  in the administration console of Quality profiles.
\ No newline at end of file
diff --git a/samples/assembly.xml b/samples/assembly.xml
deleted file mode 100644 (file)
index 9508d3a..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<assembly>
-  <id>distribution</id>
-  <formats>
-    <format>zip</format>
-  </formats>
-  <includeBaseDirectory>true</includeBaseDirectory>
-
-  <fileSets>
-    <fileSet>
-      <directory>standard-plugin</directory>
-      <outputDirectory>standard-plugin</outputDirectory>
-      <includes>
-        <include>src/**/*</include>
-        <include>pom.xml</include>
-      </includes>
-    </fileSet>
-    <fileSet>
-      <directory>gwt-plugin</directory>
-      <outputDirectory>gwt-plugin</outputDirectory>
-      <includes>
-        <include>src/**/*</include>
-        <include>pom.xml</include>
-      </includes>
-    </fileSet>
-    <fileSet>
-      <directory>checkstyle-extensions-plugin</directory>
-      <outputDirectory>checkstyle-extensions-plugin</outputDirectory>
-      <includes>
-        <include>src/**/*</include>
-        <include>pom.xml</include>
-      </includes>
-    </fileSet>
-    <fileSet>
-      <directory>pmd-extensions-plugin</directory>
-      <outputDirectory>pmd-extensions-plugin</outputDirectory>
-      <includes>
-        <include>src/**/*</include>
-        <include>pom.xml</include>
-      </includes>
-    </fileSet>
-    <fileSet>
-      <directory>${project.basedir}</directory>
-      <outputDirectory>/</outputDirectory>
-      <includes>
-        <include>*.txt</include>
-      </includes>
-    </fileSet>
-  </fileSets>
-</assembly>
diff --git a/samples/checkstyle-extensions-plugin/pom.xml b/samples/checkstyle-extensions-plugin/pom.xml
deleted file mode 100644 (file)
index 74801b1..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-
-  <groupId>com.mycompany.sonar</groupId>
-  <artifactId>sonar-checkstyle-extensions-plugin</artifactId>
-  <packaging>sonar-plugin</packaging>
-  <version>0.1-SNAPSHOT</version>
-  <name>Sonar :: Samples :: Checkstyle extensions</name>
-  <description>Checkstyle extensions for Sonar</description>
-
-  <properties>
-    <sonar.buildVersion>2.8</sonar.buildVersion>
-  </properties>
-
-  <dependencies>
-    <dependency>
-      <groupId>org.codehaus.sonar</groupId>
-      <artifactId>sonar-plugin-api</artifactId>
-      <version>${sonar.buildVersion}</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>checkstyle</groupId>
-      <artifactId>checkstyle</artifactId>
-      <version>5.1</version>
-      <scope>provided</scope>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.codehaus.sonar</groupId>
-        <artifactId>sonar-packaging-maven-plugin</artifactId>
-        <version>1.1</version>
-        <extensions>true</extensions>
-        <configuration>
-          <pluginClass>com.mycompany.sonar.checkstyle.CheckstyleExtensionsPlugin</pluginClass>
-          <basePlugin>checkstyle</basePlugin>
-        </configuration>
-      </plugin>
-
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <version>2.3.2</version>
-        <configuration>
-          <source>1.5</source>
-          <target>1.5</target>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-
-  <repositories>
-    <repository>
-      <!-- for checkstyle 5.1-->
-      <id>sonarsource</id>
-      <name>SonarSource</name>
-      <url>http://repository.sonarsource.org/content/repositories/sonar</url>
-      <releases>
-        <enabled>true</enabled>
-      </releases>
-      <snapshots>
-        <enabled>false</enabled>
-      </snapshots>
-    </repository>
-  </repositories>
-</project>
\ No newline at end of file
diff --git a/samples/checkstyle-extensions-plugin/src/main/java/com/mycompany/sonar/checkstyle/CheckstyleExtensionRepository.java b/samples/checkstyle-extensions-plugin/src/main/java/com/mycompany/sonar/checkstyle/CheckstyleExtensionRepository.java
deleted file mode 100644 (file)
index 5132959..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-package com.mycompany.sonar.checkstyle;
-
-import org.apache.commons.io.IOUtils;
-import org.sonar.api.resources.Java;
-import org.sonar.api.rules.Rule;
-import org.sonar.api.rules.RuleRepository;
-import org.sonar.api.rules.XMLRuleParser;
-
-import java.io.InputStream;
-import java.util.List;
-
-public class CheckstyleExtensionRepository extends RuleRepository {
-
-  // Must be the same than the Checkstyle plugin
-  private static final String REPOSITORY_KEY = "checkstyle";
-  private XMLRuleParser ruleParser;
-
-  public CheckstyleExtensionRepository(XMLRuleParser ruleParser) {
-    super(REPOSITORY_KEY, Java.KEY);
-    this.ruleParser = ruleParser;
-  }
-
-  @Override
-  public List<Rule> createRules() {
-    // In this example, new rules are declared in a XML file
-    InputStream input = getClass().getResourceAsStream("/com/mycompany/sonar/checkstyle/extensions.xml");
-    try {
-      return ruleParser.parse(input);
-      
-    } finally {
-      IOUtils.closeQuietly(input);
-    }
-  }
-
-}
diff --git a/samples/checkstyle-extensions-plugin/src/main/java/com/mycompany/sonar/checkstyle/CheckstyleExtensionsPlugin.java b/samples/checkstyle-extensions-plugin/src/main/java/com/mycompany/sonar/checkstyle/CheckstyleExtensionsPlugin.java
deleted file mode 100644 (file)
index 4441388..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-package com.mycompany.sonar.checkstyle;
-
-import org.sonar.api.SonarPlugin;
-
-import java.util.Arrays;
-import java.util.List;
-
-public class CheckstyleExtensionsPlugin extends SonarPlugin {
-  
-  public List getExtensions() {
-    return Arrays.asList(CheckstyleExtensionRepository.class);
-  }
-  
-}
diff --git a/samples/checkstyle-extensions-plugin/src/main/java/com/mycompany/sonar/checkstyle/MethodsCountCheck.java b/samples/checkstyle-extensions-plugin/src/main/java/com/mycompany/sonar/checkstyle/MethodsCountCheck.java
deleted file mode 100644 (file)
index dcfa124..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-package com.mycompany.sonar.checkstyle;
-
-import com.puppycrawl.tools.checkstyle.api.Check;
-import com.puppycrawl.tools.checkstyle.api.DetailAST;
-import com.puppycrawl.tools.checkstyle.api.TokenTypes;
-
-public class MethodsCountCheck extends Check {
-
-  private int minMethodsCount = 1;
-  
-  private int methodsCount = 0;
-  private DetailAST classAST = null;
-  
-  public void setMinMethodsCount(int minMethodsCount) {
-    this.minMethodsCount = minMethodsCount;
-  }
-  
-  public int[] getDefaultTokens() {
-    return new int[]{TokenTypes.CLASS_DEF, TokenTypes.METHOD_DEF};
-  }
-  
-  public void beginTree(DetailAST rootAST) {
-    methodsCount = 0;
-    classAST = null;
-  }
-  
-  public void visitToken(DetailAST ast) {
-    //ensure this is an unit test.
-    if ( ast.getType() == TokenTypes.CLASS_DEF ) {
-      classAST = ast;
-      
-    } else if ( ast.getType() == TokenTypes.METHOD_DEF ) {
-      methodsCount++;
-    }
-  }
-
-  public void finishTree(DetailAST rootAST) {
-    super.finishTree(rootAST);
-    if (classAST != null && methodsCount < minMethodsCount) {
-        log(classAST.getLineNo(), classAST.getColumnNo(), "Too few methods (" + methodsCount + ") in class" );
-    }
-  }
-}
diff --git a/samples/checkstyle-extensions-plugin/src/main/resources/com/mycompany/sonar/checkstyle/extensions.xml b/samples/checkstyle-extensions-plugin/src/main/resources/com/mycompany/sonar/checkstyle/extensions.xml
deleted file mode 100644 (file)
index c5d0a70..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<rules>
-  <rule>
-    <key>com.mycompany.sonar.checkstyle.MethodsCountCheck</key>
-    <name>Methods Count</name>
-    <configKey>Checker/TreeWalker/com.mycompany.sonar.checkstyle.MethodsCountCheck</configKey>
-    <description>Count methods</description>
-    <param>
-      <key>minMethodsCount</key>
-      <description>Mimimun threshold</description>
-      <defaultValue>10</defaultValue>
-    </param>
-  </rule>
- </rules>
\ No newline at end of file
diff --git a/samples/gwt-plugin/pom.xml b/samples/gwt-plugin/pom.xml
deleted file mode 100644 (file)
index 5882e57..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-
-  <groupId>com.mycompany.sonar</groupId>
-  <artifactId>sonar-gwt-plugin</artifactId>
-  <packaging>sonar-plugin</packaging>
-  <version>0.1-SNAPSHOT</version>
-  <name>Sonar :: Samples :: GWT plugin</name>
-  <description>Description of plugin with GWT extensions</description>
-
-  <properties>
-    <sonar.buildVersion>2.8</sonar.buildVersion>
-  </properties>
-
-  <dependencies>
-    <dependency>
-      <groupId>org.codehaus.sonar</groupId>
-      <artifactId>sonar-plugin-api</artifactId>
-      <version>${sonar.buildVersion}</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.codehaus.sonar</groupId>
-      <artifactId>sonar-gwt-api</artifactId>
-      <version>${sonar.buildVersion}</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>com.google.gwt</groupId>
-      <artifactId>gwt-user</artifactId>
-      <version>2.0.3</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>com.google.gwt</groupId>
-      <artifactId>gwt-incubator</artifactId>
-      <version>2.0.1</version>
-      <scope>provided</scope>
-    </dependency>
-
-    <!-- unit tests -->
-    <dependency>
-      <groupId>org.codehaus.sonar</groupId>
-      <artifactId>sonar-testing-harness</artifactId>
-      <version>${sonar.buildVersion}</version>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>4.8.2</version>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.codehaus.sonar</groupId>
-        <artifactId>sonar-packaging-maven-plugin</artifactId>
-        <version>1.1</version>
-        <extensions>true</extensions>
-        <configuration>
-          <pluginClass>com.mycompany.sonar.gwt.GwtPlugin</pluginClass>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>gwt-maven-plugin</artifactId>
-        <version>1.2</version>
-        <executions>
-          <execution>
-            <configuration>
-              <modules>
-                <module>com.mycompany.sonar.gwt.viewer.SampleViewer</module>
-                <module>com.mycompany.sonar.gwt.page.SamplePage</module>
-              </modules>
-              <webappDirectory>${project.build.directory}/classes</webappDirectory>
-              <extraJvmArgs>-Xmx512m</extraJvmArgs>
-            </configuration>
-            <goals>
-              <goal>compile</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <version>2.0.2</version>
-        <configuration>
-          <source>1.5</source>
-          <target>1.5</target>
-          <encoding>UTF-8</encoding>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-</project>
diff --git a/samples/gwt-plugin/src/main/java/com/mycompany/sonar/gwt/GwtPlugin.java b/samples/gwt-plugin/src/main/java/com/mycompany/sonar/gwt/GwtPlugin.java
deleted file mode 100644 (file)
index 40d78ca..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-package com.mycompany.sonar.gwt;
-
-import com.mycompany.sonar.gwt.page.SamplePage;
-import com.mycompany.sonar.gwt.viewer.SampleViewer;
-import org.sonar.api.SonarPlugin;
-
-import java.util.Arrays;
-import java.util.List;
-
-public final class GwtPlugin extends SonarPlugin {
-
-  public List getExtensions() {
-    return Arrays.asList(SampleViewer.class, SamplePage.class);
-  }
-
-  public String toString() {
-    return getKey();
-  }
-}
\ No newline at end of file
diff --git a/samples/gwt-plugin/src/main/java/com/mycompany/sonar/gwt/page/SamplePage.java b/samples/gwt-plugin/src/main/java/com/mycompany/sonar/gwt/page/SamplePage.java
deleted file mode 100644 (file)
index dc2dd74..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-package com.mycompany.sonar.gwt.page;
-
-import org.sonar.api.web.GwtPage;
-import org.sonar.api.web.NavigationSection;
-import org.sonar.api.web.UserRole;
-
-@NavigationSection(NavigationSection.RESOURCE)
-@UserRole(UserRole.USER)
-public class SamplePage extends GwtPage {
-
-  public String getGwtId() {
-    return "com.mycompany.sonar.gwt.page.SamplePage";
-  }
-
-  public String getTitle() {
-    return "Sample";
-  }
-}
diff --git a/samples/gwt-plugin/src/main/java/com/mycompany/sonar/gwt/page/client/I18nConstants.java b/samples/gwt-plugin/src/main/java/com/mycompany/sonar/gwt/page/client/I18nConstants.java
deleted file mode 100644 (file)
index 4dde01e..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-package com.mycompany.sonar.gwt.page.client;
-
-import com.google.gwt.core.client.GWT;
-
-public interface I18nConstants extends com.google.gwt.i18n.client.Constants {
-
-  static I18nConstants INSTANCE = GWT.create(I18nConstants.class);
-
-  @DefaultStringValue("This is a sample")
-  String sample();
-}
diff --git a/samples/gwt-plugin/src/main/java/com/mycompany/sonar/gwt/page/client/SamplePagePanel.java b/samples/gwt-plugin/src/main/java/com/mycompany/sonar/gwt/page/client/SamplePagePanel.java
deleted file mode 100644 (file)
index c0d16ed..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-package com.mycompany.sonar.gwt.page.client;
-
-import com.google.gwt.user.client.ui.Label;
-import com.google.gwt.user.client.ui.VerticalPanel;
-import com.google.gwt.user.client.ui.Widget;
-import org.sonar.gwt.ui.Page;
-import org.sonar.wsclient.services.Resource;
-
-public class SamplePagePanel extends Page {
-
-  @Override
-  protected Widget doOnResourceLoad(Resource resource) {
-    VerticalPanel panel = new VerticalPanel();
-    panel.add(new Label(resource.getName(true)));
-    panel.add(new Label(I18nConstants.INSTANCE.sample()));
-    return panel;
-  }
-}
diff --git a/samples/gwt-plugin/src/main/java/com/mycompany/sonar/gwt/viewer/SampleViewer.java b/samples/gwt-plugin/src/main/java/com/mycompany/sonar/gwt/viewer/SampleViewer.java
deleted file mode 100644 (file)
index 53ca2a4..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.mycompany.sonar.gwt.viewer;
-
-import org.sonar.api.web.GwtPage;
-import org.sonar.api.web.NavigationSection;
-import org.sonar.api.web.UserRole;
-
-@NavigationSection(NavigationSection.RESOURCE_TAB)
-@UserRole(UserRole.USER)
-public class SampleViewer extends GwtPage {
-  public String getTitle() {
-    return "Sample";
-  }
-
-  public String getGwtId() {
-    return "com.mycompany.sonar.gwt.viewer.SampleViewer";
-  }
-}
\ No newline at end of file
diff --git a/samples/gwt-plugin/src/main/java/com/mycompany/sonar/gwt/viewer/client/SampleViewerPanel.java b/samples/gwt-plugin/src/main/java/com/mycompany/sonar/gwt/viewer/client/SampleViewerPanel.java
deleted file mode 100644 (file)
index 823dae7..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-package com.mycompany.sonar.gwt.viewer.client;
-
-import com.google.gwt.user.client.ui.Label;
-import com.google.gwt.user.client.ui.Widget;
-import org.sonar.gwt.ui.Page;
-import org.sonar.wsclient.gwt.AbstractCallback;
-import org.sonar.wsclient.gwt.Sonar;
-import org.sonar.wsclient.services.Measure;
-import org.sonar.wsclient.services.Resource;
-import org.sonar.wsclient.services.ResourceQuery;
-
-public class SampleViewerPanel extends Page {
-
-  private Label label;
-
-  @Override
-  protected Widget doOnResourceLoad(Resource resource) {
-    label = new Label("Loading value");
-    loadMeasureFromServer(resource);
-    return label;
-  }
-
-  // Ajax call to web service
-  private void loadMeasureFromServer(Resource resource) {
-    ResourceQuery query = ResourceQuery.createForResource(resource, "random");
-    Sonar.getInstance().find(query, new AbstractCallback<Resource>() {
-      @Override
-      protected void doOnResponse(Resource result) {
-        Measure measure = result.getMeasure("random");
-        if (measure==null || measure.getValue()==null) {
-          label.setText("No random value");
-        } else {
-          label.setText("Random value inserted during analysis: " + measure.getValue());
-        }
-      }
-    });
-  }
-}
\ No newline at end of file
diff --git a/samples/gwt-plugin/src/main/resources/com/mycompany/sonar/gwt/page/SamplePage.gwt.xml b/samples/gwt-plugin/src/main/resources/com/mycompany/sonar/gwt/page/SamplePage.gwt.xml
deleted file mode 100644 (file)
index 8f95c2e..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<module>
-
-  <inherits name='com.google.gwt.user.User'/>
-  <inherits name="com.google.gwt.json.JSON"/>
-  <inherits name="com.google.gwt.http.HTTP"/>
-  <inherits name="org.sonar.Sonar"/>
-
-  <entry-point class='com.mycompany.sonar.gwt.page.client.SamplePagePanel'/>
-
-  <extend-property name="locale" values="en"/>
-  <extend-property name="locale" values="fr"/>
-
-</module>
diff --git a/samples/gwt-plugin/src/main/resources/com/mycompany/sonar/gwt/page/client/I18nConstants_fr.properties b/samples/gwt-plugin/src/main/resources/com/mycompany/sonar/gwt/page/client/I18nConstants_fr.properties
deleted file mode 100644 (file)
index aa92d17..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-# This file must use UTF-8 encoding
-sample=Ceci est un exemple
\ No newline at end of file
diff --git a/samples/gwt-plugin/src/main/resources/com/mycompany/sonar/gwt/page/public/test.html b/samples/gwt-plugin/src/main/resources/com/mycompany/sonar/gwt/page/public/test.html
deleted file mode 100644 (file)
index 04371e3..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-    "http://www.w3.org/TR/html4/loose.dtd">
-
-<html>
-<head>
-  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
-  <title>GWT Smaple</title>
-  <link href="http://localhost:9000/dev/stylesheets/yui-2.6.0.css" media="all" rel="Stylesheet" type="text/css" />
-  <link href="http://localhost:9000/dev/stylesheets/style.css" media="all" rel="Stylesheet" type="text/css" />
-  <script src="http://localhost:9000/dev/javascripts/application.js" type="text/javascript"></script>
-  <script src="http://localhost:9000/dev/javascripts/prototype.js" type="text/javascript"></script>
-  <script src="http://localhost:9000/dev/javascripts/scriptaculous.js" type="text/javascript"></script>
-</head>
-
-<body>
-<script type="text/javascript">
-var config = {
-  "sonar_url": "http://localhost:9000/dev",
-  "resource_key" : "org.codehaus.sonar:sonar",
-};
-</script>
-
-<div class="error" id="error" style="display:none"><span id="errormsg"></span> &nbsp;&nbsp;[<a href="#" onclick="javascript:$('error').hide();return false;">hide</a>]</div>
-<div class="warning" id="warning" style="display:none"><span id="warningmsg"></span> &nbsp;&nbsp;[<a href="#" onclick="javascript:$('warning').hide();return false;">hide</a>]</div>
-<div class="notice" id="info" style="display:none"><span id="infomsg"></span> &nbsp;&nbsp;[<a href="#" onclick="javascript:$('info').hide();return false;">hide</a>]</div>
-
-<div id="gwtpage">
-</div>
-
-<script type="text/javascript" language="javascript" src="org.sonar.plugins.gwtsample.page.GwtSamplePage.nocache.js"></script>
-</body>
-</html>
\ No newline at end of file
diff --git a/samples/gwt-plugin/src/main/resources/com/mycompany/sonar/gwt/viewer/SampleViewer.gwt.xml b/samples/gwt-plugin/src/main/resources/com/mycompany/sonar/gwt/viewer/SampleViewer.gwt.xml
deleted file mode 100644 (file)
index af900e8..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-<module>
-
-  <inherits name='com.google.gwt.user.User'/>
-  <inherits name="com.google.gwt.json.JSON"/>
-  <inherits name="com.google.gwt.http.HTTP"/>
-  <inherits name="org.sonar.Sonar"/>
-
-  <entry-point class='com.mycompany.sonar.gwt.viewer.client.SampleViewerPanel'/>
-
-</module>
diff --git a/samples/pmd-extensions-plugin/pom.xml b/samples/pmd-extensions-plugin/pom.xml
deleted file mode 100644 (file)
index c773e7d..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-
-  <groupId>com.mycompany.sonar</groupId>
-  <artifactId>sonar-pmd-extensions-plugin</artifactId>
-  <packaging>sonar-plugin</packaging>
-  <version>0.1-SNAPSHOT</version>
-  <name>Sonar :: Samples :: PMD extensions</name>
-  <description>PMD extensions for Sonar</description>
-
-  <properties>
-    <sonar.buildVersion>2.8</sonar.buildVersion>
-  </properties>
-
-  <dependencies>
-    <dependency>
-      <groupId>org.codehaus.sonar</groupId>
-      <artifactId>sonar-plugin-api</artifactId>
-      <version>${sonar.buildVersion}</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>pmd</groupId>
-      <artifactId>pmd</artifactId>
-      <version>4.2.5</version>
-      <scope>provided</scope>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.codehaus.sonar</groupId>
-        <artifactId>sonar-packaging-maven-plugin</artifactId>
-        <version>1.1</version>
-        <extensions>true</extensions>
-        <configuration>
-          <pluginClass>com.mycompany.sonar.pmd.PmdExtensionsPlugin</pluginClass>
-
-          <!-- This is important. It means that this plugin extends the PMD plugin -->
-          <basePlugin>pmd</basePlugin>
-        </configuration>
-      </plugin>
-
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <version>2.3.2</version>
-        <configuration>
-          <source>1.5</source>
-          <target>1.5</target>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-</project>
\ No newline at end of file
diff --git a/samples/pmd-extensions-plugin/src/main/java/com/mycompany/sonar/pmd/MaximumMethodsCountCheck.java b/samples/pmd-extensions-plugin/src/main/java/com/mycompany/sonar/pmd/MaximumMethodsCountCheck.java
deleted file mode 100644 (file)
index 90e9b1c..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-package com.mycompany.sonar.pmd;
-
-import java.util.ArrayList;
-import java.util.List;
-import net.sourceforge.pmd.AbstractRule;
-import net.sourceforge.pmd.ast.ASTClassOrInterfaceBody;
-import net.sourceforge.pmd.ast.ASTMethodDeclaration;
-import net.sourceforge.pmd.properties.IntegerProperty;
-
-public class MaximumMethodsCountCheck extends AbstractRule {
-  
-  private static final IntegerProperty propertyDescriptor = new IntegerProperty(
-          "maxAuthorisedMethodsCount", "Maximum number of methods authorised", 2, 1.0f); 
-  
-  public Object visit(ASTClassOrInterfaceBody node, Object data) {
-      List<ASTMethodDeclaration> methods = new ArrayList<ASTMethodDeclaration>();
-      methods = (List<ASTMethodDeclaration>)node.findChildrenOfType(ASTMethodDeclaration.class);
-      
-      if (methods.size() > getIntProperty(propertyDescriptor)) {
-          addViolation(data, node);
-      }
-      return super.visit(node,data);
-  }  
-
-}
diff --git a/samples/pmd-extensions-plugin/src/main/java/com/mycompany/sonar/pmd/PmdExtensionRepository.java b/samples/pmd-extensions-plugin/src/main/java/com/mycompany/sonar/pmd/PmdExtensionRepository.java
deleted file mode 100644 (file)
index 2ad40ac..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-package com.mycompany.sonar.pmd;
-
-import org.apache.commons.io.IOUtils;
-import org.sonar.api.resources.Java;
-import org.sonar.api.rules.Rule;
-import org.sonar.api.rules.RuleRepository;
-import org.sonar.api.rules.XMLRuleParser;
-
-import java.io.InputStream;
-import java.util.List;
-
-public class PmdExtensionRepository extends RuleRepository {
-
-  // Must be the same than the PMD plugin
-  private static final String REPOSITORY_KEY = "pmd";
-  private XMLRuleParser ruleParser;
-
-  public PmdExtensionRepository(XMLRuleParser ruleParser) {
-    super(REPOSITORY_KEY, Java.KEY);
-    this.ruleParser = ruleParser;
-  }
-
-  @Override
-  public List<Rule> createRules() {
-    // In this example, new rules are declared in a XML file
-    InputStream input = getClass().getResourceAsStream("/com/mycompany/sonar/pmd/extensions.xml");
-    try {
-      return ruleParser.parse(input);
-      
-    } finally {
-      IOUtils.closeQuietly(input);
-    }
-  }
-
-}
diff --git a/samples/pmd-extensions-plugin/src/main/java/com/mycompany/sonar/pmd/PmdExtensionsPlugin.java b/samples/pmd-extensions-plugin/src/main/java/com/mycompany/sonar/pmd/PmdExtensionsPlugin.java
deleted file mode 100644 (file)
index 646cd12..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-package com.mycompany.sonar.pmd;
-
-import org.sonar.api.SonarPlugin;
-
-import java.util.Arrays;
-import java.util.List;
-
-public class PmdExtensionsPlugin extends SonarPlugin {
-  
-  public List getExtensions() {
-    return Arrays.asList(PmdExtensionRepository.class);
-  }
-  
-}
diff --git a/samples/pmd-extensions-plugin/src/main/resources/com/mycompany/sonar/pmd/extensions.xml b/samples/pmd-extensions-plugin/src/main/resources/com/mycompany/sonar/pmd/extensions.xml
deleted file mode 100644 (file)
index 808974b..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-<rules>
-  <!-- Extension written in Java -->
-  <rule>
-    <key>MaximumMethodsCountCheck</key>
-    <name>Maximum Methods Count Check</name>
-    <description>Maximum number of methods authorised</description>
-
-    <!-- path to definition -->
-    <configKey>com/mycompany/sonar/pmd/rulesets.xml/MaximumMethodsCountCheck</configKey>
-
-    <!-- Default priority ("severity"). It can be changed while activating the rule in Quality profile -->
-    <!-- Possible values are: INFO, MINOR, MAJOR, CRITICAL, BLOCKER. Default value is MAJOR -->
-    <!--<priority>MAJOR</priority>-->
-
-    <!-- parameters available in administration console of Quality profiles -->
-    <param>
-      <key>maxAuthorisedMethodsCount</key>
-      <description>Maximum number of methods authorised</description>
-
-      <!-- default value is optional -->
-      <defaultValue>2</defaultValue>
-    </param>
-  </rule>
-
-
-  <!-- Extension written in XPath, first solution -->
-  <rule>
-    <key>AvoidIfWithoutBrace</key>
-    <name>Avoid if without using brace</name>
-    <configKey>com/mycompany/sonar/pmd/rulesets.xml/AvoidIfWithoutBrace</configKey>
-    <priority>CRITICAL</priority>
-  </rule>
-
-
-  <!--
-    Extension written in XPath, second solution.
-    Difference is that the XPath expression can be configured by users from administration console of Quality profiles
-   -->
-  <rule>
-    <key>PreventUseOfEmptyClass</key>
-    <priority>MAJOR</priority>
-    <name><![CDATA[Prevent use of EmptyClass]]></name>
-    <configKey><![CDATA[net.sourceforge.pmd.rules.XPathRule]]></configKey>
-    <priority>MINOR</priority>
-    <param>
-      <key>xpath</key>
-      <description><![CDATA[XPath expressions.]]></description>
-      <defaultValue>//VariableDeclarator[../Type/ReferenceType/ClassOrInterfaceType[@Image='EmptyClass']]</defaultValue>
-    </param>
-    <param>
-      <key>message</key>
-      <description><![CDATA[Message to display when a violation occurs.]]></description>
-      <defaultValue>Prevent use of EmptyClass class</defaultValue>
-    </param>
-  </rule>
-</rules>
\ No newline at end of file
diff --git a/samples/pmd-extensions-plugin/src/main/resources/com/mycompany/sonar/pmd/rulesets.xml b/samples/pmd-extensions-plugin/src/main/resources/com/mycompany/sonar/pmd/rulesets.xml
deleted file mode 100644 (file)
index 6922cd6..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0"?>
-<ruleset name="PMD extensions"
-         xmlns="http://pmd.sf.net/ruleset/1.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
-         xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
-
-  <rule name="MaximumMethodsCountCheck"
-        message="Avoid too many methods"
-        class="com.mycompany.sonar.pmd.MaximumMethodsCountCheck">
-    <description>
-      Avoid too many methods
-    </description>
-    <priority>3</priority>
-    <properties>
-      <property name="maxAuthorisedMethodsCount" description="Maximum number of methods authorised" value="3"/>
-    </properties>
-    <example>
-      <![CDATA[
-          // too many methods!
-            public void doSomething() {}
-            public void doSomething2() {}      
-            public void doSomething3() {}
-            public void doSomething4() {}             
-            
-        ]]>
-    </example>
-  </rule>
-  
-  <rule name="AvoidIfWithoutBrace"
-        message="Avoid if without using brace"
-        class="net.sourceforge.pmd.rules.XPathRule">
-    <description>
-      Avoid if without using brace
-    </description>
-    <properties>
-      <property name="xpath">
-        <value>
-          <![CDATA[
-            //IfStatement[not(Statement/Block)]
-        ]]>
-        </value>
-      </property>
-    </properties>
-    <example>
-      <![CDATA[
-       // don't do this!
-       if (true)
-        test = "test";
-      ]]>
-    </example>
-  </rule>
-</ruleset>
\ No newline at end of file
diff --git a/samples/pom.xml b/samples/pom.xml
deleted file mode 100644 (file)
index 34fb225..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <parent>
-    <groupId>org.codehaus.sonar</groupId>
-    <artifactId>sonar</artifactId>
-    <version>2.12-SNAPSHOT</version>
-    <relativePath>..</relativePath>
-  </parent>
-  <groupId>org.codehaus.sonar.samples</groupId>
-  <artifactId>sonar-samples</artifactId>
-  <packaging>pom</packaging>
-  <name>Sonar :: Samples</name>
-
-  <modules>
-    <module>standard-plugin</module>
-    <module>gwt-plugin</module>
-    <module>checkstyle-extensions-plugin</module>
-    <module>pmd-extensions-plugin</module>
-  </modules>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-deploy-plugin</artifactId>
-        <configuration>
-          <skip>true</skip>
-        </configuration>
-      </plugin>
-      <plugin>
-        <artifactId>maven-assembly-plugin</artifactId>
-        <executions>
-          <execution>
-            <phase>package</phase>
-            <goals>
-              <goal>single</goal>
-            </goals>
-            <configuration>
-              <appendAssemblyId>false</appendAssemblyId>
-              <finalName>sonar-samples-${project.version}</finalName>
-              <descriptors>
-                <descriptor>assembly.xml</descriptor>
-              </descriptors>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-    </plugins>
-  </build>
-</project>
diff --git a/samples/standard-plugin/pom.xml b/samples/standard-plugin/pom.xml
deleted file mode 100644 (file)
index 65cf931..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-
-  <groupId>com.mycompany.sonar</groupId>
-  <artifactId>sonar-standard-plugin</artifactId>
-  <packaging>sonar-plugin</packaging>
-  <version>0.1-SNAPSHOT</version>
-  <name>Sonar :: Samples :: Standard plugin</name>
-  <description>Description of standard plugin</description>
-
-  <properties>
-    <sonar.buildVersion>2.8</sonar.buildVersion>
-  </properties>
-
-  <dependencies>
-    <dependency>
-      <groupId>org.codehaus.sonar</groupId>
-      <artifactId>sonar-plugin-api</artifactId>
-      <version>${sonar.buildVersion}</version>
-      <scope>provided</scope>
-    </dependency>
-
-    <!-- unit tests -->
-    <dependency>
-      <groupId>org.codehaus.sonar</groupId>
-      <artifactId>sonar-testing-harness</artifactId>
-      <version>${sonar.buildVersion}</version>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.codehaus.sonar</groupId>
-        <artifactId>sonar-packaging-maven-plugin</artifactId>
-        <version>1.1</version>
-        <extensions>true</extensions>
-        <configuration>
-          <pluginClass>com.mycompany.sonar.standard.SamplePlugin</pluginClass>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <version>2.0.2</version>
-        <configuration>
-          <source>1.5</source>
-          <target>1.5</target>
-          <encoding>UTF-8</encoding>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-</project>
diff --git a/samples/standard-plugin/src/main/java/com/mycompany/sonar/standard/SampleMetrics.java b/samples/standard-plugin/src/main/java/com/mycompany/sonar/standard/SampleMetrics.java
deleted file mode 100644 (file)
index 6d493bc..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-package com.mycompany.sonar.standard;
-
-import org.sonar.api.measures.CoreMetrics;
-import org.sonar.api.measures.Metric;
-import org.sonar.api.measures.Metrics;
-
-import java.util.Arrays;
-import java.util.List;
-
-public final class SampleMetrics implements Metrics {
-
-  public static final Metric MESSAGE = new Metric.Builder("message_key", "Message", Metric.ValueType.STRING)
-      .setDescription("This is a metric to store a well known message")
-      .setDirection(Metric.DIRECTION_WORST)
-      .setQualitative(false)
-      .setDomain(CoreMetrics.DOMAIN_GENERAL)
-      .create();
-
-  public static final Metric RANDOM = new Metric.Builder("random", "Random", Metric.ValueType.FLOAT)
-      .setDescription("Random value")
-      .setDirection(Metric.DIRECTION_BETTER)
-      .setQualitative(false)
-      .setDomain(CoreMetrics.DOMAIN_GENERAL)
-      .create();
-
-  // getMetrics() method is defined in the Metrics interface and is used by
-  // Sonar to retrieve the list of new Metric
-  public List<Metric> getMetrics() {
-    return Arrays.asList(MESSAGE, RANDOM);
-  }
-}
diff --git a/samples/standard-plugin/src/main/java/com/mycompany/sonar/standard/SamplePlugin.java b/samples/standard-plugin/src/main/java/com/mycompany/sonar/standard/SamplePlugin.java
deleted file mode 100644 (file)
index 7622e03..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-package com.mycompany.sonar.standard;
-
-import com.mycompany.sonar.standard.batch.RandomDecorator;
-import com.mycompany.sonar.standard.batch.SampleSensor;
-import com.mycompany.sonar.standard.ui.SampleFooter;
-import com.mycompany.sonar.standard.ui.SampleRubyWidget;
-import org.sonar.api.SonarPlugin;
-
-import java.util.Arrays;
-import java.util.List;
-
-/**
- * This class is the entry point for all extensions
- */
-public final class SamplePlugin extends SonarPlugin {
-
-  // This is where you're going to declare all your Sonar extensions
-  public List getExtensions() {
-    return Arrays.asList(
-        // Definitions
-        SampleMetrics.class,
-
-        // Batch
-        SampleSensor.class, RandomDecorator.class,
-
-        // UI
-        SampleFooter.class, SampleRubyWidget.class);
-  }
-}
\ No newline at end of file
diff --git a/samples/standard-plugin/src/main/java/com/mycompany/sonar/standard/batch/RandomDecorator.java b/samples/standard-plugin/src/main/java/com/mycompany/sonar/standard/batch/RandomDecorator.java
deleted file mode 100644 (file)
index de2b702..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-package com.mycompany.sonar.standard.batch;
-
-import com.mycompany.sonar.standard.SampleMetrics;
-import org.apache.commons.lang.StringUtils;
-import org.apache.commons.lang.math.RandomUtils;
-import org.sonar.api.batch.Decorator;
-import org.sonar.api.batch.DecoratorContext;
-import org.sonar.api.measures.MeasureUtils;
-import org.sonar.api.resources.Java;
-import org.sonar.api.resources.Project;
-import org.sonar.api.resources.Resource;
-import org.sonar.api.resources.Scopes;
-
-public class RandomDecorator implements Decorator {
-
-  public boolean shouldExecuteOnProject(Project project) {
-    // Execute only on Java projects
-    return StringUtils.equals(project.getLanguageKey(), Java.KEY);
-  }
-
-  public void decorate(Resource resource, DecoratorContext context) {
-    // This method is executed on the whole tree of resources.
-    // Bottom-up navigation : Java methods -> Java classes -> files -> packages -> modules -> project
-    if (Scopes.isBlockUnit(resource)) {
-      // Sonar API includes many libraries like commons-lang and google-collections
-      double value = RandomUtils.nextDouble();
-
-      // Add a measure to the current Java method
-      context.saveMeasure(SampleMetrics.RANDOM, value);
-
-    } else {
-      // we sum random values on resources different than method
-      context.saveMeasure(SampleMetrics.RANDOM, MeasureUtils.sum(true, context.getChildrenMeasures(SampleMetrics.RANDOM)));
-    }
-  }
-}
diff --git a/samples/standard-plugin/src/main/java/com/mycompany/sonar/standard/batch/SampleSensor.java b/samples/standard-plugin/src/main/java/com/mycompany/sonar/standard/batch/SampleSensor.java
deleted file mode 100644 (file)
index eade5e7..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-package com.mycompany.sonar.standard.batch;
-
-import com.mycompany.sonar.standard.SampleMetrics;
-import org.sonar.api.batch.Sensor;
-import org.sonar.api.batch.SensorContext;
-import org.sonar.api.measures.Measure;
-import org.sonar.api.resources.Project;
-
-public class SampleSensor implements Sensor {
-
-  public boolean shouldExecuteOnProject(Project project) {
-    // This sensor is executed on any type of projects
-    return true;
-  }
-
-  public void analyse(Project project, SensorContext sensorContext) {
-    Measure measure = new Measure(SampleMetrics.MESSAGE, "Hello World!");
-    sensorContext.saveMeasure(measure);
-  }
-}
diff --git a/samples/standard-plugin/src/main/java/com/mycompany/sonar/standard/ui/SampleFooter.java b/samples/standard-plugin/src/main/java/com/mycompany/sonar/standard/ui/SampleFooter.java
deleted file mode 100644 (file)
index 6ed5989..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-package com.mycompany.sonar.standard.ui;
-
-import org.sonar.api.web.Footer;
-
-public final class SampleFooter implements Footer {
-  public String getHtml() {
-    return "<p>Sample footer - <em>This is static HTML</em></p>";
-  }
-}
diff --git a/samples/standard-plugin/src/main/java/com/mycompany/sonar/standard/ui/SampleRubyWidget.java b/samples/standard-plugin/src/main/java/com/mycompany/sonar/standard/ui/SampleRubyWidget.java
deleted file mode 100644 (file)
index a6e723b..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-package com.mycompany.sonar.standard.ui;
-
-import org.sonar.api.web.*;
-
-@UserRole(UserRole.USER)
-@Description("Show how to use Ruby Widget API")
-@WidgetCategory("Sample")
-@WidgetProperties({
-  @WidgetProperty(key="param1",
-    description="This is a mandatory parameter",
-    optional=false
-  ),
-  @WidgetProperty(key="max",
-    description="max threshold",
-    type=WidgetPropertyType.INTEGER,
-    defaultValue="80"
-  ),
-  @WidgetProperty(key="param2",
-    description="This is an optional parameter"
-  ),
-  @WidgetProperty(key="floatprop",
-    description="test description"
-  )
-})
-public class SampleRubyWidget extends AbstractRubyTemplate implements RubyRailsWidget {
-
-  public String getId() {
-    return "sample";
-  }
-
-  public String getTitle() {
-    return "Sample";
-  }
-
-  @Override
-  protected String getTemplatePath() {
-    return "/sample_ruby_widget.html.erb";
-  }
-}
\ No newline at end of file
diff --git a/samples/standard-plugin/src/main/resources/sample_ruby_widget.html.erb b/samples/standard-plugin/src/main/resources/sample_ruby_widget.html.erb
deleted file mode 100644 (file)
index c2602c4..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-<div class="dashbox">
-  <h3><span title="<%= metric('random').description -%>"></span></h3>
-  <p>
-    <span class="big">
-      <%= format_measure('random') -%> <%= trend_icon(measure('random')) %>
-    </span>
-  </p>
-  <p><%= format_measure('message') -%></p>
-  <p>
-    <%= format_measure('ncloc', :suffix => ' lines', :url => url_for_drilldown('ncloc')) -%>
-  </p>
-</div>
-<div class="dashbox">
-       <h3>Help</h3>
-         <p>
-      Read configuration : <%= configuration('sonar.jdbc.username') -%>
-    </p>
-
-       <p>
-           Sample of Jfree Eastwood chart : <br/>
-               <%= gchart('cht=bhs&chco=FF0000,00FF00,0000FF&chs=200x125&chd=s:FOE,THE,Bar&chxt=x,y&chxl=1:|Dec|Nov|Oct|0:||20K||60K||100K|') -%>
-         </p>
-       <p>
-               Widget properties:
-               <table>
-                 <tr>
-                   <td>max:</td>
-                   <td><%= widget_properties['max'] -%></td>   
-                 </tr> 
-               <tr>
-                   <td>param1:</td>
-                   <td><%= widget_properties['param1'] -%></td>        
-                 </tr>
-               <tr>
-                   <td>param2:</td>
-                   <td><%= widget_properties['param2'] -%></td>        
-                 </tr>
-               </table>
-       </p>
-</div>