jjzjj

java - Maven 错误 : Could not find or load main class org. codehaus.plexus.classworlds.launcher.Launcher

coder 2023-08-31 原文

<分区>

我已经被这个简单的问题困了一个小时了。 Maven 上周工作正常,我不知道出了什么问题它给了我这个错误。我尝试了所有调试方法以及在 StackOverflow 和许多其他地方找到的所有解决方案。我什至尝试用 M3_HOME 和 MAVEN_HOME 替换 M2_HOME 路径。没有任何效果。我在 OS X 上。下面是几个 Maven 命令的输出。我很乐意提供更多信息

$ mvn
Error: Could not find or load main class org.codehaus.plexus.classworlds.launcher.Launcher

$ which mvn
/Library/Maven-3.3.3/bin/mvn

$ echo $M2_HOME
/Library/Maven-3.3.3

$ echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home

$ which java
/usr/bin/java

$ /Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home/bin/java -version
java version "1.7.0_75"
Java(TM) SE Runtime Environment (build 1.7.0_75-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.75-b04, mixed mode)

$ echo $PATH
/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Tomcat/bin:/Library/Maven-3.3.3/bin

$ java -version
java version "1.7.0_75"
Java(TM) SE Runtime Environment (build 1.7.0_75-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.75-b04, mixed mode)

$  ls -lR /Library/Maven-3.3.3
total 56
-rw-r--r--@  1 USERNAME  wheel  19091 Apr 22 04:58 LICENSE
-rw-r--r--@  1 USERNAME  wheel    182 Apr 22 04:58 NOTICE
-rw-r--r--@  1 USERNAME  wheel   2541 Apr 22 04:55 README.txt
drwxr-xr-x@  8 USERNAME  wheel    272 Oct 14 12:24 bin
drwxr-xr-x@  3 USERNAME  wheel    102 Oct 14 12:24 boot
drwxr-xr-x@  5 USERNAME  wheel    170 Apr 22 04:55 conf
drwxr-xr-x@ 75 USERNAME  wheel   2550 Oct 14 12:24 lib

/Library/Maven-3.3.3/bin:
total 64
-rw-r--r--@ 1 USERNAME  wheel   230 Apr 22 04:58 m2.conf
-rwxr-xr-x@ 1 USERNAME  wheel  7075 Apr 22 04:58 mvn
-rw-r--r--@ 1 USERNAME  wheel  6007 Apr 22 04:58 mvn.cmd
-rwxr-xr-x@ 1 USERNAME  wheel  1796 Apr 22 04:58 mvnDebug
-rw-r--r--@ 1 USERNAME  wheel  1513 Apr 22 04:58 mvnDebug.cmd
-rwxr-xr-x@ 1 USERNAME  wheel  1843 Apr 22 04:58 mvnyjp

/Library/Maven-3.3.3/boot:
total 104
-rw-r--r--@ 1 USERNAME  wheel  52684 Aug 29  2014 plexus-classworlds-2.5.2.jar

/Library/Maven-3.3.3/conf:
total 32
drwxr-xr-x@ 3 USERNAME  wheel    102 Apr 22 04:55 logging
-rw-r--r--@ 1 USERNAME  wheel  10216 Apr 22 04:55 settings.xml
-rw-r--r--@ 1 USERNAME  wheel   3649 Apr 22 04:55 toolchains.xml

/Library/Maven-3.3.3/conf/logging:
total 8
-rw-r--r--@ 1 USERNAME  wheel  1126 Apr 22 04:55 simplelogger.properties

