小编ngo*_*ong的帖子

maven-compiler-plugin:jar:3.8.1 丢失

尝试使用 3.8.1 而不是 3.8.0 但得到消息:

[警告] org.apache.maven.plugins:maven-compiler-plugin:jar:3.8.1 的 POM 丢失,没有可用的依赖信息。

我的 pom.xml 在 3.8.0 上运行良好。除了一个特定的问题。我期待已久的 3.8.1。根据Maven Central,它似乎可用。但简单地在我的 pom.xml 中将 3.8.0 更改为 3.8.1 会导致警告和失败消息:

插件 org.apache.maven.plugins:maven-compiler-plugin:3.8.1 或其依赖项之一无法解析:Failure to find org.apache.maven.plugins:maven-compiler-plugin:jar:3.8.1在https://repo.maven.apache.org/maven2被缓存在本地存储库中,直到 central 的更新间隔已过或强制更新时才会重新尝试解析 -> [帮助 1]

        <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.8.1</version>
            <configuration>
                <source>11</source>
                <target>11</target>
                <debug>true</debug>
            </configuration>
        </plugin>
Run Code Online (Sandbox Code Playgroud)

我误解了什么,在 Maven Central 中看到 3.8.1 但不能在我的 pom.xml 中使用它?

java maven

6
推荐指数
1
解决办法
6095
查看次数

Eclipse 2020-06 中与 m2e 的多个 SLF4J 绑定

得到了一个问题SLF4J的工作对我来说与M2E。这不是第一次陈述这个问题。然而,其他人有一个更具体的案例,仍然没有答案。

我全新安装了 Eclipse-jee。为了测试,我从maven-archetype-quickstart创建了一个最简单的 maven 项目。它只是打印出Hello World!

尽管应用m2e它编译并运行良好,但我收到红色消息

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Users/rschumacher/install/eclipse-jee/plugins/org.eclipse.m2e.maven.runtime.slf4j.simple_1.16.0.20200610-1735/jars/slf4j-simple-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [file:/C:/Users/rschumacher/install/eclipse-jee/configuration/org.eclipse.osgi/5/0/.cp/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.SimpleLoggerFactory]
Run Code Online (Sandbox Code Playgroud)

在执行run as/Maven test时,任何 Maven 项目都会发生这种情况。
它并不能帮助看依赖性:树中的pom.xml中,由于发生冲突的绑定与M2E和OSGi(据我可以interprete的消息)。

作为结果,SLF4J忽略配置和不再可用在Eclipse与M2E安装。
如果我从命令行启动mvn test,则不会出现此类消息。slf4j日志记录正常工作。

你有任何想法,或者为了有解决办法SLF4J有再次合作M2E

eclipse m2eclipse maven

6
推荐指数
2
解决办法
2323
查看次数

Eclipse 中的 maven 更新:无法更新项目

我正在使用 Jersey 进行 REST 的第一步,然后使用m2e。经过对 tomcat 10 和 Java-17 的一些调整后,它在 tomcat 10.1 上部署得很好。

现在,我想做下一步,将新内容添加到 pom.xml 中。但是执行Maven / Update Project ...会导致失败消息:

Could not update project HelloREST configuration
Cannot invoke "org.eclipse.wst.common.componentcore.internal.WorkbenchComponent.findResourcesByRuntimePath(org.eclipse.core.runtime.IPath)"
because "aComponent" is null
Run Code Online (Sandbox Code Playgroud)

此外,错误日志还显示

eclipse.buildId=4.26.0.20221201-1200
java.version=17.0.5
java.vendor=Eclipse Adoptium
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.jee.product
Command-line arguments:  -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.jee.product

org.eclipse.m2e.logback.appender
Error
Tue Feb 07 13:19:45 CET 2023
HelloREST/.settings/org.eclipse.wst.common.component is missing or invalid. Skipping module dependency …
Run Code Online (Sandbox Code Playgroud)

eclipse tomcat m2eclipse maven

5
推荐指数
1
解决办法
4300
查看次数

标签 统计

maven ×3

eclipse ×2

m2eclipse ×2

java ×1

tomcat ×1