Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/clojure/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用maven';s";最新;雷宁根项目中的关键词_Maven_Clojure_Leiningen - Fatal编程技术网

使用maven';s";最新;雷宁根项目中的关键词

使用maven';s";最新;雷宁根项目中的关键词,maven,clojure,leiningen,Maven,Clojure,Leiningen,我有两个莱宁根项目。根据,maven应该允许我使用“最新”作为依赖版本。它给了我一个错误,提示找不到版本为“LATEST”的依赖项。表示我如何与leiningen在本地引用此项目,如果这很重要的话 我怎样才能让它工作?如果这不是您在项目中引用本地依赖项的方式,我愿意接受其他建议 项目文件如下所示: (defproject mongo-model "0.0.19-SNAPSHOT" :description "A simple way to create model tem

我有两个莱宁根项目。根据,maven应该允许我使用“最新”作为依赖版本。它给了我一个错误,提示找不到版本为“LATEST”的依赖项。表示我如何与leiningen在本地引用此项目,如果这很重要的话

我怎样才能让它工作?如果这不是您在项目中引用本地依赖项的方式,我愿意接受其他建议

项目文件如下所示:

(defproject mongo-model "0.0.19-SNAPSHOT"
            :description "A simple way to create model templates for mongodb for write-time data validation"
            :dependencies [[org.clojure/clojure "1.3.0"]]
            :main mongo-model.core)

在第二个项目中运行
lein deps
,会出现以下错误:

An error has occurred while processing the Maven artifact tasks.
 Diagnosis:

Unable to resolve artifact: Missing:
----------
1) mongo-model:mongo-model:jar:LATEST

  Try downloading the file manually from the project website.

  Then, install it using the command: 
      mvn install:install-file -DgroupId=mongo-model -DartifactId=mongo-model -Dversion=LATEST -Dpackaging=jar -Dfile=/path/to/file

  Alternatively, if you host your own repository you can deploy the file there: 
      mvn deploy:deploy-file -DgroupId=mongo-model -DartifactId=mongo-model -Dversion=LATEST -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

  Path to dependency: 
    1) org.apache.maven:super-pom:jar:2.0
    2) mongo-model:mongo-model:jar:LATEST

----------
1 required artifact is missing.

for artifact: 
  org.apache.maven:super-pom:jar:2.0

from the specified remote repositories:
  clojars (http://clojars.org/repo/),
  central (http://repo1.maven.org/maven2)



Exception in thread "main" Unable to resolve artifact: Missing:
----------
1) mongo-model:mongo-model:jar:LATEST

  Try downloading the file manually from the project website.

  Then, install it using the command: 
      mvn install:install-file -DgroupId=mongo-model -DartifactId=mongo-model -Dversion=LATEST -Dpackaging=jar -Dfile=/path/to/file

  Alternatively, if you host your own repository you can deploy the file there: 
      mvn deploy:deploy-file -DgroupId=mongo-model -DartifactId=mongo-model -Dversion=LATEST -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

  Path to dependency: 
    1) org.apache.maven:super-pom:jar:2.0
    2) mongo-model:mongo-model:jar:LATEST

----------
1 required artifact is missing.

for artifact: 
  org.apache.maven:super-pom:jar:2.0

from the specified remote repositories:
  clojars (http://clojars.org/repo/),
  central (http://repo1.maven.org/maven2)

 (NO_SOURCE_FILE:0)
    at clojure.lang.Compiler.eval(Compiler.java:5440)
    at clojure.lang.Compiler.eval(Compiler.java:5391)
    at clojure.core$eval.invoke(core.clj:2382)
    at clojure.main$eval_opt.invoke(main.clj:235)
    at clojure.main$initialize.invoke(main.clj:254)
    at clojure.main$script_opt.invoke(main.clj:270)
    at clojure.main$main.doInvoke(main.clj:354)
    at clojure.lang.RestFn.invoke(RestFn.java:457)
    at clojure.lang.Var.invoke(Var.java:377)
    at clojure.lang.AFn.applyToHelper(AFn.java:172)
    at clojure.lang.Var.applyTo(Var.java:482)
    at clojure.main.main(main.java:37)
Caused by: Unable to resolve artifact: Missing:
----------
1) mongo-model:mongo-model:jar:LATEST

  Try downloading the file manually from the project website.

  Then, install it using the command: 
      mvn install:install-file -DgroupId=mongo-model -DartifactId=mongo-model -Dversion=LATEST -Dpackaging=jar -Dfile=/path/to/file

  Alternatively, if you host your own repository you can deploy the file there: 
      mvn deploy:deploy-file -DgroupId=mongo-model -DartifactId=mongo-model -Dversion=LATEST -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

  Path to dependency: 
    1) org.apache.maven:super-pom:jar:2.0
    2) mongo-model:mongo-model:jar:LATEST

----------
1 required artifact is missing.

for artifact: 
  org.apache.maven:super-pom:jar:2.0

