diff options
author | Evgeny Mandrikov <mandrikov@gmail.com> | 2011-01-19 02:20:45 +0300 |
---|---|---|
committer | Evgeny Mandrikov <mandrikov@gmail.com> | 2011-01-24 01:14:07 +0300 |
commit | 6b5035087075113699015583fd4d76b75bf36894 (patch) | |
tree | 97a3a3ef3be082d68db071405f7aab50d4963a19 /sonar-plugin-api | |
parent | a1fca497333231931a3df3e3973918ade12ab6bc (diff) | |
download | sonarqube-6b5035087075113699015583fd4d76b75bf36894.tar.gz sonarqube-6b5035087075113699015583fd4d76b75bf36894.zip |
SONAR-2106: New Java library to bootstrap project analysis
* Add BatchResourcesServlet to allow downloading libraries from server
* Create in memory POM for non-maven environments
* Provide fake MavenPluginExecutor for non-maven environments
* Add new module sonar-batch-maven-compat with shaded maven-project
Diffstat (limited to 'sonar-plugin-api')
3 files changed, 0 insertions, 197 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/resources/DefaultFileSystemDirectory.java b/sonar-plugin-api/src/main/java/org/sonar/api/resources/DefaultFileSystemDirectory.java deleted file mode 100644 index 44461fb4772..00000000000 --- a/sonar-plugin-api/src/main/java/org/sonar/api/resources/DefaultFileSystemDirectory.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA - * mailto:contact AT sonarsource DOT com - * - * Sonar is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * Sonar is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with Sonar; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 - */ -package org.sonar.api.resources; - -import com.google.common.collect.Lists; - -import java.io.File; -import java.util.Collections; -import java.util.List; - -public class DefaultFileSystemDirectory implements FileSystemDirectory { - - private String nature; - private File location; - private File outputLocation; - private List<String> inclusionPatterns; - private List<String> exclusionPatterns; - - public String getNature() { - return nature; - } - - public DefaultFileSystemDirectory setNature(String nature) { - this.nature = nature; - return this; - } - - public File getLocation() { - return location; - } - - public DefaultFileSystemDirectory setLocation(File location) { - this.location = location; - return this; - } - - public File getOutputLocation() { - return outputLocation; - } - - public DefaultFileSystemDirectory setOutputLocation(File outputLocation) { - this.outputLocation = outputLocation; - return this; - } - - public List<String> getInclusionPatterns() { - if (inclusionPatterns == null) { - return Collections.emptyList(); - } - return Collections.unmodifiableList(inclusionPatterns); - } - - /** - * @param pattern Ant-like inclusion pattern - */ - public DefaultFileSystemDirectory addInclusionPattern(String pattern) { - if (inclusionPatterns == null) { - inclusionPatterns = Lists.newArrayList(); - } - inclusionPatterns.add(pattern); - return this; - } - - public List<String> getExclusionPatterns() { - if (exclusionPatterns == null) { - return Collections.emptyList(); - } - return Collections.unmodifiableList(exclusionPatterns); - } - - /** - * @param pattern Ant-like exclusion pattern - */ - public DefaultFileSystemDirectory addExclusionPattern(String pattern) { - if (exclusionPatterns == null) { - exclusionPatterns = Lists.newArrayList(); - } - exclusionPatterns.add(pattern); - return this; - } -} diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/resources/FileSystemDirectory.java b/sonar-plugin-api/src/main/java/org/sonar/api/resources/FileSystemDirectory.java deleted file mode 100644 index 17c8298836c..00000000000 --- a/sonar-plugin-api/src/main/java/org/sonar/api/resources/FileSystemDirectory.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA - * mailto:contact AT sonarsource DOT com - * - * Sonar is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * Sonar is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with Sonar; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 - */ -package org.sonar.api.resources; - - -import java.io.File; -import java.util.List; - -/** - * Defines project directory in a form suitable for Sonar. - * This is a part of bootstrap process, so we should take care about backward compatibility. - * <p> - * Couple of examples to show what this structure defines: - * <ul> - * <li>Typical Java project based on Ant might consist of two directories: - * <ol> - * <li>sources (location "src", output location "bin", includes "*.java")</li> - * <li>resources (location "src", output location "bin", excludes "*.java")</li> - * </ol> - * </li> - * <li>Typical Java project based on Maven might consist of four directories: - * <ol> - * <li>main sources (location "src/main/java", output location "target/classes")</li> - * <li>main resources (location "src/main/resources", output location "target/classes")</li> - * <li>test sources (location "src/test/java", output location "target/test-classes")</li> - * <li>test resources (location "src/test/resources", output location "target/test-classes")</li> - * </ol> - * </li> - * </ul> - * </p> - * - * @since 2.6 - */ -public interface FileSystemDirectory { - - /** - * @return nature of underlying files. - * @see Natures - */ - String getNature(); - - /** - * @return location of files for compilation. - * In case of Java this would be directory with Java source files. - */ - File getLocation(); - - /** - * @return location of binary files after compilation. - * In case of Java this would be directory with Class files. - */ - File getOutputLocation(); - - /** - * @return list of Ant-like inclusion patterns for files. - */ - List<String> getInclusionPatterns(); - - /** - * @return list of Ant-like exclusion patterns for files. - */ - List<String> getExclusionPatterns(); - -} diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/resources/Natures.java b/sonar-plugin-api/src/main/java/org/sonar/api/resources/Natures.java deleted file mode 100644 index 5b8f102fef6..00000000000 --- a/sonar-plugin-api/src/main/java/org/sonar/api/resources/Natures.java +++ /dev/null @@ -1,18 +0,0 @@ -package org.sonar.api.resources; - -/** - * @since 2.6 - */ -public interface Natures { - - /** - * Everything which relate to source code (for example "src/main/java" and "src/main/resources"). - */ - String MAIN = "MAIN"; - - /** - * Everything which relate to unit tests (for example "src/test/java" and "src/test/resources"). - */ - String TEST = "TEST"; - -} |