This question is for exactly the same solution asked in maven: How to add resources which are generated after compilation phase, but I'm looking for an another solution.
In my plugin I successfully generated some resource files in target/generated-resources/some
directory.
Now I want those resource files included in the final jar of the hosting project.
I tried.
final Resource resource = new Resource();
resource.setDirectory("target/generated-resources/some");
project.getBuild().getResources().add(resource);
where the project
is defined like this.
@Parameter(defaultValue = "${project}", readonly = true, required = true)
private MavenProject project;
And it doesn't work.