Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MPLUGINTESTING-76] Upgrade Plexus Archiver from 4.3.0 to 4.6.1 (broken api in 4.4.0) #29

Merged
merged 1 commit into from
Feb 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion maven-plugin-testing-harness/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ under the License.
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-archiver</artifactId>
<version>4.3.0</version>
<version>4.6.1</version>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,17 +273,9 @@ public void createUnpackableFile(Artifact artifact, File destFile)
archiver.setDestFile(destFile);
archiver.addFile(srcFile, getUnpackableFileName(artifact));

try {
setVariableValueToObject(archiver, "logger", new SilentLog());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like SilentLog class is no more used ... maybe we can remove it, or at least deprecate

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it is in any relation to Plexus Logger, then definitely

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's used in various places within the ASF and there's no real replacement. While maven components should be switched to SLF4j, the plugin side is not completely sorted (as afaik, the org.slf4j package is not exported by the maven core class loader.
So I've raised an issue but I'd keep it as is until it's sorted.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

} catch (IllegalAccessException e) {
System.out.println("Unable to override logger with silent log.");
e.printStackTrace();
}
if (archiver instanceof WarArchiver) {
WarArchiver war = (WarArchiver) archiver;
// the use of this is counter-intuitive:
// http://jira.codehaus.org/browse/PLX-286
war.setIgnoreWebxml(false);
war.setExpectWebXml(false);
}
archiver.createArchive();
}
Expand Down