Skip to content

Commit

Permalink
Adjust main pom file
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasz-strzelecki-vml committed Oct 21, 2024
1 parent 6a21159 commit a6bf08b
Show file tree
Hide file tree
Showing 3 changed files with 149 additions and 68 deletions.
2 changes: 1 addition & 1 deletion .github/actions/test-plugin-installation/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ inputs:
aem-rules-binary:
description: "Name of the JAR file to copy from Maven's 'target' directory into the plugins directory"
required: true
default: 'sonar-aemrules-plugin-1.8-SNAPSHOT.jar'
default: 'sonar-aemrules-plugin-1.7-SNAPSHOT.jar'
docker-hub-login:
description: 'Docker Hub username for which an access token has been generated'
required: true
Expand Down
194 changes: 127 additions & 67 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<groupId>com.vml.aemrules</groupId>
<artifactId>sonar-aemrules-plugin</artifactId>
<packaging>sonar-plugin</packaging>
<version>1.8-SNAPSHOT</version>
<version>1.7-SNAPSHOT</version>

<name>AEM Rules for SonarQube</name>
<description>SonarQube plugin with set of rules detecting possible bugs and bad smells specific for AEM
Expand Down Expand Up @@ -110,6 +110,7 @@
<sonar.java.plugin>8.5.0.37199</sonar.java.plugin>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<sonar.apiVersion>10.11.0.2468</sonar.apiVersion>
<sonar.apiImplVersion>10.6.0.92116</sonar.apiImplVersion>
<sonar.testingHarnessVersion>10.7.0.96327</sonar.testingHarnessVersion>
<jdk.min.version>17</jdk.min.version>
<sonar.sources>src/main/java,src/main/js</sonar.sources>
Expand All @@ -131,217 +132,217 @@
<dependencies>
<!-- sonarsource version -->
<dependency>
<groupId>org.sonarsource.api.plugin</groupId>
<artifactId>sonar-plugin-api</artifactId>
<version>${sonar.apiVersion}</version>
<groupId>org.sonarsource.api.plugin</groupId>
<scope>provided</scope>
<version>${sonar.apiVersion}</version>
</dependency>
<dependency>
<groupId>org.sonarsource.html</groupId>
<artifactId>sonar-html-plugin</artifactId>
<version>${sonar.html.version}</version>
<exclusions>
<exclusion>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<groupId>com.google.guava</groupId>
</exclusion>
</exclusions>
<groupId>org.sonarsource.html</groupId>
<version>${sonar.html.version}</version>
</dependency>
<dependency>
<groupId>org.sonarsource.sslr-squid-bridge</groupId>
<artifactId>sslr-squid-bridge</artifactId>
<version>2.6.1</version>
<exclusions>
<exclusion>
<groupId>org.codehaus.sonar.sslr</groupId>
<artifactId>sslr-core</artifactId>
<groupId>org.codehaus.sonar.sslr</groupId>
</exclusion>
<exclusion>
<groupId>org.codehaus.sonar</groupId>
<artifactId>sonar-plugin-api</artifactId>
<groupId>org.codehaus.sonar</groupId>
</exclusion>
<exclusion>
<groupId>org.codehaus.sonar.sslr</groupId>
<artifactId>sslr-xpath</artifactId>
<groupId>org.codehaus.sonar.sslr</groupId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<groupId>org.slf4j</groupId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<groupId>org.slf4j</groupId>
</exclusion>
</exclusions>
<groupId>org.sonarsource.sslr-squid-bridge</groupId>
<version>2.6.1</version>
</dependency>
<dependency>
<groupId>org.sonarsource.java</groupId>
<artifactId>sonar-java-plugin</artifactId>
<type>sonar-plugin</type>
<version>${sonar.java.plugin}</version>
<exclusions>
<exclusion>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<groupId>com.google.guava</groupId>
</exclusion>
</exclusions>
<groupId>org.sonarsource.java</groupId>
<type>sonar-plugin</type>
<version>${sonar.java.plugin}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<groupId>org.apache.commons</groupId>
<version>3.17.0</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<groupId>commons-io</groupId>
<version>2.17.0</version>
</dependency>
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<groupId>org.jetbrains</groupId>
<version>26.0.1</version>
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.scripting.sightly.compiler</artifactId>
<groupId>org.apache.sling</groupId>
<version>${htl.version}</version>
</dependency>

