[dist] Remove unnecessary exclusion for pmd-cli:sh:completion

Note: java and javascript are needed for tests in cli

Refs #4594
This commit is contained in:
Andreas Dangel
2024-02-22 12:16:34 +01:00
parent decb759a8f
commit 474274e129
3 changed files with 27 additions and 21 deletions

View File

@ -29,18 +29,6 @@
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<!--
Language Modules as runtime dependencies.
Needed for autocompletion of languages.
-->
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-languages-deps</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>runtime</scope>
</dependency>
<!-- Needed for Designer command --> <!-- Needed for Designer command -->
<dependency> <dependency>
<groupId>net.sourceforge.pmd</groupId> <groupId>net.sourceforge.pmd</groupId>
@ -68,6 +56,19 @@
<groupId>org.checkerframework</groupId> <groupId>org.checkerframework</groupId>
<artifactId>checker-qual</artifactId> <artifactId>checker-qual</artifactId>
</dependency> </dependency>
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-java</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-javascript</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency> <dependency>
<groupId>org.hamcrest</groupId> <groupId>org.hamcrest</groupId>
<artifactId>hamcrest</artifactId> <artifactId>hamcrest</artifactId>

View File

@ -17,6 +17,8 @@ import java.nio.file.Files;
import java.nio.file.Path; import java.nio.file.Path;
import java.nio.file.Paths; import java.nio.file.Paths;
import java.util.Collection; import java.util.Collection;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -28,7 +30,6 @@ import net.sourceforge.pmd.cli.internal.CliExitCode;
import net.sourceforge.pmd.internal.Slf4jSimpleConfiguration; import net.sourceforge.pmd.internal.Slf4jSimpleConfiguration;
import com.github.stefanbirkner.systemlambda.SystemLambda; import com.github.stefanbirkner.systemlambda.SystemLambda;
import com.google.common.collect.ImmutableMap;
class CpdCliTest extends BaseCliTest { class CpdCliTest extends BaseCliTest {
@ -36,12 +37,17 @@ class CpdCliTest extends BaseCliTest {
private static final String SRC_DIR = BASE_RES_PATH + "files/"; private static final String SRC_DIR = BASE_RES_PATH + "files/";
private static final Path SRC_PATH = Paths.get(SRC_DIR).toAbsolutePath(); private static final Path SRC_PATH = Paths.get(SRC_DIR).toAbsolutePath();
private static final Map<String, Integer> NUMBER_OF_TOKENS = ImmutableMap.of( private static final Map<String, Integer> NUMBER_OF_TOKENS;
SRC_PATH.resolve("dup1.java").toString(), 89,
SRC_PATH.resolve("dup2.java").toString(), 89, static {
SRC_PATH.resolve("fileWith_ISO8859_1_Encoding.java").toString(), 5, Map<String, Integer> map = new LinkedHashMap<>();
SRC_PATH.resolve("fileWith_UTF_8_BOM_Encoding.java").toString(), 5 map.put(SRC_PATH.resolve("dup1.java").toString(), 89);
); map.put(SRC_PATH.resolve("dup2.java").toString(), 89);
map.put(SRC_PATH.resolve("fileWith_ISO8859_1_Encoding.java").toString(), 5);
map.put(SRC_PATH.resolve("fileWith_UTF_8_BOM_Encoding.java").toString(), 5);
NUMBER_OF_TOKENS = Collections.unmodifiableMap(map);
}
@TempDir @TempDir
private Path tempDir; private Path tempDir;

View File

@ -12,7 +12,7 @@
<fileSets> <fileSets>
<fileSet> <fileSet>
<includes> <includes>
<include>*.bat</include> <include>pmd.bat</include>
</includes> </includes>
<directory>target/extra-resources/scripts</directory> <directory>target/extra-resources/scripts</directory>
<outputDirectory>bin</outputDirectory> <outputDirectory>bin</outputDirectory>
@ -68,7 +68,6 @@
<scope>runtime</scope> <scope>runtime</scope>
<excludes> <excludes>
<exclude>net.sourceforge.pmd:pmd-apex-jorje:pom</exclude> <exclude>net.sourceforge.pmd:pmd-apex-jorje:pom</exclude>
<exclude>net.sourceforge.pmd:pmd-cli:sh:completion:*</exclude>
<exclude>net.sourceforge.pmd:pmd-languages-deps:pom</exclude> <exclude>net.sourceforge.pmd:pmd-languages-deps:pom</exclude>
</excludes> </excludes>
<outputDirectory>lib</outputDirectory> <outputDirectory>lib</outputDirectory>