M2eclipse java. Lang. nullpointerexception

Source: Internet
Author: User

An error is reported when you use m2eclipse to import an existing Maven project.

 

Java. Lang. nullpointerexception
At org. Apache. Maven. plugin. defaultindescriptorcache $ cachekey. <init> (defaultplugindescriptorcache. Java: 165)
At org. Apache. Maven. plugin. defaultindescriptorcache. createkey (defaultplugindescriptorcache. Java: 62)
At org. Apache. Maven. plugin. Internal. defaultmavenpluginmanager. getplugindescriptor (defaultmavenpluginmanager. Java: 136)
At org. Apache. Maven. plugin. Internal. defaultmavenpluginmanager. getmojodescriptor (defaultmavenpluginmanager. Java: 261)
At org. Apache. Maven. plugin. defaultbuildpluginmanager. getmojodescriptor (defabuilbuildpluginmanager. Java: 192)
At org. Maven. Ide. Eclipse. Internal. embedder. mavenimpl. getmojoparametervalue (mavenimpl. Java: 765)
At org. Maven. Ide. Eclipse. jdt. Internal. abstractjavaprojectconfigurator. addprojectsourcefolders (abstractjavaprojectconfigurator. Java: 248)
At org. Maven. Ide. Eclipse. jdt. Internal. abstractjavaprojectconfigurator. Configure (abstractjavaprojectconfigurator. Java: 99)
At org. Maven. Ide. Eclipse. Project. configurator. abstractlifecyclemapping. Configure (abstractlifecyclemapping. Java: 57)
At org. Maven. Ide. Eclipse. Internal. Project. genericlifecyclemapping. Configure (genericlifecyclemapping. Java: 48)
At org. Maven. Ide. Eclipse. Internal. Project. projectconfigurationmanager. updateprojectconfiguration (projectconfigurationmanager. Java: 306)
At org. Maven. Ide. Eclipse. Internal. Project. projectconfigurationmanager. configurenewmavenproject (projectconfigurationmanager. Java: 240)
At org. Maven. Ide. Eclipse. Internal. Project. projectconfigurationmanager. enablemavennature (projectconfigurationmanager. Java: 317)
At org. Maven. Ide. Eclipse. Actions. enablenatureaction $ 1.run( enablenatureaction. Java: 123)
At org.eclipse.core.internal.jobs. Worker. Run (worker. Java: 54)

 

 

The reason is that the plug-in POM. XML does not have a specific version.

 

For example

No version is specified for the plug-in that caused the above error.

<Plugin>
<Groupid> org. Apache. Maven. plugins </groupid>
<Artifactid> Maven-compiler-plugin </artifactid>
</Plugin>

 

Correct syntax:

<Plugin>
<Groupid> org. Apache. Maven. plugins </groupid>
<Artifactid> Maven-compiler-plugin </artifactid>
<Version> 2.3.2 </version> <! -- Note that you need to write the version number -->
</Plugin>

 

 

Source

Https://bugs.eclipse.org/bugs/show_bug.cgi? Id = 340285

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.