gnodet commented on code in PR #1197:
URL: https://github.com/apache/maven/pull/1197#discussion_r1301069222
##########
maven-core/src/main/java/org/apache/maven/internal/transformation/ConsumerPomArtifactTransformer.java:
##########
@@ -165,31 +178,50 @@ private ConsumerPomArtifact(MavenProject mavenProject,
Path target, RepositorySy
target,
transformer(session));
}
+ }
- private static BiConsumer<Path, Path>
transformer(RepositorySystemSession session) {
- TransformerContext context = (TransformerContext)
session.getData().get(TransformerContext.KEY);
- return (src, dest) -> {
- try (InputStream inputStream = transform(src, context)) {
- Files.createDirectories(dest.getParent());
- Files.copy(inputStream, dest,
StandardCopyOption.REPLACE_EXISTING);
- } catch (XMLStreamException | IOException e) {
- throw new RuntimeException(e);
- }
- };
- }
+ BiConsumer<Path, Path> transformer(RepositorySystemSession session) {
+ TransformerContext context = (TransformerContext)
session.getData().get(TransformerContext.KEY);
+ return (src, dest) -> {
+ try {
+ Files.createDirectories(dest.getParent());
+ transform(src, dest, context);
+ } catch (XMLStreamException | IOException e) {
+ throw new RuntimeException(e);
Review Comment:
This discussion does not belong to this PR, as this is a design decision in
the v4 api and can't be changed in this smaller PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]