/Library/Maven-3.3.3/lib:
total 18656
-rw-r--r--@ 1 USERNAME  wheel   136324 Jan 29  2015 aether-api-1.0.2.v20150114.jar
-rw-r--r--@ 1 USERNAME  wheel    12637 Apr 22 04:58 aether-api.license
-rw-r--r--@ 1 USERNAME  wheel    36745 Jan 29  2015 aether-connector-basic-1.0.2.v20150114.jar
-rw-r--r--@ 1 USERNAME  wheel    12637 Apr 22 04:58 aether-connector-basic.license
-rw-r--r--@ 1 USERNAME  wheel   172998 Jan 29  2015 aether-impl-1.0.2.v20150114.jar
-rw-r--r--@ 1 USERNAME  wheel    12637 Apr 22 04:58 aether-impl.license
-rw-r--r--@ 1 USERNAME  wheel    30705 Jan 29  2015 aether-spi-1.0.2.v20150114.jar
-rw-r--r--@ 1 USERNAME  wheel    12637 Apr 22 04:58 aether-spi.license
-rw-r--r--@ 1 USERNAME  wheel    25355 Jan 29  2015 aether-transport-wagon-1.0.2.v20150114.jar
-rw-r--r--@ 1 USERNAME  wheel    12637 Apr 22 04:58 aether-transport-wagon.license
-rw-r--r--@ 1 USERNAME  wheel   146876 Jan 29  2015 aether-util-1.0.2.v20150114.jar
-rw-r--r--@ 1 USERNAME  wheel    12637 Apr 22 04:58 aether-util.license
-rw-r--r--@ 1 USERNAME  wheel     4467 May  7  2013 aopalliance-1.0.jar
-rw-r--r--@ 1 USERNAME  wheel    44908 May  7  2013 cdi-api-1.0.jar
-rw-r--r--@ 1 USERNAME  wheel    21837 Apr 22 04:58 cdi-api.license
-rw-r--r--@ 1 USERNAME  wheel    41123 May  7  2013 commons-cli-1.2.jar
-rw-r--r--@ 1 USERNAME  wheel   173587 May  7  2013 commons-io-2.2.jar
-rw-r--r--@ 1 USERNAME  wheel   284220 May  7  2013 commons-lang-2.6.jar
drwxr-xr-x@ 3 USERNAME  wheel      102 Apr 22 04:55 ext
-rw-r--r--@ 1 USERNAME  wheel  2256213 Nov  1  2014 guava-18.0.jar
-rw-r--r--@ 1 USERNAME  wheel     2497 May  7  2013 javax.inject-1.jar
-rw-r--r--@ 1 USERNAME  wheel   293671 Jul 24  2013 jsoup-1.7.2.jar
-rw-r--r--@ 1 USERNAME  wheel     3449 Apr 22 04:58 jsoup.license
-rw-r--r--@ 1 USERNAME  wheel     5848 May  7  2013 jsr250-api-1.0.jar
-rw-r--r--@ 1 USERNAME  wheel    18116 Apr 22 04:58 jsr250-api.license
-rw-r--r--@ 1 USERNAME  wheel    66349 Apr 22 04:57 maven-aether-provider-3.3.3.jar
-rw-r--r--@ 1 USERNAME  wheel    11358 Apr 22 04:58 maven-aether-provider.license
-rw-r--r--@ 1 USERNAME  wheel    55090 Apr 22 04:56 maven-artifact-3.3.3.jar
-rw-r--r--@ 1 USERNAME  wheel    11358 Apr 22 04:58 maven-artifact.license
-rw-r--r--@ 1 USERNAME  wheel    14964 Apr 22 04:56 maven-builder-support-3.3.3.jar
-rw-r--r--@ 1 USERNAME  wheel    11358 Apr 22 04:58 maven-builder-support.license
-rw-r--r--@ 1 USERNAME  wheel   286726 Apr 22 04:58 maven-compat-3.3.3.jar
-rw-r--r--@ 1 USERNAME  wheel    11358 Apr 22 04:58 maven-compat.license
-rw-r--r--@ 1 USERNAME  wheel   631881 Apr 22 04:57 maven-core-3.3.3.jar
-rw-r--r--@ 1 USERNAME  wheel    11358 Apr 22 04:58 maven-core.license
-rw-r--r--@ 1 USERNAME  wheel    86051 Apr 22 04:58 maven-embedder-3.3.3.jar
-rw-r--r--@ 1 USERNAME  wheel    11358 Apr 22 04:58 maven-embedder.license
-rw-r--r--@ 1 USERNAME  wheel   160817 Apr 22 04:56 maven-model-3.3.3.jar
-rw-r--r--@ 1 USERNAME  wheel   176410 Apr 22 04:56 maven-model-builder-3.3.3.jar
-rw-r--r--@ 1 USERNAME  wheel    11358 Apr 22 04:58 maven-model-builder.license
-rw-r--r--@ 1 USERNAME  wheel    11358 Apr 22 04:58 maven-model.license
-rw-r--r--@ 1 USERNAME  wheel    46099 Apr 22 04:56 maven-plugin-api-3.3.3.jar
-rw-r--r--@ 1 USERNAME  wheel    11358 Apr 22 04:58 maven-plugin-api.license
-rw-r--r--@ 1 USERNAME  wheel    25957 Apr 22 04:57 maven-repository-metadata-3.3.3.jar
-rw-r--r--@ 1 USERNAME  wheel    11358 Apr 22 04:58 maven-repository-metadata.license
-rw-r--r--@ 1 USERNAME  wheel    43032 Apr 22 04:57 maven-settings-3.3.3.jar
-rw-r--r--@ 1 USERNAME  wheel    43154 Apr 22 04:57 maven-settings-builder-3.3.3.jar
-rw-r--r--@ 1 USERNAME  wheel    11358 Apr 22 04:58 maven-settings-builder.license
-rw-r--r--@ 1 USERNAME  wheel    11358 Apr 22 04:58 maven-settings.license
-rw-r--r--@ 1 USERNAME  wheel   375267 Feb 20  2015 org.eclipse.sisu.inject-0.3.0.jar
-rw-r--r--@ 1 USERNAME  wheel    12637 Apr 22 04:58 org.eclipse.sisu.inject.license
-rw-r--r--@ 1 USERNAME  wheel   205404 Feb 20  2015 org.eclipse.sisu.plexus-0.3.0.jar
-rw-r--r--@ 1 USERNAME  wheel    12637 Apr 22 04:58 org.eclipse.sisu.plexus.license
-rw-r--r--@ 1 USERNAME  wheel    13350 May  7  2013 plexus-cipher-1.7.jar
-rw-r--r--@ 1 USERNAME  wheel    21837 Apr 22 04:58 plexus-cipher.license
-rw-r--r--@ 1 USERNAME  wheel     4211 May  7  2013 plexus-component-annotations-1.5.5.jar
-rw-r--r--@ 1 USERNAME  wheel    62458 Oct 29  2014 plexus-interpolation-1.21.jar
-rw-r--r--@ 1 USERNAME  wheel    28555 May  7  2013 plexus-sec-dispatcher-1.3.jar
-rw-r--r--@ 1 USERNAME  wheel    21837 Apr 22 04:58 plexus-sec-dispatcher.license
-rw-r--r--@ 1 USERNAME  wheel   243128 Oct 29  2014 plexus-utils-3.0.20.jar
-rw-r--r--@ 1 USERNAME  wheel   399672 Feb 20  2015 sisu-guice-3.2.5-no_aop.jar
-rw-r--r--@ 1 USERNAME  wheel    26084 Jul 24  2013 slf4j-api-1.7.5.jar
-rw-r--r--@ 1 USERNAME  wheel    14853 Apr 22 04:58 slf4j-api.license
-rw-r--r--@ 1 USERNAME  wheel    10680 Aug 17  2013 slf4j-simple-1.7.5.jar
-rw-r--r--@ 1 USERNAME  wheel    14853 Apr 22 04:58 slf4j-simple.license
-rw-r--r--@ 1 USERNAME  wheel    11432 Apr 21 06:27 wagon-file-2.9.jar
-rw-r--r--@ 1 USERNAME  wheel    11358 Apr 22 04:58 wagon-file.license
-rw-r--r--@ 1 USERNAME  wheel  2259073 Apr 21 06:32 wagon-http-2.9-shaded.jar
-rw-r--r--@ 1 USERNAME  wheel    11787 Apr 21 06:27 wagon-http-shared-2.9.jar
-rw-r--r--@ 1 USERNAME  wheel    11358 Apr 22 04:58 wagon-http-shared.license
-rw-r--r--@ 1 USERNAME  wheel    11358 Apr 22 04:58 wagon-http.license
-rw-r--r--@ 1 USERNAME  wheel    53543 Apr 21 06:27 wagon-provider-api-2.9.jar
-rw-r--r--@ 1 USERNAME  wheel    11358 Apr 22 04:58 wagon-provider-api.license

