[MNG-7067] Ensure produced (consumable) pom takes into account extensions
- Dominant language
- Java
- Stars
- 5.3k
- Forks
- 3.1k
- Avg merge
- 20h 42m
- Merged PRs (30d)
- 297
Description
**[Romain Manni-Bucau](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=romain.manni-bucau)** opened **[MNG-7067](https://issues.apache.org/jira/browse/MNG-7067?redirect=false)** and commented
Goal is to have this kind of (build time) extension reflected in the produced pom:
```java
@Component(role = AbstractMavenLifecycleParticipant.class, hint = "rmannibucau-test")
public class MyListener extends AbstractMavenLifecycleParticipant {
@Override
public void afterProjectsRead(final MavenSession session) throws MavenExecutionException {
if (session.getCurrentProject() == null) {
return;
}
session.getProjects().forEach(p -> {
final Dependency dependency = new Dependency();
dependency.setGroupId("junit");
dependency.setArtifactId("junit");
dependency.setVersion("3.8.1");
p.getDependencies().add(dependency);
});
}
}
```
Without having junit 3.8 in the project pom it should be in the installed pom.
---
**Affects:** 3.0-alpha-1
0 votes, 5 watchers
Contributor guide
Assessment
This issue has not been assessed yet.