rfscholte commented on a change in pull request #286:
URL: https://github.com/apache/maven/pull/286#discussion_r439869255



##########
File path: 
maven-core/src/main/java/org/apache/maven/internal/aether/DefaultRepositorySystemSessionFactory.java
##########
@@ -266,5 +279,41 @@ private String getMavenVersion()
 
         return props.getProperty( "version", "unknown-version" );
     }
+    
+    private Collection<FileTransformer> getTransformersForArtifact( final 
org.eclipse.aether.artifact.Artifact artifact,
+                                                                    final 
SessionData sessionData )
+    {
+        TransformerContext context = (TransformerContext) sessionData.get( 
TransformerContext.KEY );
+        Collection<FileTransformer> transformers = new ArrayList<>();
+        
+        // In case of install:install-file there's no transformer context, as 
the goal is unrelated to the lifecycle. 
+        if ( "pom".equals( artifact.getExtension() ) && context != null )
+        {
+            transformers.add( new FileTransformer()
+            {
+                @Override
+                public InputStream transformData( File pomFile )
+                    throws IOException, TransformException
+                {
+                    try
+                    {
+                        return new ConsumerModelSourceTransformer().transform( 
pomFile.toPath(), context );
+                    }
+                    catch ( 
org.apache.maven.model.building.TransformerException e )

Review comment:
       yes, now it can, it used to have collissions with 
`javax.xml.transform.TransformerException` and 
`org.apache.maven.artifact.Artifact`




----------------------------------------------------------------
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:
[email protected]


Reply via email to