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 22, 2024
1 parent 9325a3c commit 8c54312
Show file tree
Hide file tree
Showing 3 changed files with 150 additions and 68 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:

strategy:
matrix:
java-version: [ 11 ]
java-version: [ 11, 17 ]

steps:
- uses: actions/checkout@v4
Expand Down
195 changes: 128 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 @@ -107,10 +107,12 @@
<properties>
<htl.version>1.1.2-1.4.0</htl.version>
<sonar.html.version>3.3.0.2534</sonar.html.version>
<sonar.java.plugin>8.5.0.37199</sonar.java.plugin>
<sonar.java.plugin>7.30.1.34514</sonar.java.plugin>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<sonar.apiVersion>10.11.0.2468</sonar.apiVersion>
<sonar.apiImplVersion>10.3.0.82913</sonar.apiImplVersion>
<sonar.testingHarnessVersion>10.7.0.96327</sonar.testingHarnessVersion>
<sonar.javaCheksTestkitVersion>7.30.1.34514</sonar.javaCheksTestkitVersion>
<jdk.min.version>11</jdk.min.version>
<sonar.sources>src/main/java,src/main/js</sonar.sources>
<coveralls.repo.token>4rVf3NGV0jyQ3EGrc8L86oEDoHWm6MgDD</coveralls.repo.token>
Expand All @@ -131,217 +133,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>${sonar.javaCheksTestkitVersion}</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 +359,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 Down Expand Up @@ -434,6 +435,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 8c54312

Please sign in to comment.