From issues-return-100761-apmail-maven-issues-archive=maven.apache.org@maven.apache.org Sat Feb 28 15:06:43 2015 Return-Path: X-Original-To: apmail-maven-issues-archive@minotaur.apache.org Delivered-To: apmail-maven-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C402D1056A for ; Sat, 28 Feb 2015 15:06:43 +0000 (UTC) Received: (qmail 34894 invoked by uid 500); 28 Feb 2015 15:06:43 -0000 Delivered-To: apmail-maven-issues-archive@maven.apache.org Received: (qmail 34838 invoked by uid 500); 28 Feb 2015 15:06:43 -0000 Mailing-List: contact issues-help@maven.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@maven.apache.org Delivered-To: mailing list issues@maven.apache.org Received: (qmail 34826 invoked by uid 99); 28 Feb 2015 15:06:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 28 Feb 2015 15:06:43 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [199.193.192.100] (HELO codehaus01.managed.contegix.com) (199.193.192.100) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 28 Feb 2015 15:06:38 +0000 Received: from codehaus01 (localhost.localdomain [127.0.0.1]) by codehaus01.managed.contegix.com (Postfix) with ESMTP id 6ECCCB117C for ; Sat, 28 Feb 2015 09:06:18 -0600 (CST) Date: Sat, 28 Feb 2015 09:06:18 -0600 (CST) From: "Andreas Gudian (JIRA)" To: issues@maven.apache.org Message-ID: In-Reply-To: References: Subject: [jira] (MECLIPSE-738) NullPointerException in LinkedResource if is present in .project MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 22cf62d5d84cf5bea94eb3b65e0ebd09 X-Virus-Checked: Checked by ClamAV on apache.org [ https://jira.codehaus.org/browse/MECLIPSE-738?page=3Dcom.atlassian.j= ira.plugin.system.issuetabpanels:all-tabpanel ] Andreas Gudian reassigned MECLIPSE-738: --------------------------------------- Assignee: Andreas Gudian > NullPointerException in LinkedResource if is present in .pr= oject > -------------------------------------------------------------------------= ----- > > Key: MECLIPSE-738 > URL: https://jira.codehaus.org/browse/MECLIPSE-738 > Project: Maven Eclipse Plugin > Issue Type: Bug > Affects Versions: 2.9 > Reporter: Martin B=F6hm > Assignee: Andreas Gudian > Priority: Trivial > Attachments: linkedResourceProblem.zip, MECLIPSE-738-LinkedResour= ce.java.patch > > > I get a reproducable NullPointerException if I call eclipse:eclipse on a = project that always has a .project-file that contains links with -Tags. > {code} > [ERROR] Failed to execute goal org.apache.maven.plugins:maven-eclipse-plu= gin:2.9:eclipse (default-cli) on project linkedResourceProblem: Execution d= ef > ault-cli of goal org.apache.maven.plugins:maven-eclipse-plugin:2.9:eclips= e failed. NullPointerException -> [Help 1] > org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute= goal org.apache.maven.plugins:maven-eclipse-plugin:2.9:eclipse (default-cl= i) > on project linkedResourceProblem: Execution default-cli of goal org.apac= he.maven.plugins:maven-eclipse-plugin:2.9:eclipse failed. > at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoE= xecutor.java:225) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoE= xecutor.java:153) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoE= xecutor.java:145) > at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.bui= ldProject(LifecycleModuleBuilder.java:84) > at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.bui= ldProject(LifecycleModuleBuilder.java:59) > at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThr= eadedBuild(LifecycleStarter.java:183) > at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(L= ifecycleStarter.java:161) > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) > at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) > at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) > at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccess= orImpl.java:57) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth= odAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:601) > at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanc= ed(Launcher.java:290) > at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launc= her.java:230) > at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExit= Code(Launcher.java:409) > at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launche= r.java:352) > Caused by: org.apache.maven.plugin.PluginExecutionException: Execution de= fault-cli of goal org.apache.maven.plugins:maven-eclipse-plugin:2.9:eclipse= f > ailed. > at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(= DefaultBuildPluginManager.java:110) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoE= xecutor.java:209) > ... 19 more > Caused by: java.lang.NullPointerException > at org.apache.maven.plugin.eclipse.LinkedResource.(LinkedRe= source.java:131) > at org.apache.maven.plugin.eclipse.writers.EclipseProjectWriter.w= rite(EclipseProjectWriter.java:154) > at org.apache.maven.plugin.eclipse.EclipsePlugin.writeConfigurati= on(EclipsePlugin.java:1232) > at org.apache.maven.plugin.ide.AbstractIdeSupportMojo.execute(Abs= tractIdeSupportMojo.java:511) > at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(= DefaultBuildPluginManager.java:101) > ... 20 more > {code} > If I change the present to in .project and call = eclipse:eclipse I won't get the error. Also if I call eclipse:clean before = calling eclipse:eclipse the .project file of course gets cleaned and will b= e created new, so temporary links get lost unfortunately. > I suppose it has to do with the following lines in org.apache.maven.plugi= n.eclipse.LinkedResource and how the locationNode is retrieved. > {code} > 119 =09Xpp3Dom locationNode =3D node.getChild( "location" ); > 120 =09Xpp3Dom locationURINode =3D node.getChild( "locationURI" ); > {code}=20 > Possible workarounds: > - Call eclipse:clean before and recreate temporary links again. > - Replace all with before calling eclipse:eclips= e to preserve temporary links. -- This message was sent by Atlassian JIRA (v6.1.6#6162)