什么控制台打印,我试图运行一个java web应用程序在netbean和我不太明白为什么它给我的错误。
Downloaded from central: https://repo.maven.apache.org/maven2/com/thoughtworks/xstream/xstream/1.4.4/xstream-1.4.4.jar (483 kB at 33 kB/s)
Error injecting: org.apache.maven.plugin.war.WarMojo
com.google.inject.ProvisionException: Unable to provision, see the following errors:
1) Error injecting constructor, java.lang.ExceptionInInitializerError
at org.apache.maven.plugin.war.WarMojo.<init>(Unknown Source)
while locating org.apache.maven.plugin.war.WarMojo
1 error
at com.google.inject.internal.InternalProvisionException.toProvisionException (InternalProvisionException.java:226)
at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1053)
at com.google.inject.internal.InjectorImpl.getInstance (InjectorImpl.java:1086)
at org.eclipse.sisu.space.AbstractDeferredClass.get (AbstractDeferredClass.java:48)
at com.google.inject.internal.ProviderInternalFactory.provision (ProviderInternalFactory.java:85)
无法执行目标组织。阿帕奇。专家插件:maven war插件:2.3:primera_项目web上的war(默认war):目标组织的执行默认war。阿帕奇。专家插件:maven war插件:2.3:war失败:无法在插件“org”中加载mojo“war”。阿帕奇。专家插件:maven war插件:2.3'由于API不兼容:org。科德豪斯。神经丛。组成部分存储库。例外ComponentLookupException:null
realm = plugin>org.apache.maven.plugins:maven-war-plugin:2.3
strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
urls[0] = file:/C:/Users/HP/.m2/repository/org/apache/maven/plugins/maven-war-plugin/2.3/maven-war-plugin-2.3.jar
urls[1] = file:/C:/Users/HP/.m2/repository/org/apache/maven/reporting/maven-reporting-api/2.0.6/maven-reporting-api-2.0.6.jar
urls[2] = file:/C:/Users/HP/.m2/repository/org/apache/maven/doxia/doxia-sink-api/1.0-alpha-7/doxia-sink-api-1.0-alpha-7.jar
urls[3] = file:/C:/Users/HP/.m2/repository/commons-cli/commons-cli/1.0/commons-cli-1.0.jar
Number of foreign imports: 1
import: Entry[import from realm ClassRealm[maven.api, parent: null]]
-----------------------------------------------------
: ExceptionInInitializerError: Unable to make field private final java.util.Comparator java.util.TreeMap.comparator accessible: module java.base does not "opens java.util" to unnamed module @5c82031b
-> [Help 1]
To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.
For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException
归档pom。xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany</groupId>
<artifactId>primera_web</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<name>primera_web</name>
<properties>
<endorsed.dir>${project.build.directory}/endorsed</endorsed.dir>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-web-api</artifactId>
<version>7.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<compilerArguments>
<endorseddirs>${endorsed.dir}</endorseddirs>
</compilerArguments>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<outputDirectory>${endorsed.dir}</outputDirectory>
<silent>true</silent>
<artifactItems>
<artifactItem>
<groupId>javax</groupId>
<artifactId>javaee-endorsed-api</artifactId>
<version>7.0</version>
<type>jar</type>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
解决问题的建议??
我通过简单地进入Jenkins全局工具配置并将JDK的路径更改为/usr/local/ceral,就解决了这个问题/openjdk@11/11.0.10
。以前在我的本地机器MAC中是/usr/local/ceral/openjdk/16.0.1
。
点击这里查看
这是错误:
Downloaded from central: https://repo.maven.apache.org/maven2/com/thoughtworks/xstream/xstream/1.3.1/xstream-1.3.1.jar (431 kB at 529 kB/s)
11:52:49 [WARNING] Error injecting: org.apache.maven.plugin.war.WarMojo
11:52:49 com.google.inject.ProvisionException: Unable to provision, see the following errors:
11:52:49
11:52:49 1) Error injecting constructor, java.lang.ExceptionInInitializerError: Cannot access defaults field of Properties
11:52:49 at org.apache.maven.plugin.war.WarMojo.<init>(Unknown Source)
您可以通过将项目中的JDK更改为JDK 14来修复它。左键单击项目并转到属性-
我也有同样的问题。我正在使用Eclipse Jun 2021发布。在POM中手动配置最近的一个war插件后,问题得到了解决。xml。
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.3.1</version>
</plugin>
我目前正在制作一个Spigot插件,为了构建这个插件,我使用了生命周期包构建。我正在制作的Spigot插件实际上是一个API,所以很自然地我想包含JavaDocs。问题是,我已经制作了JavaDocs,我知道只是觉得我需要将maven-javadoc-plugin放在我的构建和报告中。但是,每当我重新加载maven更改时,我在构建时都会收到错误,说*Plugin。这很不幸,因为我已经在这个插件上查
在Ubuntu服务器18.04上,我创建了一个框架Maven项目,如下所示,我只是想编译它。 运行mvn编译可以。但运行mvn测试失败,出现错误 [错误]无法执行目标组织。阿帕奇。专家插件:maven surefire插件:2.20.1:project my app上的测试(默认测试):目标组织的执行默认测试。阿帕奇。专家插件:maven surefire插件:2.20.1:测试失败:NullPo
运行Maven测试时出现此错误 执行目标组织失败。阿帕奇。专家插件:maven插件插件:3.2:项目amsframeworok上的描述符(默认描述符):提取插件描述符时出错:“未找到插件:ams5的mojo定义。0:amsframeworok。'- 下面是我的pom。xml
我们一直在尝试在我们的项目工作区上运行mvn-X-e干净包时遇到问题,它产生了以下错误: [错误]无法执行目标组织。阿帕奇。专家插件:maven resources插件:3.2.0:project eWell web上的资源(默认资源):输入长度=1- 我强调了重要部分,因为这有助于我们孤立这个问题。显然,通过阅读其他文章,我们确定默认资源路径中的文件中存在一些无关字符。在我们的例子中,这是src
来自Eclipse火星版,pom。xml-Run-As-maven-clean,我得到了以下关于构建失败的错误消息 [ERROR]无法执行目标组织。阿帕奇。专家插件:maven clean插件:2.5:项目测试框架上的clean(默认清洁):目标组织的执行默认清洁。阿帕奇。专家插件:maven clean插件:2.5:clean失败:插件组织。阿帕奇。专家plugins:maven clean p
我正在做一个端到端的项目,包括后端和前端。前端工作正常(angular2框架、“npm启动”和“ng构建”工作正常)。但是,当我从project home文件夹运行“mvn clean install”时,它会给我一个错误,我对此一无所知: 在project home文件夹下,我可以成功运行“mvn compile”,但不能运行“mvn clean install”。它显示前端故障,并显示上面的错