gpt4 book ai didi

java - JFrog Artifact 要做的基本设置

转载 作者:行者123 更新时间:2023-11-28 22:30:08 24 4
gpt4 key购买 nike

我是新手,在我的 eclipse 和 JFrog Artifactory 中使用 maven m2e 插件

按照说明,我下载了 JFrog Artifactory war 并使用 Tomcat 8 Windows 安装程序服务部署了它。我正在使用 Windows 8.1 64 位操作系统。

一旦通过 tomcat 部署了 artifactory,我通过 artifactory 中的 Deploy 选项将我的项目所需的一些 jar 添加到 ext-release-local 和 maven-clean,其他此类 jar 到 plugins-relase-local。

然后我生成了 settings.xml 文件并将其复制到 .m2 文件。我的 settings.xml 文件包含

<settings xmlns="http://maven.apache.org/SETTINGS/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd">
<profiles>
<profile>
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>libs-release</name>
<url>http://localhost:8082/artifactory/libs-release</url>
</repository>
<repository>
<snapshots/>
<id>snapshots</id>
<name>libs-snapshot</name>
<url>http://localhost:8082/artifactory/libs-snapshot</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>plugins-release</name>
<url>http://localhost:8082/artifactory/plugins-release</url>
</pluginRepository>
<pluginRepository>
<snapshots/>
<id>snapshots</id>
<name>plugins-snapshot</name>
<url>http://localhost:8082/artifactory/plugins-snapshot</url>
</pluginRepository>
</pluginRepositories>
<id>artifactory</id>
</profile>
</profiles>
<activeProfiles>
<activeProfile>artifactory</activeProfile>
</activeProfiles>
</settings>

然后,当我尝试clean install -X -e 项目时,出现以下异常。

[ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.4.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1: Failure to find org.apache.maven.plugins:maven-clean-plugin:pom:2.4.1 in http://localhost:8082/artifactory/plugins-release was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]
org.apache.maven.plugin.PluginResolutionException: Plugin org.apache.maven.plugins:maven-clean-plugin:2.4.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1

如何将 Artifactory 与 Maven 集成。

  1. 主要目标只是第一次从中央存储库获取 jar 和其他依赖项,所有其他时间都应该从本地存储库获取 jar。

  2. 如何部署 jar 包。示例:在单个部署过程中部署 spring 4.X 的所有 jar。

  3. 解释维护存储库等的正确方法的任何指南或适当的文档或经验法则,

  4. 如何更改 Artifactory 的管理员用户名和密码。使用用户定义的角色在 Artifactory 中创建多个用户。等等,

  5. 更多非常简单的最佳实践/教程,说明如何使用 Maven 配置和使用 Artifactory

  6. Artifactory 网络用户界面的另一个问题是它经常死机,当我使用任务管理器中的 tomcat 服务检查它时,tomcat 死机并显示“正在停止...”。并最终在浏览器中出现连接重置错误。我无法通过 tomcat 配置器立即停止服务。 tomcat 停止和重新启动所花费的时间太长。有什么正确使用 tomcat deploy 的线索吗?

谢谢

最佳答案

您的 Artifactory 应该使用最常见的 Artifact 和插件来代理外部存储库。例如。 maven-clean-plugin 应该可以毫无问题地解决。如果 Artifactory 在代理后面,您应该在管理屏幕中配置它 as described in the User Guide .

我通常建议仔细阅读它,它应该可以回答所有提到的问题。

关于卡住——如果你将 war 部署到现有的 Tomcat 安装中而没有配置它的 JVM 参数,你看到的卡住是完整的 GC 周期——你正在耗尽内存。这给我们带来了to the User Guide again .

关于java - JFrog Artifact 要做的基本设置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23260726/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com