diff options
Diffstat (limited to 'server/sonar-webserver-common/src/test/projects')
35 files changed, 792 insertions, 0 deletions
diff --git a/server/sonar-webserver-common/src/test/projects/.gitignore b/server/sonar-webserver-common/src/test/projects/.gitignore new file mode 100644 index 00000000000..a945b8525e6 --- /dev/null +++ b/server/sonar-webserver-common/src/test/projects/.gitignore @@ -0,0 +1,7 @@ +# see README.txt +!*/target/ +*/target/classes/ +*/target/maven-archiver/ +*/target/maven-status/ +*/target/test-*/ + diff --git a/server/sonar-webserver-common/src/test/projects/README.txt b/server/sonar-webserver-common/src/test/projects/README.txt new file mode 100644 index 00000000000..c53a66d52f2 --- /dev/null +++ b/server/sonar-webserver-common/src/test/projects/README.txt @@ -0,0 +1,3 @@ +This directory provides the fake plugins used by tests. These tests are rarely changed, so generated +artifacts are stored in Git repository (see .gitignore). It avoids from adding unnecessary modules +to build. diff --git a/server/sonar-webserver-common/src/test/projects/fake-report-plugin/pom.xml b/server/sonar-webserver-common/src/test/projects/fake-report-plugin/pom.xml new file mode 100644 index 00000000000..72a04dbe04f --- /dev/null +++ b/server/sonar-webserver-common/src/test/projects/fake-report-plugin/pom.xml @@ -0,0 +1,36 @@ +<?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>org.sonarsource.sonarqube.tests</groupId> + <artifactId>fake-report-plugin</artifactId> + <version>0.1-SNAPSHOT</version> + <packaging>sonar-plugin</packaging> + <name>Fake Report Plugin</name> + <description>Fake Report Plugin</description> + + <dependencies> + <dependency> + <groupId>org.codehaus.sonar</groupId> + <artifactId>sonar-plugin-api</artifactId> + <version>4.5.4</version> + <scope>provided</scope> + </dependency> + </dependencies> + <build> + <sourceDirectory>src</sourceDirectory> + <plugins> + <plugin> + <groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId> + <artifactId>sonar-packaging-maven-plugin</artifactId> + <version>1.15</version> + <extensions>true</extensions> + <configuration> + <pluginKey>report</pluginKey> + <pluginClass>BasePlugin</pluginClass> + </configuration> + </plugin> + </plugins> + </build> + +</project> diff --git a/server/sonar-webserver-common/src/test/projects/fake-report-plugin/src/BasePlugin.java b/server/sonar-webserver-common/src/test/projects/fake-report-plugin/src/BasePlugin.java new file mode 100644 index 00000000000..d12daff3e57 --- /dev/null +++ b/server/sonar-webserver-common/src/test/projects/fake-report-plugin/src/BasePlugin.java @@ -0,0 +1,30 @@ +/* + * SonarQube + * Copyright (C) 2009-2019 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program 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. + * + * This program 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 this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +import org.sonar.api.Plugin; + +import java.util.Collections; +import java.util.List; + +public class BasePlugin extends Plugin { + + public void define(Plugin.Context context) { + + } +} diff --git a/server/sonar-webserver-common/src/test/projects/fake-report-plugin/src/org/sonar/plugins/testbase/api/BaseApi.java b/server/sonar-webserver-common/src/test/projects/fake-report-plugin/src/org/sonar/plugins/testbase/api/BaseApi.java new file mode 100644 index 00000000000..e0b54398eaf --- /dev/null +++ b/server/sonar-webserver-common/src/test/projects/fake-report-plugin/src/org/sonar/plugins/testbase/api/BaseApi.java @@ -0,0 +1,25 @@ +/* + * SonarQube + * Copyright (C) 2009-2019 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program 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. + * + * This program 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 this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +package org.sonar.plugins.testbase.api; + +public class BaseApi { + public void doNothing() { + } +} diff --git a/server/sonar-webserver-common/src/test/projects/fake-report-plugin/target/fake-report-plugin-0.1-SNAPSHOT.jar b/server/sonar-webserver-common/src/test/projects/fake-report-plugin/target/fake-report-plugin-0.1-SNAPSHOT.jar Binary files differnew file mode 100644 index 00000000000..6085e44fdca --- /dev/null +++ b/server/sonar-webserver-common/src/test/projects/fake-report-plugin/target/fake-report-plugin-0.1-SNAPSHOT.jar diff --git a/server/sonar-webserver-common/src/test/projects/fake-sqale-plugin/pom.xml b/server/sonar-webserver-common/src/test/projects/fake-sqale-plugin/pom.xml new file mode 100644 index 00000000000..e417dd96fba --- /dev/null +++ b/server/sonar-webserver-common/src/test/projects/fake-sqale-plugin/pom.xml @@ -0,0 +1,36 @@ +<?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>org.sonarsource.sonarqube.tests</groupId> + <artifactId>fake-sqale-plugin</artifactId> + <version>0.1-SNAPSHOT</version> + <packaging>sonar-plugin</packaging> + <name>Fake SQALE Plugin</name> + <description>Fake SQALE Plugin</description> + + <dependencies> + <dependency> + <groupId>org.codehaus.sonar</groupId> + <artifactId>sonar-plugin-api</artifactId> + <version>4.5.4</version> + <scope>provided</scope> + </dependency> + </dependencies> + <build> + <sourceDirectory>src</sourceDirectory> + <plugins> + <plugin> + <groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId> + <artifactId>sonar-packaging-maven-plugin</artifactId> + <version>1.15</version> + <extensions>true</extensions> + <configuration> + <pluginKey>sqale</pluginKey> + <pluginClass>BasePlugin</pluginClass> + </configuration> + </plugin> + </plugins> + </build> + +</project> diff --git a/server/sonar-webserver-common/src/test/projects/fake-sqale-plugin/src/BasePlugin.java b/server/sonar-webserver-common/src/test/projects/fake-sqale-plugin/src/BasePlugin.java new file mode 100644 index 00000000000..d12daff3e57 --- /dev/null +++ b/server/sonar-webserver-common/src/test/projects/fake-sqale-plugin/src/BasePlugin.java @@ -0,0 +1,30 @@ +/* + * SonarQube + * Copyright (C) 2009-2019 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program 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. + * + * This program 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 this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +import org.sonar.api.Plugin; + +import java.util.Collections; +import java.util.List; + +public class BasePlugin extends Plugin { + + public void define(Plugin.Context context) { + + } +} diff --git a/server/sonar-webserver-common/src/test/projects/fake-sqale-plugin/src/org/sonar/plugins/testbase/api/BaseApi.java b/server/sonar-webserver-common/src/test/projects/fake-sqale-plugin/src/org/sonar/plugins/testbase/api/BaseApi.java new file mode 100644 index 00000000000..e0b54398eaf --- /dev/null +++ b/server/sonar-webserver-common/src/test/projects/fake-sqale-plugin/src/org/sonar/plugins/testbase/api/BaseApi.java @@ -0,0 +1,25 @@ +/* + * SonarQube + * Copyright (C) 2009-2019 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program 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. + * + * This program 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 this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +package org.sonar.plugins.testbase.api; + +public class BaseApi { + public void doNothing() { + } +} diff --git a/server/sonar-webserver-common/src/test/projects/fake-sqale-plugin/target/fake-sqale-plugin-0.1-SNAPSHOT.jar b/server/sonar-webserver-common/src/test/projects/fake-sqale-plugin/target/fake-sqale-plugin-0.1-SNAPSHOT.jar Binary files differnew file mode 100644 index 00000000000..b5c99f721b3 --- /dev/null +++ b/server/sonar-webserver-common/src/test/projects/fake-sqale-plugin/target/fake-sqale-plugin-0.1-SNAPSHOT.jar diff --git a/server/sonar-webserver-common/src/test/projects/fake-views-plugin/pom.xml b/server/sonar-webserver-common/src/test/projects/fake-views-plugin/pom.xml new file mode 100644 index 00000000000..1ef73d2ffda --- /dev/null +++ b/server/sonar-webserver-common/src/test/projects/fake-views-plugin/pom.xml @@ -0,0 +1,36 @@ +<?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>org.sonarsource.sonarqube.tests</groupId> + <artifactId>fake-views-plugin</artifactId> + <version>0.1-SNAPSHOT</version> + <packaging>sonar-plugin</packaging> + <name>Fake Views Plugin</name> + <description>Fake Views Plugin</description> + + <dependencies> + <dependency> + <groupId>org.codehaus.sonar</groupId> + <artifactId>sonar-plugin-api</artifactId> + <version>4.5.4</version> + <scope>provided</scope> + </dependency> + </dependencies> + <build> + <sourceDirectory>src</sourceDirectory> + <plugins> + <plugin> + <groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId> + <artifactId>sonar-packaging-maven-plugin</artifactId> + <version>1.15</version> + <extensions>true</extensions> + <configuration> + <pluginKey>views</pluginKey> + <pluginClass>BasePlugin</pluginClass> + </configuration> + </plugin> + </plugins> + </build> + +</project> diff --git a/server/sonar-webserver-common/src/test/projects/fake-views-plugin/src/BasePlugin.java b/server/sonar-webserver-common/src/test/projects/fake-views-plugin/src/BasePlugin.java new file mode 100644 index 00000000000..d12daff3e57 --- /dev/null +++ b/server/sonar-webserver-common/src/test/projects/fake-views-plugin/src/BasePlugin.java @@ -0,0 +1,30 @@ +/* + * SonarQube + * Copyright (C) 2009-2019 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program 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. + * + * This program 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 this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +import org.sonar.api.Plugin; + +import java.util.Collections; +import java.util.List; + +public class BasePlugin extends Plugin { + + public void define(Plugin.Context context) { + + } +} diff --git a/server/sonar-webserver-common/src/test/projects/fake-views-plugin/src/org/sonar/plugins/testbase/api/BaseApi.java b/server/sonar-webserver-common/src/test/projects/fake-views-plugin/src/org/sonar/plugins/testbase/api/BaseApi.java new file mode 100644 index 00000000000..e0b54398eaf --- /dev/null +++ b/server/sonar-webserver-common/src/test/projects/fake-views-plugin/src/org/sonar/plugins/testbase/api/BaseApi.java @@ -0,0 +1,25 @@ +/* + * SonarQube + * Copyright (C) 2009-2019 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program 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. + * + * This program 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 this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +package org.sonar.plugins.testbase.api; + +public class BaseApi { + public void doNothing() { + } +} diff --git a/server/sonar-webserver-common/src/test/projects/fake-views-plugin/target/fake-views-plugin-0.1-SNAPSHOT.jar b/server/sonar-webserver-common/src/test/projects/fake-views-plugin/target/fake-views-plugin-0.1-SNAPSHOT.jar Binary files differnew file mode 100644 index 00000000000..a47d93d94a8 --- /dev/null +++ b/server/sonar-webserver-common/src/test/projects/fake-views-plugin/target/fake-views-plugin-0.1-SNAPSHOT.jar diff --git a/server/sonar-webserver-common/src/test/projects/pom.xml b/server/sonar-webserver-common/src/test/projects/pom.xml new file mode 100644 index 00000000000..37338313ac0 --- /dev/null +++ b/server/sonar-webserver-common/src/test/projects/pom.xml @@ -0,0 +1,22 @@ +<?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>org.sonarsource.sonarqube.tests</groupId> + <artifactId>parent</artifactId> + <version>0.1-SNAPSHOT</version> + <packaging>pom</packaging> + <modules> + <module>test-base-plugin</module> + <module>test-base-plugin-v2</module> + <module>test-core-plugin</module> + <module>test-extend-plugin</module> + <module>test-libs-plugin</module> + <module>test-require-plugin</module> + <module>test-requirenew-plugin</module> + <module>fake-report-plugin</module> + <module>fake-sqale-plugin</module> + <module>fake-views-plugin</module> + </modules> + +</project> diff --git a/server/sonar-webserver-common/src/test/projects/test-base-plugin-v2/pom.xml b/server/sonar-webserver-common/src/test/projects/test-base-plugin-v2/pom.xml new file mode 100644 index 00000000000..982be1c0170 --- /dev/null +++ b/server/sonar-webserver-common/src/test/projects/test-base-plugin-v2/pom.xml @@ -0,0 +1,36 @@ +<?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>org.sonarsource.sonarqube.tests</groupId> + <artifactId>test-base-plugin</artifactId> + <version>0.2-SNAPSHOT</version> + <packaging>sonar-plugin</packaging> + <name>Base Plugin</name> + <description>Simple standalone plugin. Used by other fake plugins.</description> + + <dependencies> + <dependency> + <groupId>org.codehaus.sonar</groupId> + <artifactId>sonar-plugin-api</artifactId> + <version>4.5.4</version> + <scope>provided</scope> + </dependency> + </dependencies> + <build> + <sourceDirectory>src</sourceDirectory> + <plugins> + <plugin> + <groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId> + <artifactId>sonar-packaging-maven-plugin</artifactId> + <version>1.15</version> + <extensions>true</extensions> + <configuration> + <pluginKey>testbase</pluginKey> + <pluginClass>BasePlugin</pluginClass> + </configuration> + </plugin> + </plugins> + </build> + +</project> diff --git a/server/sonar-webserver-common/src/test/projects/test-base-plugin-v2/src/BasePlugin.java b/server/sonar-webserver-common/src/test/projects/test-base-plugin-v2/src/BasePlugin.java new file mode 100644 index 00000000000..d12daff3e57 --- /dev/null +++ b/server/sonar-webserver-common/src/test/projects/test-base-plugin-v2/src/BasePlugin.java @@ -0,0 +1,30 @@ +/* + * SonarQube + * Copyright (C) 2009-2019 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program 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. + * + * This program 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 this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +import org.sonar.api.Plugin; + +import java.util.Collections; +import java.util.List; + +public class BasePlugin extends Plugin { + + public void define(Plugin.Context context) { + + } +} diff --git a/server/sonar-webserver-common/src/test/projects/test-base-plugin-v2/src/org/sonar/plugins/testbase/api/BaseApi.java b/server/sonar-webserver-common/src/test/projects/test-base-plugin-v2/src/org/sonar/plugins/testbase/api/BaseApi.java new file mode 100644 index 00000000000..e0b54398eaf --- /dev/null +++ b/server/sonar-webserver-common/src/test/projects/test-base-plugin-v2/src/org/sonar/plugins/testbase/api/BaseApi.java @@ -0,0 +1,25 @@ +/* + * SonarQube + * Copyright (C) 2009-2019 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program 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. + * + * This program 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 this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +package org.sonar.plugins.testbase.api; + +public class BaseApi { + public void doNothing() { + } +} diff --git a/server/sonar-webserver-common/src/test/projects/test-base-plugin-v2/target/test-base-plugin-0.2-SNAPSHOT.jar b/server/sonar-webserver-common/src/test/projects/test-base-plugin-v2/target/test-base-plugin-0.2-SNAPSHOT.jar Binary files differnew file mode 100644 index 00000000000..1d4ef5430c7 --- /dev/null +++ b/server/sonar-webserver-common/src/test/projects/test-base-plugin-v2/target/test-base-plugin-0.2-SNAPSHOT.jar diff --git a/server/sonar-webserver-common/src/test/projects/test-base-plugin/pom.xml b/server/sonar-webserver-common/src/test/projects/test-base-plugin/pom.xml new file mode 100644 index 00000000000..c4e95936e74 --- /dev/null +++ b/server/sonar-webserver-common/src/test/projects/test-base-plugin/pom.xml @@ -0,0 +1,36 @@ +<?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>org.sonarsource.sonarqube.tests</groupId> + <artifactId>test-base-plugin</artifactId> + <version>0.1-SNAPSHOT</version> + <packaging>sonar-plugin</packaging> + <name>Base Plugin</name> + <description>Simple standalone plugin. Used by other fake plugins.</description> + + <dependencies> + <dependency> + <groupId>org.codehaus.sonar</groupId> + <artifactId>sonar-plugin-api</artifactId> + <version>4.5.4</version> + <scope>provided</scope> + </dependency> + </dependencies> + <build> + <sourceDirectory>src</sourceDirectory> + <plugins> + <plugin> + <groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId> + <artifactId>sonar-packaging-maven-plugin</artifactId> + <version>1.15</version> + <extensions>true</extensions> + <configuration> + <pluginKey>testbase</pluginKey> + <pluginClass>BasePlugin</pluginClass> + </configuration> + </plugin> + </plugins> + </build> + +</project> diff --git a/server/sonar-webserver-common/src/test/projects/test-base-plugin/src/BasePlugin.java b/server/sonar-webserver-common/src/test/projects/test-base-plugin/src/BasePlugin.java new file mode 100644 index 00000000000..d12daff3e57 --- /dev/null +++ b/server/sonar-webserver-common/src/test/projects/test-base-plugin/src/BasePlugin.java @@ -0,0 +1,30 @@ +/* + * SonarQube + * Copyright (C) 2009-2019 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program 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. + * + * This program 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 this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +import org.sonar.api.Plugin; + +import java.util.Collections; +import java.util.List; + +public class BasePlugin extends Plugin { + + public void define(Plugin.Context context) { + + } +} diff --git a/server/sonar-webserver-common/src/test/projects/test-base-plugin/src/org/sonar/plugins/testbase/api/BaseApi.java b/server/sonar-webserver-common/src/test/projects/test-base-plugin/src/org/sonar/plugins/testbase/api/BaseApi.java new file mode 100644 index 00000000000..e0b54398eaf --- /dev/null +++ b/server/sonar-webserver-common/src/test/projects/test-base-plugin/src/org/sonar/plugins/testbase/api/BaseApi.java @@ -0,0 +1,25 @@ +/* + * SonarQube + * Copyright (C) 2009-2019 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program 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. + * + * This program 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 this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +package org.sonar.plugins.testbase.api; + +public class BaseApi { + public void doNothing() { + } +} diff --git a/server/sonar-webserver-common/src/test/projects/test-base-plugin/target/test-base-plugin-0.1-SNAPSHOT.jar b/server/sonar-webserver-common/src/test/projects/test-base-plugin/target/test-base-plugin-0.1-SNAPSHOT.jar Binary files differnew file mode 100644 index 00000000000..739a22fcdae --- /dev/null +++ b/server/sonar-webserver-common/src/test/projects/test-base-plugin/target/test-base-plugin-0.1-SNAPSHOT.jar diff --git a/server/sonar-webserver-common/src/test/projects/test-extend-plugin/pom.xml b/server/sonar-webserver-common/src/test/projects/test-extend-plugin/pom.xml new file mode 100644 index 00000000000..e23667e6318 --- /dev/null +++ b/server/sonar-webserver-common/src/test/projects/test-extend-plugin/pom.xml @@ -0,0 +1,37 @@ +<?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>org.sonarsource.sonarqube.tests</groupId> + <artifactId>test-extend-plugin</artifactId> + <version>0.1-SNAPSHOT</version> + <packaging>sonar-plugin</packaging> + <name>Test Extend Plugin</name> + <description>Fake plugin that extends the plugin with key "base"</description> + + <dependencies> + <dependency> + <groupId>org.codehaus.sonar</groupId> + <artifactId>sonar-plugin-api</artifactId> + <version>4.5.4</version> + <scope>provided</scope> + </dependency> + </dependencies> + <build> + <sourceDirectory>src</sourceDirectory> + <plugins> + <plugin> + <groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId> + <artifactId>sonar-packaging-maven-plugin</artifactId> + <version>1.15</version> + <extensions>true</extensions> + <configuration> + <pluginKey>testextend</pluginKey> + <pluginClass>ExtendPlugin</pluginClass> + <basePlugin>testbase</basePlugin> + </configuration> + </plugin> + </plugins> + </build> + +</project> diff --git a/server/sonar-webserver-common/src/test/projects/test-extend-plugin/src/ExtendPlugin.java b/server/sonar-webserver-common/src/test/projects/test-extend-plugin/src/ExtendPlugin.java new file mode 100644 index 00000000000..d364a2f9dd4 --- /dev/null +++ b/server/sonar-webserver-common/src/test/projects/test-extend-plugin/src/ExtendPlugin.java @@ -0,0 +1,30 @@ +/* + * SonarQube + * Copyright (C) 2009-2019 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program 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. + * + * This program 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 this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +import org.sonar.api.Plugin; + +import java.util.Collections; +import java.util.List; + +public class ExtendPlugin extends Plugin { + + public void define(Plugin.Context context) { + + } +} diff --git a/server/sonar-webserver-common/src/test/projects/test-extend-plugin/target/test-extend-plugin-0.1-SNAPSHOT.jar b/server/sonar-webserver-common/src/test/projects/test-extend-plugin/target/test-extend-plugin-0.1-SNAPSHOT.jar Binary files differnew file mode 100644 index 00000000000..2f63c2e652c --- /dev/null +++ b/server/sonar-webserver-common/src/test/projects/test-extend-plugin/target/test-extend-plugin-0.1-SNAPSHOT.jar diff --git a/server/sonar-webserver-common/src/test/projects/test-libs-plugin/pom.xml b/server/sonar-webserver-common/src/test/projects/test-libs-plugin/pom.xml new file mode 100644 index 00000000000..2d49cca2cf2 --- /dev/null +++ b/server/sonar-webserver-common/src/test/projects/test-libs-plugin/pom.xml @@ -0,0 +1,49 @@ +<?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>org.sonarsource.sonarqube.tests</groupId> + <artifactId>test-libs-plugin</artifactId> + <version>0.1-SNAPSHOT</version> + <packaging>sonar-plugin</packaging> + <name>Test Libs Plugin</name> + <description>Fake plugin that embeds some libraries</description> + + <dependencies> + <!-- embedded libs. Chosen because small ! --> + <dependency> + <groupId>commons-email</groupId> + <artifactId>commons-email</artifactId> + <version>20030310.165926</version> + </dependency> + <dependency> + <groupId>commons-daemon</groupId> + <artifactId>commons-daemon</artifactId> + <version>1.0.15</version> + </dependency> + + <dependency> + <groupId>org.codehaus.sonar</groupId> + <artifactId>sonar-plugin-api</artifactId> + <version>4.5.4</version> + <scope>provided</scope> + </dependency> + </dependencies> + + <build> + <sourceDirectory>src</sourceDirectory> + <plugins> + <plugin> + <groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId> + <artifactId>sonar-packaging-maven-plugin</artifactId> + <version>1.15</version> + <extensions>true</extensions> + <configuration> + <pluginKey>testlibs</pluginKey> + <pluginClass>LibsPlugin</pluginClass> + </configuration> + </plugin> + </plugins> + </build> + +</project> diff --git a/server/sonar-webserver-common/src/test/projects/test-libs-plugin/src/LibsPlugin.java b/server/sonar-webserver-common/src/test/projects/test-libs-plugin/src/LibsPlugin.java new file mode 100644 index 00000000000..7e3ebe0909c --- /dev/null +++ b/server/sonar-webserver-common/src/test/projects/test-libs-plugin/src/LibsPlugin.java @@ -0,0 +1,30 @@ +/* + * SonarQube + * Copyright (C) 2009-2019 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program 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. + * + * This program 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 this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +import org.sonar.api.Plugin; + +import java.util.Collections; +import java.util.List; + +public class LibsPlugin extends Plugin { + + public void define(Plugin.Context context) { + + } +} diff --git a/server/sonar-webserver-common/src/test/projects/test-libs-plugin/target/test-libs-plugin-0.1-SNAPSHOT.jar b/server/sonar-webserver-common/src/test/projects/test-libs-plugin/target/test-libs-plugin-0.1-SNAPSHOT.jar Binary files differnew file mode 100644 index 00000000000..6ebe8652d8b --- /dev/null +++ b/server/sonar-webserver-common/src/test/projects/test-libs-plugin/target/test-libs-plugin-0.1-SNAPSHOT.jar diff --git a/server/sonar-webserver-common/src/test/projects/test-require-plugin/pom.xml b/server/sonar-webserver-common/src/test/projects/test-require-plugin/pom.xml new file mode 100644 index 00000000000..62462ffbf34 --- /dev/null +++ b/server/sonar-webserver-common/src/test/projects/test-require-plugin/pom.xml @@ -0,0 +1,44 @@ +<?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>org.sonarsource.sonarqube.tests</groupId> + <artifactId>test-require-plugin</artifactId> + <version>0.1-SNAPSHOT</version> + <packaging>sonar-plugin</packaging> + <name>Test Require Plugin</name> + <description>This fake plugin depends on test-base-plugin</description> + + <dependencies> + <dependency> + <groupId>org.codehaus.sonar</groupId> + <artifactId>sonar-plugin-api</artifactId> + <version>4.5.4</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.sonarsource.sonarqube.tests</groupId> + <artifactId>test-base-plugin</artifactId> + <version>0.1-SNAPSHOT</version> + <type>sonar-plugin</type> + <scope>provided</scope> + </dependency> + </dependencies> + <build> + <sourceDirectory>src</sourceDirectory> + <plugins> + <plugin> + <groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId> + <artifactId>sonar-packaging-maven-plugin</artifactId> + <version>1.15</version> + <extensions>true</extensions> + <configuration> + <pluginKey>testrequire</pluginKey> + <pluginClass>RequirePlugin</pluginClass> + <requirePlugins>testbase:0.1</requirePlugins> + </configuration> + </plugin> + </plugins> + </build> + +</project> diff --git a/server/sonar-webserver-common/src/test/projects/test-require-plugin/src/RequirePlugin.java b/server/sonar-webserver-common/src/test/projects/test-require-plugin/src/RequirePlugin.java new file mode 100644 index 00000000000..847ae2d994e --- /dev/null +++ b/server/sonar-webserver-common/src/test/projects/test-require-plugin/src/RequirePlugin.java @@ -0,0 +1,35 @@ +/* + * SonarQube + * Copyright (C) 2009-2019 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program 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. + * + * This program 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 this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +import org.sonar.api.Plugin; + +import java.util.Collections; +import java.util.List; + +public class RequirePlugin extends Plugin { + + public RequirePlugin() { + // call a class that is in the api published by the base plugin + new org.sonar.plugins.testbase.api.BaseApi().doNothing(); + } + + public void define(Plugin.Context context) { + + } +} diff --git a/server/sonar-webserver-common/src/test/projects/test-require-plugin/target/test-require-plugin-0.1-SNAPSHOT.jar b/server/sonar-webserver-common/src/test/projects/test-require-plugin/target/test-require-plugin-0.1-SNAPSHOT.jar Binary files differnew file mode 100644 index 00000000000..f5fc95f9d0d --- /dev/null +++ b/server/sonar-webserver-common/src/test/projects/test-require-plugin/target/test-require-plugin-0.1-SNAPSHOT.jar diff --git a/server/sonar-webserver-common/src/test/projects/test-requirenew-plugin/pom.xml b/server/sonar-webserver-common/src/test/projects/test-requirenew-plugin/pom.xml new file mode 100644 index 00000000000..044cd94e8f0 --- /dev/null +++ b/server/sonar-webserver-common/src/test/projects/test-requirenew-plugin/pom.xml @@ -0,0 +1,44 @@ +<?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>org.sonarsource.sonarqube.tests</groupId> + <artifactId>test-requirenew-plugin</artifactId> + <version>0.1-SNAPSHOT</version> + <packaging>sonar-plugin</packaging> + <name>Test Require New Plugin</name> + <description>This fake plugin requires a version of test-base-plugin that is not installed</description> + + <dependencies> + <dependency> + <groupId>org.codehaus.sonar</groupId> + <artifactId>sonar-plugin-api</artifactId> + <version>4.5.4</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.sonarsource.sonarqube.tests</groupId> + <artifactId>test-base-plugin</artifactId> + <version>0.1-SNAPSHOT</version> + <type>sonar-plugin</type> + <scope>provided</scope> + </dependency> + </dependencies> + <build> + <sourceDirectory>src</sourceDirectory> + <plugins> + <plugin> + <groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId> + <artifactId>sonar-packaging-maven-plugin</artifactId> + <version>1.15</version> + <extensions>true</extensions> + <configuration> + <pluginKey>testrequire</pluginKey> + <pluginClass>RequirePlugin</pluginClass> + <requirePlugins>testbase:0.2</requirePlugins> + </configuration> + </plugin> + </plugins> + </build> + +</project> diff --git a/server/sonar-webserver-common/src/test/projects/test-requirenew-plugin/src/RequirePlugin.java b/server/sonar-webserver-common/src/test/projects/test-requirenew-plugin/src/RequirePlugin.java new file mode 100644 index 00000000000..0d14cde33c1 --- /dev/null +++ b/server/sonar-webserver-common/src/test/projects/test-requirenew-plugin/src/RequirePlugin.java @@ -0,0 +1,36 @@ +/* + * SonarQube + * Copyright (C) 2009-2019 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program 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. + * + * This program 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 this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +import org.sonar.api.Plugin; + +import java.util.Collections; +import java.util.List; + +public class RequirePlugin extends Plugin { + + public RequirePlugin() { + // call a class that is in the api published by the base plugin + new org.sonar.plugins.testbase.api.BaseApi().doNothing(); + } + + public void define(Plugin.Context context) { + + } + +} diff --git a/server/sonar-webserver-common/src/test/projects/test-requirenew-plugin/target/test-requirenew-plugin-0.1-SNAPSHOT.jar b/server/sonar-webserver-common/src/test/projects/test-requirenew-plugin/target/test-requirenew-plugin-0.1-SNAPSHOT.jar Binary files differnew file mode 100644 index 00000000000..0dd577fc360 --- /dev/null +++ b/server/sonar-webserver-common/src/test/projects/test-requirenew-plugin/target/test-requirenew-plugin-0.1-SNAPSHOT.jar |