from the specified remote repositories:
  clojars (http://clojars.org/repo/),
  central (http://repo1.maven.org/maven2)


    at org.apache.maven.artifact.ant.DependenciesTask.doExecute(DependenciesTask.java:175)
    at org.apache.maven.artifact.ant.AbstractArtifactTask.execute(AbstractArtifactTask.java:678)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:90)
    at clojure.lang.Reflector.invokeNoArgInstanceMember(Reflector.java:265)
    at leiningen.deps$do_deps.invoke(deps.clj:131)
    at leiningen.deps$deps.doInvoke(deps.clj:195)
    at clojure.lang.RestFn.invoke(RestFn.java:410)
    at clojure.lang.Var.invoke(Var.java:365)
    at clojure.lang.AFn.applyToHelper(AFn.java:161)
    at clojure.lang.Var.applyTo(Var.java:482)
    at clojure.core$apply.invoke(core.clj:542)
    at leiningen.core$apply_task.invoke(core.clj:228)
    at leiningen.core$_main.doInvoke(core.clj:294)
    at clojure.lang.RestFn.invoke(RestFn.java:410)
    at clojure.lang.AFn.applyToHelper(AFn.java:161)
    at clojure.lang.RestFn.applyTo(RestFn.java:132)
    at clojure.core$apply.invoke(core.clj:542)
    at leiningen.core$_main.invoke(core.clj:297)
    at user$eval42.invoke(NO_SOURCE_FILE:1)
    at clojure.lang.Compiler.eval(Compiler.java:5424)
    ... 11 more
Caused by: org.apache.maven.artifact.resolver.MultipleArtifactsNotFoundException: Missing:
----------
1) mongo-model:mongo-model:jar:LATEST

  Try downloading the file manually from the project website.

  Then, install it using the command: 
      mvn install:install-file -DgroupId=mongo-model -DartifactId=mongo-model -Dversion=LATEST -Dpackaging=jar -Dfile=/path/to/file

  Alternatively, if you host your own repository you can deploy the file there: 
      mvn deploy:deploy-file -DgroupId=mongo-model -DartifactId=mongo-model -Dversion=LATEST -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

  Path to dependency: 
    1) org.apache.maven:super-pom:jar:2.0
    2) mongo-model:mongo-model:jar:LATEST

----------
1 required artifact is missing.

for artifact: 
  org.apache.maven:super-pom:jar:2.0

from the specified remote repositories:
  clojars (http://clojars.org/repo/),
  central (http://repo1.maven.org/maven2)


    at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:324)
    at org.apache.maven.artifact.ant.DependenciesTask.doExecute(DependenciesTask.java:170)
    ... 34 more

这里有两件事在起作用:标准的依赖项解析和
签出
目录的便利性

签出
目录
签出
目录的功能非常简单:Leiningen希望在那里找到一个或多个目录,每个目录都包含另一个Leiningen项目。通常在此处创建指向其他项目的符号链接。对于每个链接的项目,源路径、编译路径和资源路径都添加到类路径中。(默认情况下-可以配置目录列表。)

这意味着链接项目的名称空间在父项目中可用,无论它们是否包含在依赖项中。不过,您仍然应该将它们包含在依赖项中,以便其他人可以使用您的代码库

依赖关系 依赖项解析机制不关心
签出
目录。它尝试查找本地和远程Maven存储库中的所有依赖项。如果您对从未安装在存储库中的本地项目有依赖关系,则无法找到该项目,Leiningen将出现问题中所示的错误,即使该项目链接到
签出
目录中

您需要在本地存储库中至少安装一次所依赖的工件。这与调用
lein install
一样简单。您不需要在每次更改后都这样做,因为您总是通过
签出
符号链接使用最新的代码


关于
最新版本的使用:我想说的是,鼓励使用固定版本号作为依赖项。这是防止一个曾经成功的构建由于依赖关系的变化而突然中断的唯一方法。另请参见此问题:

谢谢!你帮我澄清了这些问题。
An error has occurred while processing the Maven artifact tasks.
 Diagnosis:

Unable to resolve artifact: Missing:
----------
1) mongo-model:mongo-model:jar:LATEST

  Try downloading the file manually from the project website.

  Then, install it using the command: 
      mvn install:install-file -DgroupId=mongo-model -DartifactId=mongo-model -Dversion=LATEST -Dpackaging=jar -Dfile=/path/to/file

  Alternatively, if you host your own repository you can deploy the file there: 
      mvn deploy:deploy-file -DgroupId=mongo-model -DartifactId=mongo-model -Dversion=LATEST -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

  Path to dependency: 
    1) org.apache.maven:super-pom:jar:2.0
    2) mongo-model:mongo-model:jar:LATEST

----------
1 required artifact is missing.

for artifact: 
  org.apache.maven:super-pom:jar:2.0

