Skip to content

Commit 5294005

Browse files
committed
Enable passing resolution configuration to custom resolver
1 parent 88e1bc7 commit 5294005

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tools/esmf-aspect-model-maven-plugin/src/main/java/org/eclipse/esmf/aspectmodel/AspectModelMojo.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ public abstract class AspectModelMojo extends AbstractMojo {
9292
@Parameter( defaultValue = "${session}", readonly = true )
9393
protected MavenSession mavenSession;
9494

95+
@Parameter
96+
protected Map<String, String> resolutionConfiguration = new HashMap<>();
97+
9598
protected GithubModelSourceConfig gitHubConfig;
9699

97100
private Map<AspectModel, Aspect> aspects;
@@ -126,6 +129,11 @@ protected Set<AspectModel> loadModels() throws MojoExecutionException {
126129
private AspectModelLoader createAspectModelLoader() throws MojoExecutionException {
127130
final List<ResolutionStrategy> strategies = new ArrayList<>();
128131

132+
if ( resolutionConfiguration != null && !resolutionConfiguration.isEmpty() ) {
133+
for ( final Map.Entry<String, String> config : resolutionConfiguration.entrySet() ) {
134+
System.setProperty( config.getKey(), config.getValue() );
135+
}
136+
}
129137
for ( final ResolutionStrategy strategy : ServiceLoader.load( ResolutionStrategy.class ) ) {
130138
strategies.add( strategy );
131139
}

0 commit comments

Comments
 (0)