Commit c5d752b5 authored by Thomas Mortagne's avatar Thomas Mortagne
Browse files

XCOMMONS-2456: Upgrade to Plexus Archiver 4.4.0

parent b11eae9d
......@@ -942,7 +942,7 @@
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-archiver</artifactId>
<version>4.3.0</version>
<version>4.4.0</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
......
......@@ -32,8 +32,6 @@
import org.apache.maven.it.VerificationException;
import org.apache.maven.it.Verifier;
import org.codehaus.plexus.archiver.zip.ZipUnArchiver;
import org.codehaus.plexus.logging.Logger;
import org.codehaus.plexus.logging.console.ConsoleLogger;
import org.dom4j.Document;
import org.dom4j.io.SAXReader;
import org.junit.jupiter.api.Test;
......@@ -78,7 +76,6 @@ void validPackageXml() throws Exception
// Extract the generated XAR so that we verify its content easily
File xarFile = new File(verifier.getBasedir(), "target/xwiki-commons-tool-xar-plugin-test-1.0.xar");
ZipUnArchiver unarchiver = new ZipUnArchiver(xarFile);
unarchiver.enableLogging(new ConsoleLogger(Logger.LEVEL_ERROR, "xar"));
unarchiver.setDestDirectory(tempDir);
unarchiver.extract();
......@@ -130,7 +127,6 @@ void noPackageXml() throws Exception
// Extract package.xml and extract all the entries one by one and read them as a XWiki Document to verify
// they're valid.
ZipUnArchiver unarchiver = new ZipUnArchiver(xarFile);
unarchiver.enableLogging(new ConsoleLogger(Logger.LEVEL_ERROR, "xar"));
unarchiver.setDestDirectory(tempDir);
unarchiver.extract();
......@@ -169,7 +165,6 @@ void nestedSpacesXml() throws Exception
// Extract the generated XAR so that we verify its content easily
File xarFile = new File(verifier.getBasedir(), "target/xwiki-commons-tool-xar-plugin-test-1.0.xar");
ZipUnArchiver unarchiver = new ZipUnArchiver(xarFile);
unarchiver.enableLogging(new ConsoleLogger(Logger.LEVEL_ERROR, "xar"));
unarchiver.setDestDirectory(tempDir);
unarchiver.extract();
......@@ -195,7 +190,6 @@ void transformXML() throws Exception
// Extract the generated XAR so that we verify its content easily
File xarFile = new File(verifier.getBasedir(), "target/xwiki-commons-tool-xar-plugin-test-1.0.xar");
ZipUnArchiver unarchiver = new ZipUnArchiver(xarFile);
unarchiver.enableLogging(new ConsoleLogger(Logger.LEVEL_ERROR, "xar"));
unarchiver.setDestDirectory(tempDir);
unarchiver.extract();
......@@ -226,7 +220,6 @@ void entities() throws Exception
// Extract the generated XAR so that we verify its content easily
File xarFile = new File(verifier.getBasedir(), "target/xwiki-commons-tool-xar-plugin-test-1.0.xar");
ZipUnArchiver unarchiver = new ZipUnArchiver(xarFile);
unarchiver.enableLogging(new ConsoleLogger(Logger.LEVEL_ERROR, "xar"));
unarchiver.setDestDirectory(tempDir);
unarchiver.extract();
......
......@@ -46,7 +46,6 @@
import org.codehaus.plexus.archiver.zip.ZipUnArchiver;
import org.codehaus.plexus.components.io.fileselectors.FileSelector;
import org.codehaus.plexus.components.io.fileselectors.IncludeExcludeFileSelector;
import org.codehaus.plexus.logging.Logger;
import org.codehaus.plexus.logging.console.ConsoleLogger;
import org.xwiki.tool.xar.internal.XWikiDocument;
......@@ -215,7 +214,6 @@ protected void unpack(File file, File location, String logName, boolean overwrit
try {
ZipUnArchiver unArchiver = new ZipUnArchiver();
unArchiver.setEncoding(this.encoding);
unArchiver.enableLogging(new ConsoleLogger(Logger.LEVEL_ERROR, logName));
unArchiver.setSourceFile(file);
unArchiver.setDestDirectory(location);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment