[ https://issues.apache.org/jira/browse/MNG-7825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17738768#comment-17738768 ]
Guillaume Nodet commented on MNG-7825: -------------------------------------- It seems to be fixed now in master with the switch to stax parser. > XML entity in pom cause NPE in MXSerializer during install > ---------------------------------------------------------- > > Key: MNG-7825 > URL: https://issues.apache.org/jira/browse/MNG-7825 > Project: Maven > Issue Type: Bug > Affects Versions: 4.0.0-alpha-7 > Reporter: Slawomir Jaranowski > Assignee: Guillaume Nodet > Priority: Major > > When we have a xml entity in project, like: > {code} > <description>test < test</description> > {code} > we will have: > {noformat} > Caused by: java.lang.NullPointerException: Cannot invoke "String.length()" > because "str" is null > at java.io.Writer.write (Writer.java:278) > at org.codehaus.plexus.util.xml.pull.MXSerializer.entityRef > (MXSerializer.java:806) > at org.apache.maven.model.transform.pull.XmlUtils.writeDocument > (XmlUtils.java:81) > at org.apache.maven.model.transform.pull.XmlUtils.writeDocument > (XmlUtils.java:40) > at > org.apache.maven.internal.transformation.ConsumerPomArtifactTransformer.transform > (ConsumerPomArtifactTransformer.java:195) > at > org.apache.maven.internal.transformation.ConsumerPomArtifactTransformer$ConsumerPomArtifact.lambda$transformer$1 > (ConsumerPomArtifactTransformer.java:175) > at org.apache.maven.internal.transformation.OnChangeTransformer.mayUpdate > (OnChangeTransformer.java:93) > at org.apache.maven.internal.transformation.OnChangeTransformer.get > (OnChangeTransformer.java:72) > at org.apache.maven.internal.transformation.TransformedArtifact.getFile > (TransformedArtifact.java:76) > at org.apache.maven.RepositoryUtils.toArtifact (RepositoryUtils.java:159) > at org.apache.maven.plugins.install.InstallMojo.processProject > (InstallMojo.java:227) > at org.apache.maven.plugins.install.InstallMojo.execute > (InstallMojo.java:144) > {noformat} > works in 3.9.3, 4.0.0-alpha-5 > m-install-p - 3.1.1 -- This message was sent by Atlassian Jira (v8.20.10#820010)