mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-17 02:31:14 +01:00
Verify pending plugins on startup
This commit is contained in:
@@ -80,7 +80,7 @@ public class DefaultPluginManager implements PluginManager {
|
|||||||
this.eventBus = eventBus;
|
this.eventBus = eventBus;
|
||||||
|
|
||||||
this.computeInstallationDependencies();
|
this.computeInstallationDependencies();
|
||||||
this.contextFactory = (availablePlugins -> PluginInstallationContext.of(getInstalled(), availablePlugins));
|
this.contextFactory = (availablePlugins -> PluginInstallationContext.from(getInstalled(), availablePlugins));
|
||||||
}
|
}
|
||||||
|
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
|
|||||||
@@ -30,11 +30,9 @@ import com.google.common.base.Function;
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
//~--- JDK imports ------------------------------------------------------------
|
|
||||||
|
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
|
|
||||||
import java.util.Set;
|
//~--- JDK imports ------------------------------------------------------------
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The ExplodedSmp object represents an extracted SCM-Manager plugin. The object
|
* The ExplodedSmp object represents an extracted SCM-Manager plugin. The object
|
||||||
|
|||||||
@@ -41,18 +41,30 @@ public final class PluginInstallationContext {
|
|||||||
return new PluginInstallationContext(Collections.emptyMap());
|
return new PluginInstallationContext(Collections.emptyMap());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static PluginInstallationContext of(Iterable<InstalledPlugin> installed, Iterable<AvailablePlugin> pending) {
|
public static PluginInstallationContext fromDescriptors(Iterable<? extends PluginDescriptor> installed, Iterable<? extends PluginDescriptor> pending) {
|
||||||
Map<String, NameAndVersion> dependencies = new HashMap<>();
|
Map<String, NameAndVersion> dependencies = new HashMap<>();
|
||||||
append(dependencies, installed);
|
appendDescriptors(dependencies, installed);
|
||||||
append(dependencies, pending);
|
appendDescriptors(dependencies, pending);
|
||||||
return new PluginInstallationContext(dependencies);
|
return new PluginInstallationContext(dependencies);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static <P extends Plugin> void append(Map<String, NameAndVersion> dependencies, Iterable<P> plugins) {
|
public static PluginInstallationContext from(Iterable<? extends Plugin> installed, Iterable<? extends Plugin> pending) {
|
||||||
for (Plugin plugin : plugins) {
|
Map<String, NameAndVersion> dependencies = new HashMap<>();
|
||||||
PluginInformation information = plugin.getDescriptor().getInformation();
|
appendPlugins(dependencies, installed);
|
||||||
dependencies.put(information.getName(), new NameAndVersion(information.getName(), information.getVersion()));
|
appendPlugins(dependencies, pending);
|
||||||
|
return new PluginInstallationContext(dependencies);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static <P extends PluginDescriptor> void appendDescriptors(Map<String, NameAndVersion> dependencies, Iterable<P> descriptors) {
|
||||||
|
descriptors.forEach(desc -> appendPlugins(dependencies, desc.getInformation()));
|
||||||
|
}
|
||||||
|
|
||||||
|
private static <P extends Plugin> void appendPlugins(Map<String, NameAndVersion> dependencies, Iterable<P> plugins) {
|
||||||
|
plugins.forEach(plugin -> appendPlugins(dependencies, plugin.getDescriptor().getInformation()));
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void appendPlugins(Map<String, NameAndVersion> dependencies, PluginInformation information) {
|
||||||
|
dependencies.put(information.getName(), new NameAndVersion(information.getName(), information.getVersion()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public Optional<NameAndVersion> find(String name) {
|
public Optional<NameAndVersion> find(String name) {
|
||||||
|
|||||||
@@ -35,7 +35,6 @@ import com.google.common.hash.Hashing;
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import sonia.scm.lifecycle.classloading.ClassLoaderLifeCycle;
|
import sonia.scm.lifecycle.classloading.ClassLoaderLifeCycle;
|
||||||
import sonia.scm.plugin.ExplodedSmp.PathTransformer;
|
|
||||||
|
|
||||||
import javax.xml.bind.JAXBContext;
|
import javax.xml.bind.JAXBContext;
|
||||||
import javax.xml.bind.JAXBException;
|
import javax.xml.bind.JAXBException;
|
||||||
@@ -50,11 +49,14 @@ import java.nio.file.Path;
|
|||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.function.Predicate;
|
import java.util.function.Predicate;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import static java.util.stream.Collectors.toList;
|
import static java.util.stream.Collectors.toSet;
|
||||||
|
|
||||||
//~--- JDK imports ------------------------------------------------------------
|
//~--- JDK imports ------------------------------------------------------------
|
||||||
|
|
||||||
@@ -162,25 +164,16 @@ public final class PluginProcessor
|
|||||||
{
|
{
|
||||||
logger.info("collect plugins");
|
logger.info("collect plugins");
|
||||||
|
|
||||||
Set<Path> archives = collect(pluginDirectory, new PluginArchiveFilter());
|
Set<ExplodedSmp> installedPlugins = findInstalledPlugins();
|
||||||
|
logger.debug("found {} installed plugins", installedPlugins.size());
|
||||||
|
|
||||||
logger.debug("extract {} archives", archives.size());
|
Set<ExplodedSmp> newlyInstalledPlugins = installPending(installedPlugins);
|
||||||
|
logger.debug("finished installation of {} plugins", newlyInstalledPlugins.size());
|
||||||
|
|
||||||
extract(archives);
|
Set<ExplodedSmp> plugins = concat(installedPlugins, newlyInstalledPlugins);
|
||||||
|
|
||||||
List<Path> dirs =
|
|
||||||
collectPluginDirectories(pluginDirectory)
|
|
||||||
.stream()
|
|
||||||
.filter(isPluginDirectory())
|
|
||||||
.collect(toList());
|
|
||||||
|
|
||||||
logger.debug("process {} directories: {}", dirs.size(), dirs);
|
|
||||||
|
|
||||||
List<ExplodedSmp> smps = Lists.transform(dirs, new PathTransformer());
|
|
||||||
|
|
||||||
logger.trace("start building plugin tree");
|
logger.trace("start building plugin tree");
|
||||||
|
PluginTree pluginTree = new PluginTree(plugins);
|
||||||
PluginTree pluginTree = new PluginTree(smps);
|
|
||||||
|
|
||||||
logger.info("install plugin tree:\n{}", pluginTree);
|
logger.info("install plugin tree:\n{}", pluginTree);
|
||||||
|
|
||||||
@@ -195,6 +188,46 @@ public final class PluginProcessor
|
|||||||
return ImmutableSet.copyOf(wrappers);
|
return ImmutableSet.copyOf(wrappers);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private ImmutableSet<ExplodedSmp> concat(Set<ExplodedSmp> installedPlugins, Set<ExplodedSmp> newlyInstalledPlugins) {
|
||||||
|
return ImmutableSet.<ExplodedSmp>builder().addAll(installedPlugins).addAll(newlyInstalledPlugins).build();
|
||||||
|
}
|
||||||
|
|
||||||
|
private Set<ExplodedSmp> installPending(Set<ExplodedSmp> installedPlugins) throws IOException {
|
||||||
|
Set<Path> archives = collect(pluginDirectory, new PluginArchiveFilter());
|
||||||
|
logger.debug("start installation of {} pending archives", archives.size());
|
||||||
|
|
||||||
|
Map<Path, InstalledPluginDescriptor> pending = new HashMap<>();
|
||||||
|
for (Path archive : archives) {
|
||||||
|
pending.put(archive, SmpDescriptorExtractor.extractPluginDescriptor(archive));
|
||||||
|
}
|
||||||
|
|
||||||
|
PluginInstallationContext installationContext = PluginInstallationContext.fromDescriptors(
|
||||||
|
installedPlugins.stream().map(ExplodedSmp::getPlugin).collect(toSet()),
|
||||||
|
pending.values()
|
||||||
|
);
|
||||||
|
|
||||||
|
for (Map.Entry<Path, InstalledPluginDescriptor> entry : pending.entrySet()) {
|
||||||
|
try {
|
||||||
|
PluginInstallationVerifier.verify(installationContext, entry.getValue());
|
||||||
|
} catch (PluginException ex) {
|
||||||
|
Path path = entry.getKey();
|
||||||
|
logger.error("failed to install smp {}, because it could not be verified", path);
|
||||||
|
logger.error("to restore scm-manager functionality remove the smp file {} from the plugin directory", path);
|
||||||
|
throw ex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return extract(archives);
|
||||||
|
}
|
||||||
|
|
||||||
|
private Set<ExplodedSmp> findInstalledPlugins() throws IOException {
|
||||||
|
return collectPluginDirectories(pluginDirectory)
|
||||||
|
.stream()
|
||||||
|
.filter(isPluginDirectory())
|
||||||
|
.map(ExplodedSmp::create)
|
||||||
|
.collect(Collectors.toSet());
|
||||||
|
}
|
||||||
|
|
||||||
private Predicate<Path> isPluginDirectory() {
|
private Predicate<Path> isPluginDirectory() {
|
||||||
return dir -> Files.exists(dir.resolve(DIRECTORY_METAINF).resolve("scm").resolve("plugin.xml"));
|
return dir -> Files.exists(dir.resolve(DIRECTORY_METAINF).resolve("scm").resolve("plugin.xml"));
|
||||||
}
|
}
|
||||||
@@ -505,10 +538,12 @@ public final class PluginProcessor
|
|||||||
*
|
*
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
private void extract(Iterable<Path> archives) throws IOException
|
private Set<ExplodedSmp> extract(Iterable<Path> archives) throws IOException
|
||||||
{
|
{
|
||||||
logger.debug("extract archives");
|
logger.debug("extract archives");
|
||||||
|
|
||||||
|
ImmutableSet.Builder<ExplodedSmp> extracted = ImmutableSet.builder();
|
||||||
|
|
||||||
for (Path archive : archives)
|
for (Path archive : archives)
|
||||||
{
|
{
|
||||||
File archiveFile = archive.toFile();
|
File archiveFile = archive.toFile();
|
||||||
@@ -519,17 +554,18 @@ public final class PluginProcessor
|
|||||||
|
|
||||||
logger.debug("extract plugin {}", smp.getPlugin());
|
logger.debug("extract plugin {}", smp.getPlugin());
|
||||||
|
|
||||||
File directory =
|
File directory = PluginsInternal.createPluginDirectory(pluginDirectory.toFile(), smp.getPlugin());
|
||||||
PluginsInternal.createPluginDirectory(pluginDirectory.toFile(),
|
|
||||||
smp.getPlugin());
|
|
||||||
|
|
||||||
String checksum = com.google.common.io.Files.hash(archiveFile,
|
String checksum = com.google.common.io.Files.hash(archiveFile, Hashing.sha256()).toString();
|
||||||
Hashing.sha256()).toString();
|
|
||||||
File checksumFile = PluginsInternal.getChecksumFile(directory);
|
File checksumFile = PluginsInternal.getChecksumFile(directory);
|
||||||
|
|
||||||
PluginsInternal.extract(smp, checksum, directory, checksumFile, false);
|
PluginsInternal.extract(smp, checksum, directory, checksumFile, false);
|
||||||
moveArchive(archive);
|
moveArchive(archive);
|
||||||
|
|
||||||
|
extracted.add(ExplodedSmp.create(directory.toPath()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return extracted.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ import org.slf4j.Logger;
|
|||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Collection;
|
||||||
import java.util.LinkedHashSet;
|
import java.util.LinkedHashSet;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -71,7 +72,7 @@ public final class PluginTree
|
|||||||
*
|
*
|
||||||
* @param smps
|
* @param smps
|
||||||
*/
|
*/
|
||||||
public PluginTree(List<ExplodedSmp> smps)
|
public PluginTree(Collection<ExplodedSmp> smps)
|
||||||
{
|
{
|
||||||
|
|
||||||
smps.forEach(s -> {
|
smps.forEach(s -> {
|
||||||
|
|||||||
@@ -33,9 +33,12 @@ import java.nio.file.Path;
|
|||||||
import java.util.zip.ZipEntry;
|
import java.util.zip.ZipEntry;
|
||||||
import java.util.zip.ZipInputStream;
|
import java.util.zip.ZipInputStream;
|
||||||
|
|
||||||
class SmpDescriptorExtractor {
|
final class SmpDescriptorExtractor {
|
||||||
|
|
||||||
InstalledPluginDescriptor extractPluginDescriptor(Path file) throws IOException {
|
private SmpDescriptorExtractor() {
|
||||||
|
}
|
||||||
|
|
||||||
|
static InstalledPluginDescriptor extractPluginDescriptor(Path file) throws IOException {
|
||||||
try (ZipInputStream zipInputStream = new ZipInputStream(Files.newInputStream(file), StandardCharsets.UTF_8)) {
|
try (ZipInputStream zipInputStream = new ZipInputStream(Files.newInputStream(file), StandardCharsets.UTF_8)) {
|
||||||
ZipEntry nextEntry;
|
ZipEntry nextEntry;
|
||||||
while ((nextEntry = zipInputStream.getNextEntry()) != null) {
|
while ((nextEntry = zipInputStream.getNextEntry()) != null) {
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ class PluginInstallationContextTest {
|
|||||||
Set<InstalledPlugin> installed = installed("scm-git-plugin", "1.0.0");
|
Set<InstalledPlugin> installed = installed("scm-git-plugin", "1.0.0");
|
||||||
Set<AvailablePlugin> pending = Collections.emptySet();
|
Set<AvailablePlugin> pending = Collections.emptySet();
|
||||||
|
|
||||||
PluginInstallationContext context = PluginInstallationContext.of(installed, pending);
|
PluginInstallationContext context = PluginInstallationContext.from(installed, pending);
|
||||||
Optional<NameAndVersion> plugin = context.find("scm-git-plugin");
|
Optional<NameAndVersion> plugin = context.find("scm-git-plugin");
|
||||||
assertThat(plugin).contains(new NameAndVersion("scm-git-plugin", "1.0.0"));
|
assertThat(plugin).contains(new NameAndVersion("scm-git-plugin", "1.0.0"));
|
||||||
}
|
}
|
||||||
@@ -55,7 +55,7 @@ class PluginInstallationContextTest {
|
|||||||
Set<InstalledPlugin> installed = Collections.emptySet();
|
Set<InstalledPlugin> installed = Collections.emptySet();
|
||||||
Set<AvailablePlugin> pending = pending("scm-hg-plugin", "1.0.0");
|
Set<AvailablePlugin> pending = pending("scm-hg-plugin", "1.0.0");
|
||||||
|
|
||||||
PluginInstallationContext context = PluginInstallationContext.of(installed, pending);
|
PluginInstallationContext context = PluginInstallationContext.from(installed, pending);
|
||||||
Optional<NameAndVersion> plugin = context.find("scm-hg-plugin");
|
Optional<NameAndVersion> plugin = context.find("scm-hg-plugin");
|
||||||
assertThat(plugin).contains(new NameAndVersion("scm-hg-plugin", "1.0.0"));
|
assertThat(plugin).contains(new NameAndVersion("scm-hg-plugin", "1.0.0"));
|
||||||
}
|
}
|
||||||
@@ -65,7 +65,7 @@ class PluginInstallationContextTest {
|
|||||||
Set<InstalledPlugin> installed = installed("scm-svn-plugin", "1.1.0");
|
Set<InstalledPlugin> installed = installed("scm-svn-plugin", "1.1.0");
|
||||||
Set<AvailablePlugin> pending = pending("scm-svn-plugin", "1.2.0");
|
Set<AvailablePlugin> pending = pending("scm-svn-plugin", "1.2.0");
|
||||||
|
|
||||||
PluginInstallationContext context = PluginInstallationContext.of(installed, pending);
|
PluginInstallationContext context = PluginInstallationContext.from(installed, pending);
|
||||||
Optional<NameAndVersion> plugin = context.find("scm-svn-plugin");
|
Optional<NameAndVersion> plugin = context.find("scm-svn-plugin");
|
||||||
assertThat(plugin).contains(new NameAndVersion("scm-svn-plugin", "1.2.0"));
|
assertThat(plugin).contains(new NameAndVersion("scm-svn-plugin", "1.2.0"));
|
||||||
}
|
}
|
||||||
@@ -75,24 +75,41 @@ class PluginInstallationContextTest {
|
|||||||
Set<InstalledPlugin> installed = Collections.emptySet();
|
Set<InstalledPlugin> installed = Collections.emptySet();
|
||||||
Set<AvailablePlugin> pending = Collections.emptySet();
|
Set<AvailablePlugin> pending = Collections.emptySet();
|
||||||
|
|
||||||
PluginInstallationContext context = PluginInstallationContext.of(installed, pending);
|
PluginInstallationContext context = PluginInstallationContext.from(installed, pending);
|
||||||
Optional<NameAndVersion> plugin = context.find("scm-legacy-plugin");
|
Optional<NameAndVersion> plugin = context.find("scm-legacy-plugin");
|
||||||
assertThat(plugin).isEmpty();
|
assertThat(plugin).isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void shouldCreateContextFromDescriptor() {
|
||||||
|
Set<InstalledPluginDescriptor> installed = mockDescriptor(InstalledPluginDescriptor.class, "scm-svn-plugin", "1.1.0");
|
||||||
|
Set<AvailablePluginDescriptor> pending = mockDescriptor(AvailablePluginDescriptor.class, "scm-svn-plugin", "1.2.0");
|
||||||
|
|
||||||
|
PluginInstallationContext context = PluginInstallationContext.fromDescriptors(installed, pending);
|
||||||
|
Optional<NameAndVersion> plugin = context.find("scm-svn-plugin");
|
||||||
|
assertThat(plugin).contains(new NameAndVersion("scm-svn-plugin", "1.2.0"));
|
||||||
|
}
|
||||||
|
|
||||||
private Set<InstalledPlugin> installed(String name, String version) {
|
private Set<InstalledPlugin> installed(String name, String version) {
|
||||||
return mockSingleton(InstalledPlugin.class, name, version);
|
return mockPlugin(InstalledPlugin.class, name, version);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Set<AvailablePlugin> pending(String name, String version) {
|
private Set<AvailablePlugin> pending(String name, String version) {
|
||||||
return mockSingleton(AvailablePlugin.class, name, version);
|
return mockPlugin(AvailablePlugin.class, name, version);
|
||||||
}
|
}
|
||||||
|
|
||||||
private <P extends Plugin> Set<P> mockSingleton(Class<P> pluginClass, String name, String version) {
|
private <P extends Plugin> Set<P> mockPlugin(Class<P> pluginClass, String name, String version) {
|
||||||
P plugin = mock(pluginClass, Answers.RETURNS_DEEP_STUBS);
|
P plugin = mock(pluginClass, Answers.RETURNS_DEEP_STUBS);
|
||||||
when(plugin.getDescriptor().getInformation().getName()).thenReturn(name);
|
when(plugin.getDescriptor().getInformation().getName()).thenReturn(name);
|
||||||
when(plugin.getDescriptor().getInformation().getVersion()).thenReturn(version);
|
when(plugin.getDescriptor().getInformation().getVersion()).thenReturn(version);
|
||||||
return Collections.singleton(plugin);
|
return Collections.singleton(plugin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private <D extends PluginDescriptor> Set<D> mockDescriptor(Class<D> descriptorClass, String name, String version) {
|
||||||
|
D desc = mock(descriptorClass, Answers.RETURNS_DEEP_STUBS);
|
||||||
|
when(desc.getInformation().getName()).thenReturn(name);
|
||||||
|
when(desc.getInformation().getVersion()).thenReturn(version);
|
||||||
|
return Collections.singleton(desc);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ class SmpDescriptorExtractorTest {
|
|||||||
void shouldExtractPluginXml(@TempDir Path tempDir) throws IOException {
|
void shouldExtractPluginXml(@TempDir Path tempDir) throws IOException {
|
||||||
Path pluginFile = createZipFile(tempDir, "META-INF/scm/plugin.xml", PLUGIN_XML);
|
Path pluginFile = createZipFile(tempDir, "META-INF/scm/plugin.xml", PLUGIN_XML);
|
||||||
|
|
||||||
InstalledPluginDescriptor installedPluginDescriptor = new SmpDescriptorExtractor().extractPluginDescriptor(pluginFile);
|
InstalledPluginDescriptor installedPluginDescriptor = SmpDescriptorExtractor.extractPluginDescriptor(pluginFile);
|
||||||
|
|
||||||
Assertions.assertThat(installedPluginDescriptor.getInformation().getName()).isEqualTo("scm-test-plugin");
|
Assertions.assertThat(installedPluginDescriptor.getInformation().getName()).isEqualTo("scm-test-plugin");
|
||||||
}
|
}
|
||||||
@@ -76,14 +76,14 @@ class SmpDescriptorExtractorTest {
|
|||||||
void shouldFailWithoutPluginXml(@TempDir Path tempDir) throws IOException {
|
void shouldFailWithoutPluginXml(@TempDir Path tempDir) throws IOException {
|
||||||
Path pluginFile = createZipFile(tempDir, "META-INF/wrong/plugin.xml", PLUGIN_XML);
|
Path pluginFile = createZipFile(tempDir, "META-INF/wrong/plugin.xml", PLUGIN_XML);
|
||||||
|
|
||||||
assertThrows(IOException.class, () -> new SmpDescriptorExtractor().extractPluginDescriptor(pluginFile));
|
assertThrows(IOException.class, () -> SmpDescriptorExtractor.extractPluginDescriptor(pluginFile));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void shouldFailWithIllegalPluginXml(@TempDir Path tempDir) throws IOException {
|
void shouldFailWithIllegalPluginXml(@TempDir Path tempDir) throws IOException {
|
||||||
Path pluginFile = createZipFile(tempDir, "META-INF/scm/plugin.xml", "<not><parsable>content</parsable></not>");
|
Path pluginFile = createZipFile(tempDir, "META-INF/scm/plugin.xml", "<not><parsable>content</parsable></not>");
|
||||||
|
|
||||||
assertThrows(IOException.class, () -> new SmpDescriptorExtractor().extractPluginDescriptor(pluginFile));
|
assertThrows(IOException.class, () -> SmpDescriptorExtractor.extractPluginDescriptor(pluginFile));
|
||||||
}
|
}
|
||||||
|
|
||||||
Path createZipFile(Path tempDir, String internalFileName, String content) throws IOException {
|
Path createZipFile(Path tempDir, String internalFileName, String content) throws IOException {
|
||||||
|
|||||||
Reference in New Issue
Block a user