diff options
Diffstat (limited to 'sonar-plugin-api-impl/src/main')
-rw-r--r-- | sonar-plugin-api-impl/src/main/java/org/sonar/api/internal/MetadataLoader.java | 6 | ||||
-rw-r--r-- | sonar-plugin-api-impl/src/main/resources/sq-version.txt | 1 |
2 files changed, 4 insertions, 3 deletions
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/internal/MetadataLoader.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/internal/MetadataLoader.java index 40ccad10e31..33dae76c3f8 100644 --- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/internal/MetadataLoader.java +++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/internal/MetadataLoader.java @@ -37,7 +37,7 @@ import static org.apache.commons.lang.StringUtils.trimToEmpty; */ public class MetadataLoader { - private static final String VERSION_FILE_PATH = "/sonar-api-version.txt"; + private static final String SQ_VERSION_FILE_PATH = "/sq-version.txt"; private static final String EDITION_FILE_PATH = "/sonar-edition.txt"; private MetadataLoader() { @@ -45,13 +45,13 @@ public class MetadataLoader { } public static Version loadVersion(System2 system) { - URL url = system.getResource(VERSION_FILE_PATH); + URL url = system.getResource(SQ_VERSION_FILE_PATH); try (Scanner scanner = new Scanner(url.openStream(), StandardCharsets.UTF_8.name())) { String versionInFile = scanner.nextLine(); return Version.parse(versionInFile); } catch (IOException e) { - throw new IllegalStateException("Can not load " + VERSION_FILE_PATH + " from classpath ", e); + throw new IllegalStateException("Can not load " + SQ_VERSION_FILE_PATH + " from classpath ", e); } } diff --git a/sonar-plugin-api-impl/src/main/resources/sq-version.txt b/sonar-plugin-api-impl/src/main/resources/sq-version.txt new file mode 100644 index 00000000000..73f30eb11cf --- /dev/null +++ b/sonar-plugin-api-impl/src/main/resources/sq-version.txt @@ -0,0 +1 @@ +@project.version@ |