dependencies 相关问题

如果对一个元素的定义的更改可能导致另一个元素的更改,则两个元素之间存在依赖关系。

如何解决react更新依赖时的漏洞?

即使在使用 npmauditfix --force 之后,我仍然遇到漏洞,但无法删除它们。 我需要更新安装 tailwindcss 的依赖项。 这里是其中的一些, 第 n 次检查 ...

回答 1 投票 0

依赖性:方向向量和距离向量

主题:依赖关系(True、Anti、Output) 如何得到方向向量和距离向量? 例如: 做 n = 3, 100 v(n) = v(n-1) + v(i+1) + v(i-2) 结尾 确定依赖性。

回答 1 投票 0

如何在代码中使用其他包的依赖项?

我想使用 sqlx 中使用的 uuid 依赖项。 //! ./Cargo.toml sqlx = { 版本 = "0.6", 默认功能 = false, 功能 = [ “计时”, “宏”, &

回答 1 投票 0

SpringBoot 3 中缺少 JmsTemplate bean

将我的 springboot 版本从 2.7.5 更改为 3.0.6 后,我收到此错误 描述: com..JmsNotifier 中构造函数的参数 0 需要类型为“org.springframework.jms.core”的 bean。

回答 1 投票 0

C++项目中限制编译依赖的技巧有哪些?

在 C++ 项目中,编译依赖项会使软件项目难以维护。限制模块内和模块间依赖关系的最佳实践有哪些?

回答 4 投票 0

如何处理运行时错误:java.lang.NoSuchMethodError

