maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DK <desmond.kirr...@gmail.com>
Subject Inject Maven parameters to Plexus components
Date Wed, 24 May 2017 13:55:33 GMT
Is it possible to Inject Maven paramaters into Plexus components

I've tried this without success. Both repoSession and repositories are null

@Component(role = ResolverComponent.class, instantiationStrategy =
"per-lookup")
public class ResolverComponent {
    
    @Requirement
    private Logger logger;    

    @Requirement
    private RepositorySystem repoSystem;

    @Parameter(defaultValue = "${repositorySystemSession}", readonly = true,
required = true)
    private RepositorySystemSession repoSession;

    @Parameter(defaultValue = "${project.remoteProjectRepositories}",
readonly = true, required = true)
    private List<RemoteRepository> repositories;

:
:
}



--
View this message in context: http://maven.40175.n5.nabble.com/Inject-Maven-parameters-to-Plexus-components-tp5908783.html
Sent from the Maven Developers mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Mime
View raw message