Configure visualforce to require Java 8

pmd-visualforce depends on pmd-apex. pmd-apex relies on Java 8. This change configures pmd-visualforce to also require Java 8.

This is a breaking change that will need to be documented.
This commit is contained in:
Jeff Bartolotta
2020-10-28 15:10:26 -07:00
parent f70b2e44fc
commit 6f7bebcecd
6 changed files with 16 additions and 12 deletions

View File

@@ -12,7 +12,7 @@ author: Tom Copeland, Xavier Le Vourch <xlv@users.sourceforge.net>
* JDK 11 or higher
{% include note.html content="While Java 11 is required for building, running PMD only requires Java 7 (or Java 8 for Apex and the Designer)." %}
{% include note.html content="While Java 11 is required for building, running PMD only requires Java 7 (or Java 8 for Apex, Scala, Visualforce, and the Designer)." %}
Youll need to either check out the source code or download the latest source release. Assuming youve got the latest source release, unzip it to a directory:

View File

@@ -148,11 +148,6 @@
<artifactId>pmd-jsp</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-visualforce</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-kotlin</artifactId>
@@ -264,6 +259,11 @@
<artifactId>pmd-ui</artifactId>
<version>${pmd-designer.version}</version>
</dependency>
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-visualforce</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</profile>
<profile>

View File

@@ -22,9 +22,9 @@ public class AllRulesIT extends AbstractBinaryDistributionTest {
@Parameters
public static Iterable<String> languagesToTest() {
if (PMDExecutor.isJava7Test()) {
// note: apex and scala require java8
// note: apex, scala, and visualforce require java8
return Arrays.asList("java", "javascript", "jsp", "modelica",
"plsql", "pom", "visualforce", "velocitytemplate", "xml", "xsl");
"plsql", "pom", "velocitytemplate", "xml", "xsl");
}
// note: scala and wsdl have no rules
return Arrays.asList("java", "apex", "javascript", "jsp", "modelica",

View File

@@ -25,10 +25,10 @@ public class BinaryDistributionIT extends AbstractBinaryDistributionTest {
private static final String SUPPORTED_LANGUAGES_PMD;
static {
// note: apex and scala require java8
// note: apex, visualforce, and scala require java8
if (PMDExecutor.isJava7Test()) {
SUPPORTED_LANGUAGES_CPD = "Supported languages: [cpp, cs, dart, ecmascript, fortran, go, groovy, java, jsp, kotlin, lua, matlab, modelica, objectivec, perl, php, plsql, python, ruby, swift, vf, xml]";
SUPPORTED_LANGUAGES_PMD = "ecmascript, java, jsp, modelica, plsql, pom, vf, vm, wsdl, xml, xsl";
SUPPORTED_LANGUAGES_CPD = "Supported languages: [cpp, cs, dart, ecmascript, fortran, go, groovy, java, jsp, kotlin, lua, matlab, modelica, objectivec, perl, php, plsql, python, ruby, swift, xml]";
SUPPORTED_LANGUAGES_PMD = "ecmascript, java, jsp, modelica, plsql, pom, vm, wsdl, xml, xsl";
} else {
SUPPORTED_LANGUAGES_CPD = "Supported languages: [apex, cpp, cs, dart, ecmascript, fortran, go, groovy, java, jsp, kotlin, lua, matlab, modelica, objectivec, perl, php, plsql, python, ruby, scala, swift, vf, xml]";
SUPPORTED_LANGUAGES_PMD = "apex, ecmascript, java, jsp, modelica, plsql, pom, scala, vf, vm, wsdl, xml, xsl";

View File

@@ -11,6 +11,10 @@
<relativePath>../</relativePath>
</parent>
<properties>
<java.version>8</java.version>
</properties>
<build>
<resources>
<resource>

View File

@@ -1081,7 +1081,6 @@
<module>pmd-ruby</module>
<module>pmd-swift</module>
<module>pmd-test</module>
<module>pmd-visualforce</module>
<module>pmd-vm</module>
<module>pmd-xml</module>
@@ -1095,5 +1094,6 @@
<module>pmd-scala-modules/pmd-scala-common</module>
<module>pmd-scala-modules/pmd-scala_2.13</module>
<module>pmd-scala-modules/pmd-scala_2.12</module>
<module>pmd-visualforce</module>
</modules>
</project>