我有一个具有很多依赖项的应用程序。一种依赖是 ActiveMQ Artemis。在 Maven 模块的 pom.xml 中,我将版本从 2.4.0 更新到 2.10.0 我的应用程序有很多依赖项。一种依赖是 ActiveMQ Artemis。在 Maven 模块的 pom.xml 中,我将版本从 2.4.0 更新到 2.10.0 <dependency> <groupId>org.apache.activemq</groupId> <artifactId>artemis-server</artifactId> <version>2.10.0</version> </dependency> <dependency> <groupId>org.apache.activemq</groupId> <artifactId>artemis-commons</artifactId> <version>2.10.0</version> </dependency> <dependency> <groupId>org.apache.activemq</groupId> <artifactId>artemis-jms-client-all</artifactId> <version>2.10.0</version> </dependency> 我用来启动 Artemis 经纪商的代码如下: EmbeddedActiveMQ broker = new EmbeddedActiveMQ(); String fileConfig = "file:///" + brokerFile.getAbsolutePath(); broker.setConfigResourcePath(fileConfig); 代理客户端通过 Camel 的 sjms 组件连接: org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory cf = new ActiveMQJMSConnectionFactory(url); SjmsComponent component = new SjmsComponent(); component.setConnectionFactory(cf); context.addComponent("sjms", component); 我在另一个使用 Gradle 5.6.2 构建/编译的应用程序中使用这个 Maven 模块。该应用程序还包含 Apache Camel 2.24.2 和 Apache ActiveMQ 5.5.10 的库。 应用程序编译正常,但在运行时我收到“NoSuchMethodError”: Handler dispatch failed; nested exception is java.lang.NoSuchMethodError: org.apache.activemq.artemis.utils.ClassloadingUtil.loadProperty(Ljava/lang/ClassLoader;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; 来自日志记录: 2019-09-21 03:03:00.883 WARN 4984 --- [ XNIO-2 task-14] .m.m.a.ExceptionHandlerExceptionResolver : Resolved exception caused by handler execution: org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is java.lang.NoSuchMethodError: org.apache.activemq.artemis.utils.ClassloadingUtil.loadProperty(Ljava/lang/ClassLoader;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; java.lang.NullPointerException at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.finalize(ActiveMQConnectionFactory.java:961) at java.lang.System$2.invokeFinalize(System.java:1270) at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:102) at java.lang.ref.Finalizer.access$100(Finalizer.java:34) at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:217) 基于文章修复NoSuchMethodErrors和NoSuchMethodExceptions的3个步骤我运行了“gradlew依赖项”。 | +--- org.apache.activemq:artemis-server:2.10.0 -> 2.4.0 | | +--- org.jboss.logging:jboss-logging:3.3.0.Final -> 3.3.2.Final | | +--- org.apache.activemq:artemis-commons:2.4.0 | | | +--- org.jboss.logging:jboss-logging:3.3.0.Final -> 3.3.2.Final | | | +--- io.netty:netty-buffer:4.1.16.Final -> 4.1.31.Final (*) | | | +--- io.netty:netty-transport:4.1.16.Final -> 4.1.31.Final (*) | | | +--- io.netty:netty-handler:4.1.16.Final -> 4.1.31.Final (*) | | | +--- commons-beanutils:commons-beanutils:1.9.3 | | | | +--- commons-logging:commons-logging:1.2 | | | | \--- commons-collections:commons-collections:3.2.2 | | | \--- com.google.guava:guava:19.0 -> 25.1-jre (*) | | +--- org.apache.activemq:artemis-selector:2.4.0 | | +--- org.apache.activemq:artemis-journal:2.4.0 | | | +--- org.jboss.logging:jboss-logging:3.3.0.Final -> 3.3.2.Final | | | +--- org.apache.activemq:artemis-commons:2.4.0 (*) | | | \--- org.apache.activemq:artemis-native:2.4.0 | | | \--- org.jboss.logging:jboss-logging:3.3.0.Final -> 3.3.2.Final | | +--- org.apache.activemq:artemis-jdbc-store:2.4.0 | | | +--- org.jboss.logging:jboss-logging:3.3.0.Final -> 3.3.2.Final | | | +--- org.apache.activemq:artemis-journal:2.4.0 (*) | | | \--- org.apache.activemq:artemis-core-client:2.4.0 | | | +--- org.jgroups:jgroups:3.6.13.Final -> 3.6.7.Final | | | +--- org.apache.activemq:artemis-commons:2.4.0 (*) | | | +--- org.apache.johnzon:johnzon-core:0.9.5 -> 1.1.10 | | | +--- io.netty:netty-transport-native-epoll:4.1.16.Final -> 4.1.31.Final (*) | | | +--- io.netty:netty-transport-native-kqueue:4.1.16.Final -> 4.1.31.Final (*) | | | \--- io.netty:netty-codec-http:4.1.16.Final -> 4.1.31.Final (*) | | +--- org.apache.activemq:artemis-core-client:2.4.0 (*) | | \--- io.netty:netty-all:4.1.16.Final -> 4.1.9.Final | +--- org.apache.activemq:artemis-commons:2.10.0 -> 2.4.0 (*) | +--- org.apache.activemq:artemis-jms-client-all:2.10.0 所以Artemis代理实际上运行在2.4.0版本下,而客户端运行在2.10.0版本下(使它们不兼容)。 我的文章指出: “最后,我们需要决定我们实际上需要两个版本中的哪一个来满足这两个依赖关系。通常,这是较新的版本,因为大多数框架在某种程度上都向后兼容。但是,也可能是相反的情况,或者我们可能会这样做甚至根本无法解决冲突。” 为了强制两者在 2.10.0 上运行,我在 build.gradle 文件中明确声明: configurations.all { resolutionStrategy { force 'org.apache.activemq:artemis-core-client:2.10.0', 'org.apache.activemq:artemis-broker:2.10.0','org.apache.activemq:artemis-commons:2.10.0','org.apache.activemq:artemis-selector:2.10.0','org.apache.activemq:artemis-journal:2.10.0' } } compile group: 'org.apache.activemq', name: 'artemis-core-client', version: '2.10.0' compile group: 'org.apache.activemq', name: 'artemis-commons', version: '2.10.0' compile group: 'org.apache.activemq', name: 'artemis-server', version: '2.10.0' compile group: 'org.apache.activemq', name: 'artemis-selector', version: '2.10.0' compile group: 'org.apache.activemq', name: 'artemis-journal', version: '2.10.0' 在此“gradlew依赖项”之后: | +--- org.apache.activemq:artemis-server:2.10.0 | | +--- org.jboss.logging:jboss-logging:3.4.0.Final -> 3.3.2.Final | | +--- org.jboss.logmanager:jboss-logmanager:2.1.10.Final | | | \--- org.wildfly.common:wildfly-common:1.5.1.Final | | +--- org.apache.activemq:artemis-commons:2.10.0 | | | +--- org.jboss.logging:jboss-logging:3.4.0.Final -> 3.3.2.Final | | | +--- io.netty:netty-buffer:4.1.34.Final -> 4.1.31.Final (*) | | | +--- io.netty:netty-transport:4.1.34.Final -> 4.1.31.Final (*) | | | +--- io.netty:netty-handler:4.1.34.Final -> 4.1.31.Final (*) | | | \--- commons-beanutils:commons-beanutils:1.9.3 | | | +--- commons-logging:commons-logging:1.2 | | | \--- commons-collections:commons-collections:3.2.2 | | +--- org.apache.activemq:artemis-selector:2.10.0 | | | \--- org.apache.activemq:artemis-commons:2.10.0 (*) | | +--- org.apache.activemq:artemis-journal:2.10.0 | | | +--- org.jboss.logging:jboss-logging:3.4.0.Final -> 3.3.2.Final | | | +--- org.apache.activemq:artemis-commons:2.10.0 (*) | | | +--- org.apache.activemq:activemq-artemis-native:1.0.0 | | | | +--- org.jboss.logging:jboss-logging:3.3.1.Final -> 3.3.2.Final | | | | \--- org.jboss.logmanager:jboss-logmanager:2.0.3.Final -> 2.1.10.Final (*) | | | +--- io.netty:netty-buffer:4.1.34.Final -> 4.1.31.Final (*) | | | \--- io.netty:netty-common:4.1.34.Final -> 4.1.31.Final | | +--- org.apache.activemq:artemis-jdbc-store:2.10.0 | | | +--- org.jboss.logging:jboss-logging:3.4.0.Final -> 3.3.2.Final | | | +--- org.apache.activemq:artemis-commons:2.10.0 (*) | | | +--- org.apache.activemq:artemis-journal:2.10.0 (*) | | | \--- org.apache.activemq:artemis-core-client:2.10.0 | | | +--- org.jgroups:jgroups:3.6.13.Final -> 3.6.7.Final | | | +--- org.apache.activemq:artemis-commons:2.10.0 (*) | | | +--- org.apache.johnzon:johnzon-core:0.9.5 -> 1.1.10 | | | +--- io.netty:netty-transport-native-epoll:4.1.34.Final -> 4.1.31.Final (*) | | | +--- io.netty:netty-transport-native-kqueue:4.1.34.Final -> 4.1.31.Final (*) | | | +--- io.netty:netty-codec-http:4.1.34.Final -> 4.1.31.Final (*) | | | +--- io.netty:netty-buffer:4.1.34.Final -> 4.1.31.Final (*) | | | +--- io.netty:netty-transport:4.1.34.Final -> 4.1.31.Final (*) | | | +--- io.netty:netty-handler:4.1.34.Final -> 4.1.31.Final (*) | | | +--- io.netty:netty-codec:4.1.34.Final -> 4.1.31.Final (*) | | | \--- io.netty:netty-common:4.1.34.Final -> 4.1.31.Final | | +--- org.apache.activemq:artemis-core-client:2.10.0 (*) | | +--- org.apache.activemq:activemq-artemis-native:1.0.0 (*) 问题 代理和客户端库都处于同一版本,并且应用程序似乎工作正常。然而这让我感到不安: 如何通过自动依赖解析在应用程序的发行说明中写入库已更新的信息,而实际上使用的是两年前的版本?作为一名开发人员,我怎么知道情况并非如此? 如何读取 gradlew 依赖项输出?强制使用旧的“2.4.0”版本的真正根本原因是什么? 强制使用新版本真的是一个好的解决方案吗?或者在覆盖自动依赖关系解析时是否会出现预期的问题? Gradle 6.0 之前版本的降级只能通过 force、配置级别 force 或替换规则来实现。您的构建中有些东西使用其中一种技术来强制降低版本。 要调查特定库的版本,请使用 dependencyInsight 任务获取有关为何选择特定版本模块的更详细报告。 类似 ./gradlew dependencyInsight --configuration <relevantConfiguration> --dependency artemis-server 的内容,其中 <relevantConfiguration> 可以是 compileClasspath 或 runtimeClasspath 或者更具体到您的项目的内容。 一旦您弄清楚为什么 2.10.0 降级为 2.4.0,您也许可以使用与 force 不同的解决方案来获得您期望的版本。