/Library/Maven-3.3.3/lib/ext:
total 8
-rw-r--r--@ 1 USERNAME  wheel  152 Apr 22 04:55 README.txt

有关java - Maven 错误 : Could not find or load main class org. codehaus.plexus.classworlds.launcher.Launcher的更多相关文章

  1. ruby-on-rails - Rails 常用字符串(用于通知和错误信息等) - 2

    大约一年前,我决定确保每个包含非唯一文本的Flash通知都将从模块中的方法中获取文本。我这样做的最初原因是为了避免一遍又一遍地输入相同的字符串。如果我想更改措辞,我可以在一个地方轻松完成,而且一遍又一遍地重复同一件事而出现拼写错误的可能性也会降低。我最终得到的是这样的:moduleMessagesdefformat_error_messages(errors)errors.map{|attribute,message|"Error:#{attribute.to_s.titleize}#{message}."}enddeferror_message_could_not_find(obje

  2. java - 等价于 Java 中的 Ruby Hash - 2

    我真的很习惯使用Ruby编写以下代码:my_hash={}my_hash['test']=1Java中对应的数据结构是什么? 最佳答案 HashMapmap=newHashMap();map.put("test",1);我假设? 关于java-等价于Java中的RubyHash,我们在StackOverflow上找到一个类似的问题: https://stackoverflow.com/questions/22737685/

  3. ruby-on-rails - 迷你测试错误 : "NameError: uninitialized constant" - 2

    我遵循MichaelHartl的“RubyonRails教程:学习Web开发”,并创建了检查用户名和电子邮件长度有效性的测试(名称最多50个字符,电子邮件最多255个字符)。test/helpers/application_helper_test.rb的内容是:require'test_helper'classApplicationHelperTest在运行bundleexecraketest时,所有测试都通过了,但我看到以下消息在最后被标记为错误:ERROR["test_full_title_helper",ApplicationHelperTest,1.820016791]test

  4. ruby-on-rails - 如何在 Rails View 上显示错误消息? - 2

    我是rails的新手,想在form字段上应用验证。myviewsnew.html.erb.....模拟.rbclassSimulation{:in=>1..25,:message=>'Therowmustbebetween1and25'}end模拟Controller.rbclassSimulationsController我想检查模型类中row字段的整数范围,如果不在范围内则返回错误信息。我可以检查上面代码的范围,但无法返回错误消息提前致谢 最佳答案 关键是您使用的是模型表单,一种显示ActiveRecord模型实例属性的表单。c

  5. 使用 ACL 调用 upload_file 时出现 Ruby S3 "Access Denied"错误 - 2

    我正在尝试编写一个将文件上传到AWS并公开该文件的Ruby脚本。我做了以下事情:s3=Aws::S3::Resource.new(credentials:Aws::Credentials.new(KEY,SECRET),region:'us-west-2')obj=s3.bucket('stg-db').object('key')obj.upload_file(filename)这似乎工作正常,除了该文件不是公开可用的,而且我无法获得它的公共(public)URL。但是当我登录到S3时,我可以正常查看我的文件。为了使其公开可用,我将最后一行更改为obj.upload_file(file

  6. ruby-on-rails - 错误 : Error installing pg: ERROR: Failed to build gem native extension - 2

    我克隆了一个rails仓库,我现在正尝试捆绑安装背景:OSXElCapitanruby2.2.3p173(2015-08-18修订版51636)[x86_64-darwin15]rails-v在您的Gemfile中列出的或native可用的任何gem源中找不到gem'pg(>=0)ruby​​'。运行bundleinstall以安装缺少的gem。bundleinstallFetchinggemmetadatafromhttps://rubygems.org/............Fetchingversionmetadatafromhttps://rubygems.org/...Fe

  7. ruby - #之间? Cooper 的 *Beginning Ruby* 中的错误或异常 - 2

    在Cooper的书BeginningRuby中,第166页有一个我无法重现的示例。classSongincludeComparableattr_accessor:lengthdef(other)@lengthother.lengthenddefinitialize(song_name,length)@song_name=song_name@length=lengthendenda=Song.new('Rockaroundtheclock',143)b=Song.new('BohemianRhapsody',544)c=Song.new('MinuteWaltz',60)a.betwee

  8. ruby-on-rails - 每次我尝试部署时,我都会得到 - (gcloud.preview.app.deploy) 错误响应 : [4] DEADLINE_EXCEEDED - 2

    我是Google云的新手,我正在尝试对其进行首次部署。我的第一个部署是RubyonRails项目。我基本上是在关注thisguideinthegoogleclouddocumentation.唯一的区别是我使用的是我自己的项目,而不是他们提供的“helloworld”项目。这是我的app.yaml文件runtime:customvm:trueentrypoint:bundleexecrackup-p8080-Eproductionconfig.ruresources:cpu:0.5memory_gb:1.3disk_size_gb:10当我转到我的项目目录并运行gcloudprevie

  9. ruby-on-rails - Rails 5 Active Record 记录无效错误 - 2

    我有两个Rails模型,即Invoice和Invoice_details。一个Invoice_details属于Invoice,一个Invoice有多个Invoice_details。我无法使用accepts_nested_attributes_forinInvoice通过Invoice模型保存Invoice_details。我收到以下错误:(0.2ms)BEGIN(0.2ms)ROLLBACKCompleted422UnprocessableEntityin25ms(ActiveRecord:4.0ms)ActiveRecord::RecordInvalid(Validationfa

  10. arrays - 这是 Ruby 中 Array.fill 方法的错误吗? - 2

    这个问题在这里已经有了答案:Arraysmisbehaving(1个回答)关闭6年前。是否应该这样,即我误解了,还是错误?a=Array.new(3,Array.new(3))a[1].fill('g')=>[["g","g","g"],["g","g","g"],["g","g","g"]]它不应该导致:=>[[nil,nil,nil],["g","g","g"],[nil,nil,nil]]

随机推荐