maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Osipov (Jira)" <j...@apache.org>
Subject [jira] [Commented] (MWAR-439) WAR Plugin 3.3.1 hits NPE when exploding if maven session start time is null
Date Tue, 03 Nov 2020 18:06:00 GMT

    [ https://issues.apache.org/jira/browse/MWAR-439?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17225587#comment-17225587
] 

Michael Osipov commented on MWAR-439:
-------------------------------------

This is extremely weird. IT should never be null.

> WAR Plugin 3.3.1 hits NPE when exploding if maven session start time is null
> ----------------------------------------------------------------------------
>
>                 Key: MWAR-439
>                 URL: https://issues.apache.org/jira/browse/MWAR-439
>             Project: Maven WAR Plugin
>          Issue Type: Bug
>    Affects Versions: 3.3.1
>         Environment: Windows 10
> Eclipse Version: 20200910-1200
> m2e Version: 1.16.1.20200710-1008
>            Reporter: Ben DeLillo
>            Priority: Major
>
> I don't have a distributable repro case, but I can say that in my multi-module project,
when the exploded goal is invoked by eclipse and m2e the following error occurs:
> {code:java}
> Execution default of goal org.apache.maven.plugins:maven-war-plugin:3.3.1:exploded failed.
(org.apache.maven.plugins:maven-war-plugin:3.3.1:exploded:default:process-resources) {code}
> The stack trace for this error is
> {code:java}
> org.apache.maven.plugin.PluginExecutionException: Execution default of goal org.apache.maven.plugins:maven-war-plugin:3.3.1:exploded
failed. at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:148)
at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:332) at org.eclipse.m2e.core.internal.embedder.MavenImpl.lambda$8(MavenImpl.java:1380)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:179)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:114)
at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:1379) at org.eclipse.m2e.core.project.configurator.MojoExecutionBuildParticipant.build(MojoExecutionBuildParticipant.java:54)
at org.eclipse.m2e.core.internal.builder.MavenBuilderImpl.build(MavenBuilderImpl.java:135)
at org.eclipse.m2e.core.internal.builder.MavenBuilder$1.method(MavenBuilder.java:169) at org.eclipse.m2e.core.internal.builder.MavenBuilder$1.method(MavenBuilder.java:1)
at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.lambda$1(MavenBuilder.java:114)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:179)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:114)
at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.lambda$0(MavenBuilder.java:105)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:179)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:153)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:101)
at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.execute(MavenBuilder.java:88)
at org.eclipse.m2e.core.internal.builder.MavenBuilder.build(MavenBuilder.java:197) at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:832)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:220)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:263) at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:316)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:319)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:371) at
org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:392) at org.eclipse.core.internal.resources.Workspace.buildInternal(Workspace.java:515)
at org.eclipse.core.internal.resources.Workspace.build(Workspace.java:405) at org.eclipse.ui.actions.GlobalBuildAction$1.run(GlobalBuildAction.java:180)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) Caused by: java.lang.NullPointerException
at org.apache.maven.plugins.war.AbstractWarMojo$DefaultWarPackagingContext$1.visitFile(AbstractWarMojo.java:661)
at org.apache.maven.plugins.war.AbstractWarMojo$DefaultWarPackagingContext$1.visitFile(AbstractWarMojo.java:656)
at java.base/java.nio.file.Files.walkFileTree(Files.java:2804) at java.base/java.nio.file.Files.walkFileTree(Files.java:2876)
at org.apache.maven.plugins.war.AbstractWarMojo$DefaultWarPackagingContext.<init>(AbstractWarMojo.java:655)
at org.apache.maven.plugins.war.AbstractWarMojo.buildWebapp(AbstractWarMojo.java:520) at org.apache.maven.plugins.war.AbstractWarMojo.buildExplodedWebapp(AbstractWarMojo.java:453)
at org.apache.maven.plugins.war.WarExplodedMojo.execute(WarExplodedMojo.java:43) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
... 31 more pom.xml /my-legacy-app line 1753 Maven Build Problem{code}
> I've debugged into AbstractWarMojo.visitFile, and on line 661 session.getStartTime()
is null, so the call to getTime() throws an NPE. Attempting to track down why the start time
is null led me to MavenImpl, at which point I've gotten a bit stuck trying to further track
down the issue. I think it was pointing to something in MavenExecutionContext, but I'm not
entirely sure.
> The check against getStartTime was introduced in 3.3.1 so switching to 3.3.0 unblocks
me for now.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message