You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2023/08/22 06:35:00 UTC
[jira] [Commented] (MNG-7836) Support alternative syntaxes for POMs
[ https://issues.apache.org/jira/browse/MNG-7836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17757217#comment-17757217 ]
ASF GitHub Bot commented on MNG-7836:
-------------------------------------
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.
> Support alternative syntaxes for POMs
> -------------------------------------
>
> Key: MNG-7836
> URL: https://issues.apache.org/jira/browse/MNG-7836
> Project: Maven
> Issue Type: New Feature
> Reporter: Guillaume Nodet
> Assignee: Guillaume Nodet
> Priority: Major
> Fix For: 4.0.x-candidate
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)