回答 1 投票 0

如何在较低级别视图中对组件之间的依赖关系进行建模

我有一个组件图(级别 1),其中包含内部组件之间的依赖关系。帐户组件“使用”计费组件: 现在我想创建

回答 1 投票 0

使用 Poetry 更新 Python 依赖项的最佳实践

在 github 上使用诗歌时自动更新 python 依赖项的最佳实践是什么? 我只需设置一个运行诗歌更新的操作(https://python-poetry.org/docs/cli/#...

回答 1 投票 0

链接库 RPATH 的 C++ 链接器选项

我有一个MyApp项目,它依赖于lib1.so库。 lib1.so 有自己的依赖项 lib2.so: MyApp -> lib1.so -> lib2.so 我想运行 MyApp,并将所有依赖项放在一个目录中。 为了...

回答 1 投票 0

带有标头保护和前向声明的 C++ 循环依赖

我有一个简单的 Vec3 类和一个简单的 xMath 类。 xMath 类应该更改 Vec3。只有 2 个文件 Vec3.hpp 和 xMath.hpp (并且我不允许创建其他文件)。 两者

回答 1 投票 0

让 Docker Compose 容器等待容器 PostgreSQL 并恢复

我有一个 docker compose,其中一个容器是 PostgreSQL,另一个容器是我的应用程序。我需要将两个数据库恢复到 PostgreSQL 中,然后启动应用程序。 目前我已经尝试过这个docker

回答 1 投票 0

在模块lifecycle-viewmodel-2.5.0-runtime中发现重复的类androidx.lifecycle.ViewModelLazy

我正在使用 Android Studio Chipmunk | 2021.2.1 补丁 2。 当我使用实现“androidx.appcompat:appcompat:1.5.0”版本时,出现以下错误。 重复的类 androidx.lifecycle.

回答 8 投票 0

自动生成模块的依赖关系

我现在开始了解模块 如果我们想使用 import ;我们需要“预编译”iostream 头文件,而不是旧式的 #include 。我们可以...

回答 1 投票 0

polyfills 应该是依赖项还是 devDependency?

正如这篇 SO 文章所解释的,polyfills 应该位于依赖文件夹中。 但是,Array.find() polyfill 具有以下安装说明。 npm install --save-dev jspolyfill-array.

回答 1 投票 0

如何在命令行上指定 Maven 依赖插件 get 的版本范围

我正在尝试使用 Maven 依赖插件来获取特定版本范围内的工件。我需要在命令行(或在脚本中)执行此操作 这是我尝试过的: mvn 依赖项:get -Dart...

回答 3 投票 0

npm start 和安装软件包的问题:有关 babel-preset-react-app 依赖项的警告和审核修复冻结了 VSCode

每当我运行 npm start 时,我都会遇到以下消息: 您的依赖项之一 babel-preset-react-app 正在导入 “@babel/plugin-proposal-private-property-in-object”包没有

回答 1 投票 0

未命名命名空间中的自由函数与具有私有成员函数的类相比有什么好处?

与拥有私有类 mem 相比,拥有自由函数(在匿名命名空间中并且只能在单个源文件中访问)并将所有变量作为参数发送有什么优势...

回答 3 投票 0

Angular -> 没有依赖模板:ConstDependency

这是我的代码: const Worker = new Worker('./app.worker.ts', { type: 'module' }); console.log('这是工人'); 控制台.log(工人); worker.onmessage = ({ 数据 }) => { console.log(`页面...

回答 3 投票 0

如何解决JavaFx项目中的commons.math3 not found错误?

我正在尝试制作一个从excel文件中读取数据的javafx程序。我已经在我的项目中添加了 poi 依赖项。 这是我的 build.gradle 文件代码。 插件{ id 'java' id'应用程序...

回答 1 投票 0

应用程序无法启动,因为其并行配置不正确

未处理的异常:System.IO.FileLoadException:无法加载文件 或组装 'TheLibrary,版本=1.2.3905.36284,文化=中性, PublicKeyToken=14 04827c3a8f2601' 或其依赖项之一...

回答 0 投票 0

© www.soinside.com 2019 - 2024. All rights reserved.