Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-31130

maven plugin can't handle xml header in pom.xml

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • maven-plugin
    • None

      When a external tool re-wrote our poms, it added a xml header:
      <?xml version="1.0" encoding="UTF-8"?>

      before the <project> tag.

      This made maven-plugin blow up:

      ERROR: Failed to parse POMs
      java.io.IOException: remote file operation failed: /XXX at hudson.remoting.Channel@1fabae96:build-03: hudson.remoting.ProxyException: hudson.maven.MavenModuleSetBuild$MavenExecutionException: org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
      [FATAL] Non-parseable POM /XXX/pom.xml: expected start tag name and not < (position: START_DOCUMENT seen <<... @1:2) @ line 1, column 2

      at hudson.FilePath.act(FilePath.java:987)
      at hudson.FilePath.act(FilePath.java:969)
      at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.parsePoms(MavenModuleSetBuild.java:960)
      at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:679)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:537)
      at hudson.model.Run.execute(Run.java:1741)
      at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531)
      at hudson.model.ResourceController.execute(ResourceController.java:98)
      at hudson.model.Executor.run(Executor.java:408)
      Caused by: hudson.remoting.ProxyException: hudson.maven.MavenModuleSetBuild$MavenExecutionException: org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
      [FATAL] Non-parseable POM /XXX/pom.xml: expected start tag name and not < (position: START_DOCUMENT seen <<... @1:2) @ line 1, column 2

      at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:1364)
      at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:1098)
      at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2691)
      at hudson.remoting.UserRequest.perform(UserRequest.java:121)
      at hudson.remoting.UserRequest.perform(UserRequest.java:49)
      at hudson.remoting.Request$2.run(Request.java:326)
      at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)
      at ......remote call to build-03(Native Method)
      at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1413)
      at hudson.remoting.UserResponse.retrieve(UserRequest.java:221)
      at hudson.remoting.Channel.call(Channel.java:778)
      at hudson.FilePath.act(FilePath.java:980)
      ... 8 more
      Caused by: hudson.remoting.ProxyException: org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
      [FATAL] Non-parseable POM /XXX/pom.xml: expected start tag name and not < (position: START_DOCUMENT seen <<... @1:2) @ line 1, column 2

      at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:364)
      at hudson.maven.MavenEmbedder.buildProjects(MavenEmbedder.java:361)
      at hudson.maven.MavenEmbedder.readProjects(MavenEmbedder.java:331)
      at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:1301)
      at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:1098)
      at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2691)
      at hudson.remoting.UserRequest.perform(UserRequest.java:121)
      at hudson.remoting.UserRequest.perform(UserRequest.java:49)
      at hudson.remoting.Request$2.run(Request.java:326)
      at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)

      I would have expected maven-plugin to handle that.

            Unassigned Unassigned
            glance Anton Lundin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: