mirror of https://github.com/apache/maven.git
[MNG-6593] track input location for super-pom content
This commit is contained in:
parent
c674bcfb42
commit
bd4a3a0d22
|
@ -24,6 +24,7 @@ import java.io.InputStream;
|
|||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.maven.model.InputSource;
|
||||
import org.apache.maven.model.Model;
|
||||
import org.apache.maven.model.building.ModelProcessor;
|
||||
import org.codehaus.plexus.component.annotations.Component;
|
||||
|
@ -70,8 +71,16 @@ public class DefaultSuperPomProvider
|
|||
|
||||
try
|
||||
{
|
||||
Map<String, String> options = new HashMap<>();
|
||||
Map<String, Object> options = new HashMap<>();
|
||||
options.put( "xml:4.0.0", "xml:4.0.0" );
|
||||
|
||||
String modelId = "org.apache.maven:model-builder:"
|
||||
+ this.getClass().getPackage().getImplementationVersion() + ":super-pom";
|
||||
InputSource inputSource = new InputSource();
|
||||
inputSource.setModelId( modelId );
|
||||
inputSource.setLocation( getClass().getResource( resource ).toExternalForm() );
|
||||
options.put( ModelProcessor.INPUT_SOURCE, inputSource );
|
||||
|
||||
superModel = modelProcessor.read( is, options );
|
||||
}
|
||||
catch ( IOException e )
|
||||
|
|
Loading…
Reference in New Issue