sonar-javascript-plugin
Used in:
components
- OverviewOverview
- VersionsVersions
- DependentsDependents
- DependenciesDependencies
<dependency>
<groupId>org.sonarsource.javascript</groupId>
<artifactId>sonar-javascript-plugin</artifactId>
<version>11.6.0.36606</version>
</dependency><?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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.sonarsource.javascript</groupId>
<artifactId>sonar-plugin</artifactId>
<version>11.6.0.36606</version>
</parent>
<artifactId>sonar-javascript-plugin</artifactId>
<packaging>sonar-plugin</packaging>
<name>SonarQube JavaScript :: Plugin</name>
<!-- Be careful when altering <description> as its value shows up in the SonarQube GUI -->
<description>Code Analyzer for JavaScript/TypeScript/CSS</description>
<url>http://redirect.sonarsource.com/plugins/javascript.html</url>
<scm>
<connection>scm:git:git@github.com:SonarSource/sonar-javascript.git</connection>
<developerConnection>scm:git:git@github.com:SonarSource/sonar-javascript.git</developerConnection>
<url>https://github.com/SonarSource/sonar-javascript</url>
<tag>HEAD</tag>
</scm>
<properties>
<artifactoryToken/>
</properties>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>api</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>bridge</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>css</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>javascript-checks</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>org.sonarsource.api.plugin</groupId>
<artifactId>sonar-plugin-api</artifactId>
</dependency>
<dependency>
<groupId>org.sonarsource.sonarqube</groupId>
<artifactId>sonar-plugin-api-impl</artifactId>
</dependency>
<dependency>
<groupId>org.sonarsource.analyzer-commons</groupId>
<artifactId>sonar-analyzer-commons</artifactId>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
</dependency>
<dependency>
<groupId>org.awaitility</groupId>
<artifactId>awaitility</artifactId>
</dependency>
<dependency>
<groupId>org.sonarsource.sonarlint.core</groupId>
<artifactId>sonarlint-plugin-api</artifactId>
</dependency>
<dependency>
<groupId>org.sonarsource.sonarlint.core</groupId>
<artifactId>sonarlint-analysis-engine</artifactId>
</dependency>
<dependency>
<groupId>org.sonarsource.sonarlint.core</groupId>
<artifactId>sonarlint-commons</artifactId>
</dependency>
<dependency>
<groupId>org.sonarsource.sonarlint.core</groupId>
<artifactId>sonarlint-plugin-commons</artifactId>
</dependency>
<dependency>
<groupId>org.sonarsource.api.plugin</groupId>
<artifactId>sonar-plugin-api-test-fixtures</artifactId>
</dependency>
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId>
<artifactId>sonar-packaging-maven-plugin</artifactId>
<configuration>
<jreMinVersion>${jdk.min.version}</jreMinVersion>
<pluginApiMinVersion>${pluginApiMinVersion}</pluginApiMinVersion>
<pluginName>JavaScript/TypeScript/CSS Code Quality and Security</pluginName>
<pluginClass>org.sonar.plugins.javascript.JavaScriptPlugin</pluginClass>
<requiredForLanguages>js,ts,css,web,yaml</requiredForLanguages>
<skipDependenciesPackaging>true</skipDependenciesPackaging>
<sonarLintSupported>true</sonarLintSupported>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.6.2</version>
<executions>
<execution>
<id>Generate Node.js properties node-info.properties</id>
<phase>initialize</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>node</executable>
<workingDirectory>../..</workingDirectory>
<arguments>
<argument>tools/sync-nodejs-versions.mjs</argument>
<argument>sonar-plugin/sonar-javascript-plugin</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>Clean the resources</id>
<phase>clean</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>rm</executable>
<arguments>
<argument>-f</argument>
<argument>src/main/resources/node-info.properties</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<phase>initialize</phase>
<goals>
<goal>read-project-properties</goal>
</goals>
<configuration>
<files>
<file>${project.basedir}/src/main/resources/node-info.properties</file>
</files>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack-node-runtimes</id>
<phase>process-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.sonarsource.nodejs</groupId>
<artifactId>nodejs-runtime</artifactId>
<version>24.11.0.70</version>
<type>jar</type>
<outputDirectory>${project.build.directory}/downloads</outputDirectory>
<includes>**/*.xz,**/version.txt</includes>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.6.1</version>
<configuration>
<minimizeJar>true</minimizeJar>
<createDependencyReducedPom>false</createDependencyReducedPom>
</configuration>
<executions>
<execution>
<id>win-x64</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>win-x64</shadedClassifierName>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<manifestEntries>
<!-- This is used to get plugin version at runtime using getPackage().getImplementationVersion() -->
<Implementation-Version>${project.version}</Implementation-Version>
</manifestEntries>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
<resource>win-x64/node.exe.xz</resource>
<file>${project.build.directory}/downloads/runtimes/win-x64/node.exe.xz</file>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
<resource>win-x64/version.txt</resource>
<file>${project.build.directory}/downloads/runtimes/win-x64/version.txt</file>
</transformer>
</transformers>
</configuration>
</execution>
<execution>
<id>linux-x64</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>linux-x64</shadedClassifierName>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<manifestEntries>
<!-- This is used to get plugin version at runtime using getPackage().getImplementationVersion() -->
<Implementation-Version>${project.version}</Implementation-Version>
</manifestEntries>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
<resource>linux-x64/node.xz</resource>
<file>${project.build.directory}/downloads/runtimes/linux-x64/bin/node.xz</file>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
<resource>linux-x64/version.txt</resource>
<file>${project.build.directory}/downloads/runtimes/linux-x64/version.txt</file>
</transformer>
</transformers>
</configuration>
</execution>
<execution>
<id>linux-x64-musl</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>linux-x64-musl</shadedClassifierName>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<manifestEntries>
<!-- This is used to get plugin version at runtime using getPackage().getImplementationVersion() -->
<Implementation-Version>${project.version}</Implementation-Version>
</manifestEntries>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
<resource>linux-x64-musl/node.xz</resource>
<file>${project.build.directory}/downloads/runtimes/linux-x64-musl/bin/node.xz</file>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
<resource>linux-x64-musl/version.txt</resource>
<file>${project.build.directory}/downloads/runtimes/linux-x64-musl/version.txt</file>
</transformer>
</transformers>
</configuration>
</execution>
<execution>
<id>darwin-arm64</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>darwin-arm64</shadedClassifierName>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<manifestEntries>
<!-- This is used to get plugin version at runtime using getPackage().getImplementationVersion() -->
<Implementation-Version>${project.version}</Implementation-Version>
</manifestEntries>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
<resource>darwin-arm64/node.xz</resource>
<file>${project.build.directory}/downloads/runtimes/darwin-arm64/bin/node.xz</file>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
<resource>darwin-arm64/version.txt</resource>
<file>${project.build.directory}/downloads/runtimes/darwin-arm64/version.txt</file>
</transformer>
</transformers>
</configuration>
</execution>
<execution>
<id>darwin-x64</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>darwin-x64</shadedClassifierName>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<manifestEntries>
<!-- This is used to get plugin version at runtime using getPackage().getImplementationVersion() -->
<Implementation-Version>${project.version}</Implementation-Version>
</manifestEntries>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
<resource>darwin-x64/node.xz</resource>
<file>${project.build.directory}/downloads/runtimes/darwin-x64/bin/node.xz</file>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
<resource>darwin-x64/version.txt</resource>
<file>${project.build.directory}/downloads/runtimes/darwin-x64/version.txt</file>
</transformer>
</transformers>
</configuration>
</execution>
<execution>
<id>linux-arm64</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>linux-arm64</shadedClassifierName>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<manifestEntries>
<!-- This is used to get plugin version at runtime using getPackage().getImplementationVersion() -->
<Implementation-Version>${project.version}</Implementation-Version>
</manifestEntries>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
<resource>linux-arm64/node.xz</resource>
<file>${project.build.directory}/downloads/runtimes/linux-arm64/bin/node.xz</file>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
<resource>linux-arm64/version.txt</resource>
<file>${project.build.directory}/downloads/runtimes/linux-arm64/version.txt</file>
</transformer>
</transformers>
</configuration>
</execution>
<execution>
<id>multi</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>multi</shadedClassifierName>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<manifestEntries>
<!-- This is used to get plugin version at runtime using getPackage().getImplementationVersion() -->
<Implementation-Version>${project.version}</Implementation-Version>
</manifestEntries>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
<resource>win-x64/node.exe.xz</resource>
<file>${project.build.directory}/downloads/runtimes/win-x64/node.exe.xz</file>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
<resource>win-x64/version.txt</resource>
<file>${project.build.directory}/downloads/runtimes/win-x64/version.txt</file>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
<resource>linux-x64/node.xz</resource>
<file>${project.build.directory}/downloads/runtimes/linux-x64/bin/node.xz</file>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
<resource>linux-x64/version.txt</resource>
<file>${project.build.directory}/downloads/runtimes/linux-x64/version.txt</file>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
<resource>linux-x64-musl/node.xz</resource>
<file>${project.build.directory}/downloads/runtimes/linux-x64-musl/bin/node.xz</file>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
<resource>linux-x64-musl/version.txt</resource>
<file>${project.build.directory}/downloads/runtimes/linux-x64-musl/version.txt</file>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
<resource>darwin-arm64/node.xz</resource>
<file>${project.build.directory}/downloads/runtimes/darwin-arm64/bin/node.xz</file>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
<resource>darwin-arm64/version.txt</resource>
<file>${project.build.directory}/downloads/runtimes/darwin-arm64/version.txt</file>
</transformer>
</transformers>
</configuration>
</execution>
<!-- what is the purpose of this step -->
<execution>
<id>Add manifest entries</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<shadedArtifactAttached>false</shadedArtifactAttached>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<manifestEntries>
<!-- This is used to get the plugin version at runtime using getPackage().getImplementationVersion() -->
<Implementation-Version>${project.version}</Implementation-Version>
<NodeJs-Min-Version>${node.min.version}</NodeJs-Min-Version>
</manifestEntries>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>enforce-plugin-size</id>
<goals>
<goal>enforce</goal>
</goals>
<phase>verify</phase>
<configuration>
<rules>
<requireFilesSize>
<minsize>100000000</minsize>
<maxsize>120000000</maxsize>
<files>
<file>${project.build.directory}/${project.build.finalName}-multi.jar</file>
</files>
</requireFilesSize>
<requireFilesSize>
<minsize>25000000</minsize>
<maxsize>55000000</maxsize>
<files>
<file>${project.build.directory}/${project.build.finalName}-linux-x64.jar</file>
<file>${project.build.directory}/${project.build.finalName}-linux-x64-musl.jar</file>
<file>${project.build.directory}/${project.build.finalName}-win-x64.jar</file>
<file>${project.build.directory}/${project.build.finalName}-darwin-arm64.jar</file>
</files>
</requireFilesSize>
<requireFilesSize>
<minsize>8000000</minsize>
<maxsize>15000000</maxsize>
<files>
<file>${project.build.directory}/${project.build.finalName}.jar</file>
</files>
</requireFilesSize>
</rules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>license-regeneration</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>2.7.0</version>
<configuration>
<errorRemedy>failFast</errorRemedy>
<writeVersions>false</writeVersions>
<licensesOutputDirectory>${project.basedir}/src/main/resources/licenses/THIRD_PARTY_LICENSES</licensesOutputDirectory>
<licensesOutputFile>${project.build.directory}/licenses.xml</licensesOutputFile>
<organizeLicensesByDependencies>true</organizeLicensesByDependencies>
<licenseUrlReplacements>
<licenseUrlReplacement>
<regexp>https?://www.apache.org/licenses/LICENSE-2.0.txt</regexp>
<replacement>file://${basedir}/src/main/license-resources/Apache-2.0.txt</replacement>
</licenseUrlReplacement>
<licenseUrlReplacement>
<regexp>https://asm.ow2.io/license.html</regexp>
<replacement>https://gitlab.ow2.org/asm/asm/-/raw/master/LICENSE.txt</replacement>
</licenseUrlReplacement>
<licenseUrlReplacement>
<regexp>https://opensource.org/licenses/BSD-3-Clause</regexp>
<replacement>https://spdx.org/licenses/BSD-3-Clause.txt</replacement>
</licenseUrlReplacement>
<licenseUrlReplacement>
<regexp>https://github.com/TooTallNate/Java-WebSocket/blob/master/LICENSE</regexp>
<replacement>https://raw.githubusercontent.com/TooTallNate/Java-WebSocket/refs/heads/master/LICENSE</replacement>
</licenseUrlReplacement>
<licenseUrlReplacement>
<regexp>https://opensource.org/license/mit</regexp>
<replacement>https://spdx.org/licenses/MIT.txt</replacement>
</licenseUrlReplacement>
<licenseUrlReplacement>
<regexp>http://www.gnu.org/licenses/lgpl.txt</regexp>
<replacement>https://spdx.org/licenses/LGPL-3.0.txt</replacement>
</licenseUrlReplacement>
</licenseUrlReplacements>
<licensesConfigFile>${project.basedir}/src/main/license-resources/missing-licenses-config-file.xml</licensesConfigFile>
<licenseUrlFileNameSanitizers>
<LicenseUrlReplacement>
<regexp>_.*\.txt</regexp>
</LicenseUrlReplacement>
<!-- Append -LICENSE.txt -->
<LicenseUrlReplacement>
<regexp>$</regexp>
<replacement>-LICENSE.txt</replacement>
</LicenseUrlReplacement>
</licenseUrlFileNameSanitizers>
</configuration>
<executions>
<execution>
<id>download-licenses</id>
<goals>
<goal>download-licenses</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.1</version>
<executions>
<execution>
<id>copy-main-license</id>
<phase>generate-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<resources>
<resource>
<directory>../..</directory>
<includes>
<include>LICENSE.txt</include>
</includes>
</resource>
</resources>
<outputDirectory>src/main/resources/licenses</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>check-license-files</id>
<phase>verify</phase>
<configuration>
<target>
<fileset id="invalid.files" dir="${project.build.outputDirectory}/licenses">
<exclude name="**/*.txt"/>
<include name="**/*"/>
</fileset>
<condition property="has.invalid.files">
<resourcecount refid="invalid.files" when="greater" count="0"/>
</condition>
<fail message="There are files in ${project.build.outputDirectory}/licenses that do not end with .txt">
<condition>
<isset property="has.invalid.files"/>
</condition>
</fail>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>