【发布时间】:2011-03-14 08:26:28
【问题描述】:
我已经在Maven User List问过了,这里复制一下。
我正在尝试创建一个可以下载和使用 Maven 的应用程序 Maven 之外的工件。我认为在这种情况下,最聪明的方法是 是要使用 Maven 已经存在的类。谁能帮我一个提示 在哪里寻找?
如果能以这种方式工作会很好:
Repository rep = new Repository("~/.m2");
Artifact artifact = new Artifact("com.example", "foo", "1.0");
String path = rep.resolve(artifact);
assert path.equals("~/.m2/repository/com/example/foo/1.0/foo.jar");
我正在使用 Maven 3。
【问题讨论】: