As a related note, there are other things in m2e that tries to get configuration from the maven-compiler-plugin. One such thing is the character encoding. I *think* that that code handles null, but I'm quite sure there is no IT for it, which should be added.
/Anders On Mon, May 30, 2011 at 12:20, Xavi Beumala <[email protected]> wrote: > Hi Fred for such a quick response. > > > > I have just come up with the same solution after debugging what was going > on. the version fro maven-compiler-plugin is missing. > > > > many again! > > Xavi > > > > *From:* [email protected] [mailto: > [email protected]] *On Behalf Of *Fred Bricon > *Sent:* lunes, 30 de mayo de 2011 12:19 > *To:* Maven Integration for Eclipse users mailing list > *Subject:* Re: [m2e-users] Null pointer when importing a maven project > > > > Looks like, since this is an unconventional package, the > maven-compiler-plugin is not bound to the maven lifecycle. > The java configurator is trying to infer the java version from the > maven-compiler-plugin configuration, but fails. You can try adding > <plugin> > <artifactId>maven-compiler-plugin</artifactId> > <version>2.3.2</version> > </plugin> > in your <plugins> node. I'm not sure it'll work. In any case, you should > open an issue at https://bugs.eclipse.org/bugs/enter_bug.cgi?product=m2e > > Regards, > > Fred Bricon > > 2011/5/30 Xavi Beumala <[email protected]> > > Hi all, > > I have a very simple project (basically it's a folder with the pom.xml and > a src/main/resources empty folder), see pom file below. > When importing it In Eclipse as an existing maven project I get an > exception (copied below). The problem is that after the exception the > project is imported but it's only half configured (i.e. the classpath is > wrong). > > Any hint on what might be going on? > > Many thanks > Xavi > > > //------------- > // pom.xml > //------------- > <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>test</groupId> > <artifactId>TestProject</artifactId> > <version>0.0.1-SNAPSHOT</version> > <name>New Test Project</name> > <packaging>content-package</packaging> > > <build> > <plugins> > <plugin> > <groupId>com.day.jcr.vault</groupId> > <artifactId>maven-vault-plugin</artifactId> > <version>0.0.7</version> > <extensions>true</extensions> > </plugin> > </plugins> > </build> > </project> > > > > //------------------------- > // RTE > //------------------------- > An internal error occurred during: "Importing Maven projects". > > java.lang.NullPointerException > at > org.apache.maven.plugin.DefaultPluginDescriptorCache$CacheKey.<init>(DefaultPluginDescriptorCache.java:164) > at > org.apache.maven.plugin.DefaultPluginDescriptorCache.createKey(DefaultPluginDescriptorCache.java:62) > at > org.apache.maven.plugin.internal.DefaultMavenPluginManager.getPluginDescriptor(DefaultMavenPluginManager.java:130) > at > org.apache.maven.plugin.internal.DefaultMavenPluginManager.getMojoDescriptor(DefaultMavenPluginManager.java:251) > at > org.apache.maven.plugin.DefaultBuildPluginManager.getMojoDescriptor(DefaultBuildPluginManager.java:197) > at > org.maven.ide.eclipse.internal.embedder.MavenImpl.getMojoParameterValue(MavenImpl.java:765) > at > org.maven.ide.eclipse.jdt.internal.AbstractJavaProjectConfigurator.getCompilerLevel(AbstractJavaProjectConfigurator.java:399) > at > org.maven.ide.eclipse.jdt.internal.AbstractJavaProjectConfigurator.addJavaProjectOptions(AbstractJavaProjectConfigurator.java:370) > at > org.maven.ide.eclipse.jdt.internal.AbstractJavaProjectConfigurator.configure(AbstractJavaProjectConfigurator.java:95) > 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.importProjects(ProjectConfigurationManager.java:146) > at > org.maven.ide.eclipse.wizards.MavenImportWizard$1.runInWorkspace(MavenImportWizard.java:94) > at > org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38) > at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) > > > _______________________________________________ > m2e-users mailing list > [email protected] > https://dev.eclipse.org/mailman/listinfo/m2e-users > > > > > -- > "Have you tried turning it off and on again" - The IT Crowd > > _______________________________________________ > m2e-users mailing list > [email protected] > https://dev.eclipse.org/mailman/listinfo/m2e-users > >
_______________________________________________ m2e-users mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/m2e-users
