maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [maven] rfscholte commented on a change in pull request #286: [MNG-6656] Introduce base for build/consumer process
Date Sun, 09 Feb 2020 14:23:50 GMT
rfscholte commented on a change in pull request #286: [MNG-6656] Introduce base for build/consumer
process
URL: https://github.com/apache/maven/pull/286#discussion_r376787962
 
 

 ##########
 File path: maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java
 ##########
 @@ -816,6 +894,81 @@ private void assembleInheritance( List<ModelData> lineage, ModelBuildingRequest
             inheritanceAssembler.assembleModelInheritance( child, parent, request, problems
);
         }
     }
+    
+    private InputStream transformData( final Path pomFile )
+                    throws IOException, TransformerException, SAXException, ParserConfigurationException
+    {
+        final TransformerFactory transformerFactory = Factories.newTransformerFactory() ;
+        
+        final PipedOutputStream pipedOutputStream  = new PipedOutputStream();
+        final PipedInputStream pipedInputStream  = new PipedInputStream( pipedOutputStream
);
+
+        // Should always be FileSource for reactor poms
+        // System.out.println( "transforming " + pomFile );
+        
+        final SAXSource transformSource =
+            new SAXSource( buildPomXMLFilterFactory.get().get( pomFile ),
+                           new org.xml.sax.InputSource( new FileInputStream( pomFile.toFile()
) ) );
+
+        OutputStream out;
+        if ( xmlFilterListener != null )
+        {
+            out = new FilterOutputStream( pipedOutputStream )
+            {
+                @Override
+                public void write( byte[] b, int off, int len )
+                    throws IOException
+                {
+                    super.write( b, off, len );
+                    xmlFilterListener.write( pomFile, b, off, len );
+                }  
+            };
+        }
+        else
+        {
+            out = pipedOutputStream;
+        }
+
+        final StreamResult result = new StreamResult( out );
+        
+////        final Callable<Void> callable = () ->
 
 Review comment:
   Now with the improved caching in place, I should be able to make use of it.
   thanks for the reminder of these comments, I need to improve the exception handling here
too.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message