You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Wendell Beckwith <wb...@gmail.com> on 2006/08/21 19:25:48 UTC

API for getting m2 artifact from a java.io.File

Is there an api for turning a java.io.File, which represents the path of a
jar into the local repository, into a maven Artifact object?  Or do I just
need to reverse the process used in the DefaultRepositoryLayout.pathOf()
method?  I'm working on a plugin that will dynamically add dependencies to
maven for eclipse plugins, but the eclipse code will load all jars under
certain hierarchies in the local repo to form the target platform.  It will
analyze the project's code and return the jars (and access rules) that are
really needed for compilation.  My code needs to convert these file paths
into dependencies which I can then add to the m2 project.

Wb