Java Maven在终端中找不到io.reactivex.subjects,在Eclipse中成功

Java Maven在终端中找不到io.reactivex.subjects,在Eclipse中成功,java,eclipse,maven,terminal,Java,Eclipse,Maven,Terminal,在尝试为Gitlab CI准备个人项目时,我偶然发现了一个问题,maven在终端中找不到io.reactivex.subjects包,因此编译失败如下: [INFO] --- maven-compiler-plugin:3.7.0:compile (default-compile) @ spell-idle --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 24 source files to /home

在尝试为Gitlab CI准备个人项目时,我偶然发现了一个问题,maven在终端中找不到
io.reactivex.subjects
包,因此编译失败如下:

[INFO] --- maven-compiler-plugin:3.7.0:compile (default-compile) @ spell-idle ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 24 source files to /home/aschaefer/dev/spell-idle/target/classes
...
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project spell-idle: Compilation failure: Compilation failure: 
[ERROR] /home/aschaefer/dev/spell-idle/src/com/aps/spells/rx/GuiSubjects.java:[5,29] package io.reactivex.subjects does not exist
[ERROR] /home/aschaefer/dev/spell-idle/src/com/aps/spells/rx/GuiSubjects.java:[6,29] package io.reactivex.subjects does not exist
[ERROR] /home/aschaefer/dev/spell-idle/src/com/aps/spells/rx/GuiSubjects.java:[14,29] cannot find symbol
[ERROR]   symbol:   class Subject
[ERROR]   location: class com.aps.spells.rx.GuiSubjects
[ERROR] /home/aschaefer/dev/spell-idle/src/com/aps/spells/rx
以下是pom的相关部分。如果还需要其他内容,请告诉我,我将在以下内容中编辑:

<dependencies>
    <dependency>
        <groupId>io.reactivex.rxjava2</groupId>
        <artifactId>rxjavafx</artifactId>
        <version>2.2.2</version>
    </dependency>
... (other dependencies here)
</dependencies>

io.reactivex.rxjava2
rxjavafx
2.2.2
... (此处为其他依赖项)
我一直在运行各种命令组合,如
mvn clean install
mvn compile test
,但似乎没有什么帮助

maven的Eclipse版本是3.5.3,系统版本是3.5.2

我在~/.m2目录中没有settings.xml


提前感谢您提供的任何帮助

正如您所说,eclipse正在发挥作用,转到
Preferences>Maven>user settings
在那里,您将看到eclipse mvn配置,并将其与系统上正常使用的
~/.m2/settings.xml
或环境变量
$m2\u HOME/conf/settings.xml

中的配置进行比较。您是否检查了eclipse的Maven是否与系统中使用的配置相同?使用相同的配置?版本有点不同:我的终端版本是3.5.2,我的Eclipse是3.5.3。我将把这些信息添加到原始问题中。奇怪的是,~/.m2目录中没有settings.xml。我会看看是否还有其他地方可能存在settings.xml。但是你检查过eclipse使用的maven的配置和版本吗?我用eclipse使用的maven版本编辑了OP;这是对我的系统专家的颠覆。至于配置,它似乎完全没有偏离安装maven eclipse插件后获得的标准设置?您确定使用的是相同的pom.xml吗?