aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api
diff options
context:
space:
mode:
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r--sonar-plugin-api/pom.xml20
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/resources/Project.java13
2 files changed, 19 insertions, 14 deletions
diff --git a/sonar-plugin-api/pom.xml b/sonar-plugin-api/pom.xml
index eedc11ae2d9..dcf05f40727 100644
--- a/sonar-plugin-api/pom.xml
+++ b/sonar-plugin-api/pom.xml
@@ -64,6 +64,7 @@
<groupId>org.codehaus.sonar</groupId>
<artifactId>sonar-squid</artifactId>
</dependency>
+
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
@@ -81,6 +82,10 @@
<artifactId>hibernate-entitymanager</artifactId>
</dependency>
<dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-ehcache</artifactId>
+ </dependency>
+ <dependency>
<groupId>geronimo-spec</groupId>
<artifactId>geronimo-spec-jta</artifactId>
</dependency>
@@ -96,6 +101,10 @@
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
</dependency>
+
+ <!-- TODO remove dependencies on Maven
+ but for now they should be defined with scope provided
+ -->
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
@@ -111,10 +120,7 @@
<artifactId>maven-project</artifactId>
<scope>provided</scope>
</dependency>
- <dependency>
- <groupId>org.apache.maven.shared</groupId>
- <artifactId>maven-common-artifact-filters</artifactId>
- </dependency>
+
<dependency>
<groupId>commons-configuration</groupId>
<artifactId>commons-configuration</artifactId>
@@ -136,10 +142,6 @@
<artifactId>commons-codec</artifactId>
</dependency>
<dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-ehcache</artifactId>
- </dependency>
- <dependency>
<groupId>jfree</groupId>
<artifactId>jfreechart</artifactId>
</dependency>
@@ -236,4 +238,4 @@
<scope>test</scope>
</dependency>
</dependencies>
-</project> \ No newline at end of file
+</project>
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/resources/Project.java b/sonar-plugin-api/src/main/java/org/sonar/api/resources/Project.java
index 45aa0cbfcf3..d4d37e95fae 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/resources/Project.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/resources/Project.java
@@ -31,7 +31,7 @@ import java.util.List;
/**
* A class that manipulates Projects in the Sonar way, i.e. mixing MavenProjects with the way it should be analyzed
- *
+ *
* @since 1.10
*/
public class Project extends Resource {
@@ -72,7 +72,6 @@ public class Project extends Resource {
@Deprecated
public static final String PARAM_REUSE_RULES_CONFIG = "sonar.reuseExistingRulesConfiguration";
-
/**
* Enumerates the type of possible analysis
*/
@@ -103,7 +102,7 @@ public class Project extends Resource {
private String[] exclusionPatterns;
private String analysisVersion;
private boolean latestAnalysis;
-
+
// modules tree
private Project parent;
private List<Project> modules = new ArrayList<Project>();
@@ -132,6 +131,9 @@ public class Project extends Resource {
return this;
}
+ /**
+ * For internal use only.
+ */
public final Project setPom(MavenProject pom) {
this.pom = pom;
return this;
@@ -203,6 +205,7 @@ public class Project extends Resource {
/**
* whether it's the latest analysis done on this project (displayed in sonar dashboard) or an analysis on a past revision.
+ *
* @since 2.0
*/
public boolean isLatestAnalysis() {
@@ -312,7 +315,7 @@ public class Project extends Resource {
* For internal use only.
*/
public void removeFromParent() {
- if (parent!=null) {
+ if (parent != null) {
parent.modules.remove(this);
}
}
@@ -385,7 +388,7 @@ public class Project extends Resource {
/**
* Sets the configuration
- *
+ *
* @return the current object
*/
public final Project setConfiguration(Configuration configuration) {