当前位置: 首页 > 知识库问答 >
问题:

如何使maven下载任何构建所需的文件?

琴琪
2023-03-14
mvn process-resources
maven-failsafe-plugin:2.13:integration-test
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/surefire/maven-surefire-common/2.13/maven-surefire-common-2.13.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/surefire/maven-surefire-common/2.13/maven-surefire-common-2.13.pom (6 KB at 67.0 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugin-tools/maven-plugin-annotations/3.2/maven-plugin-annotations-3.2.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugin-tools/maven-plugin-annotations/3.2/maven-plugin-annotations-3.2.pom (2 KB at 20.9 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugin-tools/maven-plugin-tools/3.2/maven-plugin-tools-3.2.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugin-tools/maven-plugin-tools/3.2/maven-plugin-tools-3.2.pom (17 KB at 192.2 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire-api/2.13/surefire-api-2.13.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire-api/2.13/surefire-api-2.13.pom (3 KB at 32.9 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire-booter/2.13/surefire-booter-2.13.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire-booter/2.13/surefire-booter-2.13.pom (3 KB at 39.5 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/commons/commons-lang3/3.1/commons-lang3-3.1.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/commons/commons-lang3/3.1/commons-lang3-3.1.pom (17 KB at 183.4 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire-booter/2.13/surefire-booter-2.13.jar
Downloading: https://repo.maven.apache.org/maven2/org/apache/commons/commons-lang3/3.1/commons-lang3-3.1.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire-booter/2.13/surefire-booter-2.13.jar (35 KB at 401.9 KB/sec)
Downloaded: https://repo.maven.apache.org/maven2/org/apache/commons/commons-lang3/3.1/commons-lang3-3.1.jar (309 KB at 1793.0 KB/sec)
[INFO] --- maven-assembly-plugin:2.2-beta-5:single (default) 
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @
[INFO] --- build-helper-maven-plugin:1.8:reserve-network-port
[INFO] --- maven-compiler-plugin:3.2:compile (default-compile) @

我如何也可以从pom.xmlbuild部分下载任何DEP?

共有1个答案

娄浩荡
2023-03-14

这个命令应该起作用:

mvn dependency:go-offline

根据他们的文档https://maven.apache.org/plugins/maven-dependency-plugin/go-offline-mojo.html

解析所有项目依赖项的目标,包括插件和报表及其依赖项。

 类似资料:
  • 问题内容: 我必须使用下面给出的Selenium Webdriver执行以下任务。 单击任何开始下载任何文件的链接/按钮(文件类型可以是图像,pdf,jar等) 单击弹出窗口上的“保存”(如果显示)(例如http://selenium.googlecode.com/files/selenium-server-standalone-2.33.0.jar) 提供所需的位置以保存该文件。 任何人都可以共

  • 我希望基础映像 下载依赖项并仅在依赖项更改时重新生成,而第二个映像 将在代码更改时重新生成。但是,在 上,两个 maven 命令都会下载所有依赖项。我可能误解了堆叠的工作原理或在哪里复制什么。 我尝试过的:将第一个容器中的所有内容显式复制到第二个容器中:< code>COPY / /和各种更具体的< code>COPY目标,如< code>.m2,从maven基本映像构建第二个容器,如第一个容器,

  • 问题内容: 我想要以下内容。 我只需要一个可以从Maven存储库下载jar及其依赖项的实用程序,而对我的项目的构建方式没有任何限制。 我想要这样的东西: 它也应该能够下载依赖项。 更新: 我不知道应该构造pom.xml。 我唯一需要完成的任务是下载jar,我希望有一个工具可以完成此任务,而不会让我烦恼过多的信息。 有那样的东西吗? 问题答案: 如果要将maven依赖项下载到lib目录中,请使用带有

  • 我希望用户单击一个按钮,一次上载一个文档。 目前,当用户上载文档时,它会将“documents”控件标记为满意。但是,如果用户尝试上载另一个文档,但随后取消,则会将控件标记为不满意。它仍然有第一个文档,但在文件资源管理器上单击“取消”似乎会使验证器认为没有上载任何文档。我怎样才能避开这件事? 在我的html中: 在我的.ts中: 现在,我的upoadDocument()函数对验证没有任何作用。

  • 问题内容: 好吧,我安装了elasticsearch-rails gem(版本0.1.5),并且可以清楚地看到gem文件中的任务。 但是当我跑步时 我得到这个错误。 运行也不显示任务。 elasticsearch正在运行,如果我卷曲它会回应我。 为什么这不起作用? 问题答案: 您需要创建elasticsearch.rake