On 3 June 2016 at 13:36, Igor Fedorenko <[email protected]> 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: [email protected] > For additional commands, e-mail: [email protected] > > -- *James Roper* *Software Engineer* Lightbend <https://www.lightbend.com/> – Build reactive apps! Twitter: @jroper <https://twitter.com/jroper>
