m2e uses WorkspaceReader to implement this 

http://git.eclipse.org/c/m2e/org.eclipse.m2e.workspace.git/tree/org.eclipse.m2e.workspace.cli/src/main/java/org/eclipse/m2e/workspace/internal/Maven31WorkspaceReader.java

-- 
Regards,
Igor

On Fri, Jun 3, 2016, at 02:17 AM, James Roper wrote:
> On 3 June 2016 at 13:36, Igor Fedorenko <i...@ifedorenko.com> wrote:
> 
> > On Mon, May 30, 2016, at 11:34 PM, James Roper wrote:
> > >
> > > One question that I'm trying to solve now, when resolving dependencies,
> > > if
> > > you want to do so without actually building the project it seems that you
> > > would probably have to create your own WorkspaceReader implementation
> > > that
> > > will return a dummy artifact when the resolver tries to resolve the jar
> > > artifact, is that correct?  I've tried mavens reactor WorkspaceReader,
> > > but
> > > it only returns the pom artifact, the jar artifact remains not found.
> > >
> >
> > To make sure I understand the question. You have two projects, A and B,
> > and project A depends on B. So the question is, how to resolve
> > dependencies of project A. Did I get the question right?
> >
> >  I think the answer depends on what you are trying to do. When m2e runs
> >  Maven build with "resolve workspace dependencies" enabled, for example,
> >  dependencies on workspace projects are always resolved to project
> >  target/classes directories, which works reasonably well for compiler
> >  and many other Maven plugins. If you just need to display list of
> >  project A dependency coordinates, actual file does not really matter.
> >
> > ... or did I completely misunderstand the question?
> >
> 
> The file does matter (which I've realised since asking the above
> question),
> so yes, we need to return the projects output directory.
> 
> The use case is that we want to, at some point (but not immediately)
> actually run the project, so we need a classpath, which means we need the
> classes directory.
> 
> 
> > --
> > Regards,
> > Igor
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> > For additional commands, e-mail: dev-h...@maven.apache.org
> >
> >
> 
> 
> -- 
> *James Roper*
> *Software Engineer*
> 
> Lightbend <https://www.lightbend.com/> – Build reactive apps!
> Twitter: @jroper <https://twitter.com/jroper>

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

Reply via email to