aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-batch/src/main/java/org/sonar/batch/bootstrapper
diff options
context:
space:
mode:
authorEvgeny Mandrikov <mandrikov@gmail.com>2011-02-02 01:58:56 +0300
committerEvgeny Mandrikov <mandrikov@gmail.com>2011-02-02 01:58:56 +0300
commitc449685c7fc56d15daab8eec3df557ed6a8ec938 (patch)
treeba15df225aa56706ce72e8a7e92f5bd9c008a7f6 /sonar-batch/src/main/java/org/sonar/batch/bootstrapper
parent356f32fa759fdf4b9801194b26fc8dcc877dc3fc (diff)
downloadsonarqube-c449685c7fc56d15daab8eec3df557ed6a8ec938.tar.gz
sonarqube-c449685c7fc56d15daab8eec3df557ed6a8ec938.zip
Improve ProjectDefinition
* Replace properties "sonar.projectBinaries" and "sonar.projectLibraries" by explicit fields in ProjectDefinition
Diffstat (limited to 'sonar-batch/src/main/java/org/sonar/batch/bootstrapper')
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/bootstrapper/ProjectDefinition.java27
1 files changed, 27 insertions, 0 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/bootstrapper/ProjectDefinition.java b/sonar-batch/src/main/java/org/sonar/batch/bootstrapper/ProjectDefinition.java
index 10ede5a1100..54ea3b5f5e3 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/bootstrapper/ProjectDefinition.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/bootstrapper/ProjectDefinition.java
@@ -39,6 +39,8 @@ public class ProjectDefinition {
private Properties properties;
private List<String> sourceDirs = Lists.newArrayList();
private List<String> testDirs = Lists.newArrayList();
+ private List<String> binaries = Lists.newArrayList();
+ private List<String> libraries = Lists.newArrayList();
/**
* @param baseDir project base directory
@@ -85,4 +87,29 @@ public class ProjectDefinition {
public void addTestDir(String path) {
testDirs.add(path);
}
+
+ public List<String> getBinaries() {
+ return binaries;
+ }
+
+ /**
+ * @param path path to directory with compiled source. In case of Java this is directory with class files.
+ * It can be absolute or relative to project directory.
+ * @TODO currently Sonar supports only one such directory due to dependency on MavenProject
+ */
+ public void addBinaryDir(String path) {
+ binaries.add(path);
+ }
+
+ public List<String> getLibraries() {
+ return libraries;
+ }
+
+ /**
+ * @param path path to file with third-party library. In case of Java this is path to jar file.
+ * It can be absolute or relative to project directory.
+ */
+ public void addLibrary(String path) {
+ libraries.add(path);
+ }
}