java - Ant 在构建期间不读取 IvySettings.xml 文件
问题描述
我想从我的内部存储库下载我的 Ant 项目(在 Netbeans 上运行)中的所有依赖项/jar。
2.i。我的 ivysettings.xml 文件是:
<ivysettings>
<properties file="${ivy.settings.dir}/ivysettings-file.properties"/>
<settings defaultResolver="https://my-internal-repo.com/artifactory"/>
<caches defaultCacheDir="${cache.dir}" checkUpToDate="false"/>
<credentials host="https://my-internal-repo.com/artifactory" realm="Artifactory Realm" username="usrname" passwd="ABCD"/>
<resolvers>
<url name="https://my-internal-repo.com/artifactory">
<ivy pattern="https://my-internal-repo.com/artifactory/webapp/#/artifacts/browse/tree/General/Maven-JCentral-cache/org/apache/ivy/ivy/2.2.0/ivy-2.2.0-sources.jar"/>
<artifact pattern="https://my-internal-repo.com/npm-remote-cache/mongodb/-/mongodb-3.1.13.tgz"/>
</url>
<filesystem name="internal">
<ivy pattern="${repository.dir}"/>
<artifact pattern="${repository.dir}"/>
</filesystem>
</resolvers>
<modules>
<module organisation="com.myOrg.*" name=".*" resolver="internal"/>
</modules>
2.ii. 我的 ivysettings-file.properties 是:
ivy.settings.dir=C:\Users\Documents\NetBeansProjects\ANTProject\JavaApplication1,
cache.dir=C:\Users\Downloads\IVYCache,
repository.dir=C:\Users\Downloads \repodir
现在,当我从我的根文件夹(我有我的 build.xml)从 cmd 输入命令“ant”时,构建成功,但我在构建日志中看不到关于 cmd 上的 Ivy 的字样。我认为它没有阅读我的常春藤设置。我该如何修复它以及如何验证我的 ivysettings.xml 是否已读取,因为我必须限制我的 netbeans 从 my-internal-repository 下载所有依赖项。
请让我知道我还缺少什么?
解决方案
你的 ivy-2.2.0-sources.jar 可能只包含 ivy 的源而不是你或 ant 需要的编译类,尝试下载 ivy-2.2.0.jar。
推荐阅读
- asp.net-core - 从多个 HttpClient 类型注入单个 HttpClient 接口类型
- apache-spark - 如何根据pyspark中的条件修改spark Data Frame的列值?
- reactjs - 关于乐观更新的后续问题:我们什么时候需要它?
- wordpress - 联系表格 7 在发送钩子之前设置变量
- javascript -
没有在 IE11 上显示任何数据,而对于 Chrome 来说,它的工作就像一个魅力 - google-apps-script - 如何计算 Google 表格列中具有值的单元格?
- matplotlib - Spyder v4.0.1 绘图和变量资源管理器的问题
- tendermint - 如何在招标安装中克服这个问题?
- authentication - 将参数从控制器传递到自定义 AuthorizationHandler
- javascript - 将 JavaScript 数组传递给 PHP 文件会返回空数组