maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Václav Haisman (JIRA) <j...@apache.org>
Subject [jira] [Updated] (MENFORCER-319) UTF-8 BOM in pom.xml breaks banDuplicatePomDependencyVersions rule
Date Thu, 27 Sep 2018 14:58:00 GMT

     [ https://issues.apache.org/jira/browse/MENFORCER-319?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Václav Haisman updated MENFORCER-319:
-------------------------------------
    Attachment: Handle_parsing_of_pom_xml_in_BanDuplicatePomDependencyVersions_java_similarly_to_how_actua.patch

> UTF-8 BOM in pom.xml breaks banDuplicatePomDependencyVersions rule
> ------------------------------------------------------------------
>
>                 Key: MENFORCER-319
>                 URL: https://issues.apache.org/jira/browse/MENFORCER-319
>             Project: Maven Enforcer Plugin
>          Issue Type: Bug
>          Components: Standard Rules
>    Affects Versions: 3.0.0-M2
>            Reporter: Václav Haisman
>            Priority: Major
>         Attachments: Handle_parsing_of_pom_xml_in_BanDuplicatePomDependencyVersions_java_similarly_to_how_actua.patch,
pom.xml
>
>
> Having UTF-8 BOM at the beginning of {{pom.xml}} causes the banDuplicatePomDependencyVersions
rule to fail to parse the file with the following exception being shown by {{-X}} output:
> {noformat}
> [DEBUG] Adding failure due to exception
> org.apache.maven.enforcer.rule.api.EnforcerRuleException: Unable to retrieve the MavenProject:
>     at org.apache.maven.plugins.enforcer.BanDuplicatePomDependencyVersions.execute (BanDuplicatePomDependencyVersions.java:87)
>     at org.apache.maven.plugins.enforcer.EnforceMojo.execute (EnforceMojo.java:194)
>     at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
>     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
>     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
>     at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build
(SingleThreadedBuilder.java:56)
>     at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
>     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
>     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
>     at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
>     at org.apache.maven.cli.MavenCli.execute (MavenCli.java:954)
>     at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
>     at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
>     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
>     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (Unknown Source)
>     at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (Unknown Source)
>     at java.lang.reflect.Method.invoke (Unknown Source)
>     at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
>     at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
>     at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
>     at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
> Caused by: org.codehaus.plexus.util.xml.pull.XmlPullParserException: only whitespace
content allowed before start tag and not \uef (position: START_DOCUMENT seen \uef... @1:1)
>     at org.codehaus.plexus.util.xml.pull.MXParser.parseProlog (MXParser.java:1862)
>     at org.codehaus.plexus.util.xml.pull.MXParser.nextImpl (MXParser.java:1698)
>     at org.codehaus.plexus.util.xml.pull.MXParser.next (MXParser.java:1317)
>     at org.apache.maven.model.io.xpp3.MavenXpp3Reader.read (MavenXpp3Reader.java:3856)
>     at org.apache.maven.model.io.xpp3.MavenXpp3Reader.read (MavenXpp3Reader.java:595)
>     at org.apache.maven.model.io.xpp3.MavenXpp3Reader.read (MavenXpp3Reader.java:609)
>     at org.apache.maven.plugins.enforcer.BanDuplicatePomDependencyVersions.execute (BanDuplicatePomDependencyVersions.java:75)
>     at org.apache.maven.plugins.enforcer.EnforceMojo.execute (EnforceMojo.java:194)
>     at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
>     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
>     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
>     at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build
(SingleThreadedBuilder.java:56)
>     at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
>     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
>     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
>     at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
>     at org.apache.maven.cli.MavenCli.execute (MavenCli.java:954)
>     at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
>     at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
>     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
>     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (Unknown Source)
>     at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (Unknown Source)
>     at java.lang.reflect.Method.invoke (Unknown Source)
>     at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
>     at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
>     at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
>     at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
> [WARNING] Rule 0: org.apache.maven.plugins.enforcer.BanDuplicatePomDependencyVersions
failed with message:
> Unable to retrieve the MavenProject:
> {noformat}
> See attached {{pom.xml}} for minimal example.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message