Hi,
My English is poor, but I hope for help in this place.
I am trying to manipulate an org.apache.maven.model.Model via a maven extension
and at the same time create a new POM file. But unfortunately the new location
of the POM file does not apply. The plugins (e.g. maven-deploy-plugin) still
work with the original file location.
// Part of Model Processor
@Override
public Model read(InputStream input, Map<String, ?> options) throws
IOException {
Model model = read(input, options);
// This has no effect:
model.setPomFile(new File(„new-pom.xml“);
return model;
}
This example here helped me a little:
https://github.com/jcgay/unique-revision-maven-filtering/blob/master/src/main/java/fr/jcgay/maven/extension/revision/UniqueRevisionFiltering.java
The maven-install-plugin uses the desired file location, but the
maven-deploy-plugin uses the old file location.
At the plugin level, changing the POM file location works, as can be seen on
the flatten-maven-plugin:
this.project.setPomFile (flattenedPomFile);
But how does that work with a maven extension?
Thanks for a hint.
Regards,
Torsteen