Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[m2e-users] Overriding Artifact file resolution during Mojo execution

Hi,

I would like to have the following steps in my Eclipse plugin:

  • Get the dependency tree of a project (done)
  • Flatten the dependency tree to a list that can be used to find out build order (done)
  • Iterate through the flattened dependency list and call every "mvn package" on each project that is in the Eclipse workspace without tests (done)
  • Use the result JAR file of calling "mvn package" for the next project (how?)

When I call execute(MavenProject, MojoExecution, IProgressMonitor) function, how can I override the artifact resolution in the way that I use a JAR file that was the result of a previous build (mvn package).

I checked every function of IMavenExecutionContext interface (and the interfaces it uses) but I could not find a way. Is there a possibility to override the RepositorySystemSession or the WorkspaceReader that belongs to the execution context?

Thanks and regards,
Balázs Zsoldos


Back to the top