From c449685c7fc56d15daab8eec3df557ed6a8ec938 Mon Sep 17 00:00:00 2001 From: Evgeny Mandrikov Date: Wed, 2 Feb 2011 01:58:56 +0300 Subject: Improve ProjectDefinition * Replace properties "sonar.projectBinaries" and "sonar.projectLibraries" by explicit fields in ProjectDefinition --- .../batch/bootstrapper/ProjectDefinition.java | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'sonar-batch/src/main/java/org/sonar/batch/bootstrapper') 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 sourceDirs = Lists.newArrayList(); private List testDirs = Lists.newArrayList(); + private List binaries = Lists.newArrayList(); + private List 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 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 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); + } } -- cgit v1.2.3