<!-- TODO: Check if versions are valid with target AEM version-->
<!-- unit tests -->
<dependency>
<groupId>org.sonarsource.sonarqube</groupId>
<artifactId>sonar-testing-harness</artifactId>
<version>${sonar.testingHarnessVersion}</version>
<groupId>org.sonarsource.sonarqube</groupId>
<scope>test</scope>
<version>${sonar.testingHarnessVersion}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<groupId>junit</groupId>
<scope>test</scope>
<version>4.13.2</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>5.12.0</version>
<groupId>org.mockito</groupId>
<scope>test</scope>
<version>5.12.0</version>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>3.26.0</version>
<groupId>org.assertj</groupId>
<scope>test</scope>
<version>3.26.0</version>
</dependency>
<dependency>
<groupId>org.easytesting</groupId>
<artifactId>fest-assert</artifactId>
<version>1.4</version>
<groupId>org.easytesting</groupId>
<scope>test</scope>
<version>1.4</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.3</version>
<groupId>org.hamcrest</groupId>
<scope>test</scope>
<version>1.3</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>32.0.0-jre</version>
<groupId>com.google.guava</groupId>
<scope>test</scope>
<version>32.0.0-jre</version>
</dependency>
<dependency>
<groupId>org.sonarsource.sonarqube</groupId>
<artifactId>sonar-plugin-api-impl</artifactId>
<version>10.6.0.92116</version>
<groupId>org.sonarsource.sonarqube</groupId>
<scope>test</scope>
<version>${sonar.apiImplVersion}</version>
</dependency>
<dependency>
<groupId>org.sonarsource.java</groupId>
<artifactId>java-checks-testkit</artifactId>
<version>8.4.0.37032</version>
<groupId>org.sonarsource.java</groupId>
<scope>test</scope>
<version>8.4.0.37032</version>
</dependency>
<dependency>
<groupId>org.sonarsource.analyzer-commons</groupId>
<artifactId>sonar-analyzer-commons</artifactId>
<version>2.14.0.3087</version>
<groupId>org.sonarsource.analyzer-commons</groupId>
<scope>test</scope>
<version>2.14.0.3087</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.2.13</version>
<groupId>ch.qos.logback</groupId>
<scope>test</scope>
<version>1.2.13</version>
</dependency>
<dependency>
<groupId>com.adobe.aem</groupId>
<artifactId>aem-api</artifactId>
<version>6.0.0.1</version>
<groupId>com.adobe.aem</groupId>
<scope>test</scope>
<version>6.0.0.1</version>
</dependency>
<dependency>
<groupId>javax.jcr</groupId>
<artifactId>jcr</artifactId>
<version>2.0</version>
<groupId>javax.jcr</groupId>
<scope>test</scope>
<version>2.0</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<groupId>javax.servlet</groupId>
<scope>test</scope>
<version>2.5</version>
</dependency>
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.scr.annotations</artifactId>
<version>1.12.0</version>
<groupId>org.apache.felix</groupId>
<scope>test</scope>
<version>1.12.0</version>
</dependency>
<!-- TODO: Update dependecy with new version-->
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.servlets.resolver</artifactId>
<version>2.3.2</version>
<groupId>org.apache.sling</groupId>
<scope>test</scope>
<version>2.3.2</version>
</dependency>
<!-- TODO: Update dependecy with new version-->
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.api</artifactId>
<version>2.4.0</version>
<groupId>org.apache.sling</groupId>
<scope>test</scope>
<version>2.4.0</version>
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.models.api</artifactId>
<version>1.3.8</version>
<groupId>org.apache.sling</groupId>
<scope>test</scope>
<version>1.3.8</version>
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.query</artifactId>
<version>4.0.2</version>
<groupId>org.apache.sling</groupId>
<scope>test</scope>
<version>4.0.2</version>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
<version>6.0.0</version>
<groupId>org.osgi</groupId>
<scope>test</scope>
<version>6.0.0</version>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.compendium</artifactId>
<version>5.0.0</version>
<groupId>org.osgi</groupId>
<scope>test</scope>
<version>5.0.0</version>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.service.component.annotations</artifactId>
<version>1.5.0</version>
<groupId>org.osgi</groupId>
<scope>test</scope>
<version>1.5.0</version>
</dependency>
</dependencies>

Expand All @@ -357,7 +358,6 @@
<pluginDescription>${project.description}</pluginDescription>
<pluginKey>aemrules</pluginKey>
<pluginClass>com.vml.aemrules.AemRulesSonarPlugin</pluginClass>
<!-- Optional, only if you are sure to support older versions of the plugin API than the one you are compiling against -->
<pluginApiMinVersion>9.9</pluginApiMinVersion>
<pluginIssueTrackerUrl>https://github.com/wttech/AEM-Rules-for-SonarQube/issues
</pluginIssueTrackerUrl>
Expand All @@ -372,7 +372,7 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
<configuration>
<release>11</release>
<release>17</release>
</configuration>
</plugin>
<plugin>
Expand Down Expand Up @@ -434,6 +434,66 @@
<repoToken>${coveralls.repo.token}</repoToken>
</configuration>
</plugin>
<plugin>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>3.0</version>
<configuration>
<skipExistingHeaders>false</skipExistingHeaders>
<header>${basedir}/assets/license-template.txt</header>
<headerDefinitions>
<header>${basedir}/assets/license-header-definition.xml</header>
</headerDefinitions>
<excludes>
<exclude>**/README</exclude>
<exclude>src/main/resources/**</exclude>
<exclude>**/LICENSE.txt</exclude>
<exclude>**.xml</exclude>
<exclude>assets/**</exclude>
<exclude>src/test/resources/htl/HtlCommentsCheck.html</exclude>
<exclude>src/main/js/**</exclude>
<exclude>conf/**</exclude>
<exclude>scripts/**</exclude>
<exclude>.cirrus.yml</exclude>
<exclude>**.yml</exclude>
</excludes>
</configuration>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>format</goal>
</goals>
</execution>
</executions>
</plugin>
<!--
Maven dependency plugin is necessary for JavaCheckVerifier.verifyNoIssue to work properly. It copies
dependencies other than "provided" to test-jars folder.
Warning! If you remove it, tests which call JavaCheckVerifier.verifyNoIssue will
always pass, even if they are incorrect.
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>test-compile</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<excludeScope>provided</excludeScope>
<outputDirectory>${project.build.directory}/test-jars</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>false</overWriteSnapshots>
<overWriteIfNewer>true</overWriteIfNewer>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
Expand Down
Loading

0 comments on commit a6bf08b

Please sign in to comment.