from the specified remote repositories:
  clojars (http://clojars.org/repo/),
  central (http://repo1.maven.org/maven2)



Exception in thread "main" Unable to resolve artifact: Missing:
----------
1) mongo-model:mongo-model:jar:LATEST

  Try downloading the file manually from the project website.

  Then, install it using the command: 
      mvn install:install-file -DgroupId=mongo-model -DartifactId=mongo-model -Dversion=LATEST -Dpackaging=jar -Dfile=/path/to/file

  Alternatively, if you host your own repository you can deploy the file there: 
      mvn deploy:deploy-file -DgroupId=mongo-model -DartifactId=mongo-model -Dversion=LATEST -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

  Path to dependency: 
    1) org.apache.maven:super-pom:jar:2.0
    2) mongo-model:mongo-model:jar:LATEST

----------
1 required artifact is missing.

for artifact: 
  org.apache.maven:super-pom:jar:2.0

from the specified remote repositories:
  clojars (http://clojars.org/repo/),
  central (http://repo1.maven.org/maven2)

 (NO_SOURCE_FILE:0)
    at clojure.lang.Compiler.eval(Compiler.java:5440)
    at clojure.lang.Compiler.eval(Compiler.java:5391)
    at clojure.core$eval.invoke(core.clj:2382)
    at clojure.main$eval_opt.invoke(main.clj:235)
    at clojure.main$initialize.invoke(main.clj:254)
    at clojure.main$script_opt.invoke(main.clj:270)
    at clojure.main$main.doInvoke(main.clj:354)
    at clojure.lang.RestFn.invoke(RestFn.java:457)
    at clojure.lang.Var.invoke(Var.java:377)
    at clojure.lang.AFn.applyToHelper(AFn.java:172)
    at clojure.lang.Var.applyTo(Var.java:482)
    at clojure.main.main(main.java:37)
Caused by: Unable to resolve artifact: Missing:
----------
1) mongo-model:mongo-model:jar:LATEST

  Try downloading the file manually from the project website.

  Then, install it using the command: 
      mvn install:install-file -DgroupId=mongo-model -DartifactId=mongo-model -Dversion=LATEST -Dpackaging=jar -Dfile=/path/to/file

  Alternatively, if you host your own repository you can deploy the file there: 
      mvn deploy:deploy-file -DgroupId=mongo-model -DartifactId=mongo-model -Dversion=LATEST -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

  Path to dependency: 
    1) org.apache.maven:super-pom:jar:2.0
    2) mongo-model:mongo-model:jar:LATEST

----------
1 required artifact is missing.

for artifact: 
  org.apache.maven:super-pom:jar:2.0

from the specified remote repositories:
  clojars (http://clojars.org/repo/),
  central (http://repo1.maven.org/maven2)


    at org.apache.maven.artifact.ant.DependenciesTask.doExecute(DependenciesTask.java:175)
    at org.apache.maven.artifact.ant.AbstractArtifactTask.execute(AbstractArtifactTask.java:678)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:90)
    at clojure.lang.Reflector.invokeNoArgInstanceMember(Reflector.java:265)
    at leiningen.deps$do_deps.invoke(deps.clj:131)
    at leiningen.deps$deps.doInvoke(deps.clj:195)
    at clojure.lang.RestFn.invoke(RestFn.java:410)
    at clojure.lang.Var.invoke(Var.java:365)
    at clojure.lang.AFn.applyToHelper(AFn.java:161)
    at clojure.lang.Var.applyTo(Var.java:482)
    at clojure.core$apply.invoke(core.clj:542)
    at leiningen.core$apply_task.invoke(core.clj:228)
    at leiningen.core$_main.doInvoke(core.clj:294)
    at clojure.lang.RestFn.invoke(RestFn.java:410)
    at clojure.lang.AFn.applyToHelper(AFn.java:161)
    at clojure.lang.RestFn.applyTo(RestFn.java:132)
    at clojure.core$apply.invoke(core.clj:542)
    at leiningen.core$_main.invoke(core.clj:297)
    at user$eval42.invoke(NO_SOURCE_FILE:1)
    at clojure.lang.Compiler.eval(Compiler.java:5424)
    ... 11 more
Caused by: org.apache.maven.artifact.resolver.MultipleArtifactsNotFoundException: Missing:
----------
1) mongo-model:mongo-model:jar:LATEST

  Try downloading the file manually from the project website.

  Then, install it using the command: 
      mvn install:install-file -DgroupId=mongo-model -DartifactId=mongo-model -Dversion=LATEST -Dpackaging=jar -Dfile=/path/to/file

  Alternatively, if you host your own repository you can deploy the file there: 
      mvn deploy:deploy-file -DgroupId=mongo-model -DartifactId=mongo-model -Dversion=LATEST -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

  Path to dependency: 
    1) org.apache.maven:super-pom:jar:2.0
    2) mongo-model:mongo-model:jar:LATEST

----------
1 required artifact is missing.

for artifact: 
  org.apache.maven:super-pom:jar:2.0

from the specified remote repositories:
  clojars (http://clojars.org/repo/),
  central (http://repo1.maven.org/maven2)


    at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:324)
    at org.apache.maven.artifact.ant.DependenciesTask.doExecute(DependenciesTask.java:170)
    ... 34 more