org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:2.4.1:shade (bundle-and-repackage) on project beam-runners-google-cloud-dataflow-java: Error creating shaded jar: The name "os.detected.release.like."rhel"" is not legal for JDOM/XML elements: XML names cannot contain the character """.

Stack Overflow | Shen Li | 10 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Maven shade plugin detects os release with wrong output format: "os.detected.release.like."rhel"" is not legal for JDOM/XML elements

    Stack Overflow | 10 months ago | Shen Li
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:2.4.1:shade (bundle-and-repackage) on project beam-runners-google-cloud-dataflow-java: Error creating shaded jar: The name "os.detected.release.like."rhel"" is not legal for JDOM/XML elements: XML names cannot contain the character """.

    Root Cause Analysis

    1. org.jdom.IllegalNameException

      The name "os.detected.release.like."rhel"" is not legal for JDOM/XML elements: XML names cannot contain the character """.

      at org.jdom.Element.setName()
    2. jOpenDocument
      DefaultJDOMFactory.element
      1. org.jdom.Element.setName(Element.java:207)
      2. org.jdom.Element.<init>(Element.java:141)
      3. org.jdom.DefaultJDOMFactory.element(DefaultJDOMFactory.java:134)
      3 frames
    3. Apache Maven Shade Plugin
      ShadeMojo.execute
      1. org.apache.maven.plugins.shade.pom.MavenJDOMWriter.updateElement(MavenJDOMWriter.java:1485)
      2. org.apache.maven.plugins.shade.pom.MavenJDOMWriter.findAndReplaceSimpleElement(MavenJDOMWriter.java:164)
      3. org.apache.maven.plugins.shade.pom.MavenJDOMWriter.findAndReplaceProperties(MavenJDOMWriter.java:125)
      4. org.apache.maven.plugins.shade.pom.MavenJDOMWriter.updateProfile(MavenJDOMWriter.java:1929)
      5. org.apache.maven.plugins.shade.pom.MavenJDOMWriter.iterateProfile(MavenJDOMWriter.java:878)
      6. org.apache.maven.plugins.shade.pom.MavenJDOMWriter.updateModel(MavenJDOMWriter.java:1653)
      7. org.apache.maven.plugins.shade.pom.MavenJDOMWriter.write(MavenJDOMWriter.java:2190)
      8. org.apache.maven.plugins.shade.pom.PomWriter.write(PomWriter.java:75)
      9. org.apache.maven.plugins.shade.mojo.ShadeMojo.rewriteDependencyReducedPomIfWeHaveReduction(ShadeMojo.java:1023)
      10. org.apache.maven.plugins.shade.mojo.ShadeMojo.createDependencyReducedPom(ShadeMojo.java:957)
      11. org.apache.maven.plugins.shade.mojo.ShadeMojo.execute(ShadeMojo.java:531)
      11 frames
    4. Maven Plugin
      DefaultBuildPluginManager.executeMojo
      1. org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
      1 frame
    5. Maven Core
      DefaultMaven.execute
      1. org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
      2. org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      3. org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      4. org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
      5. org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
      6. org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
      7. org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
      8. org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:355)
      9. org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
      9 frames
    6. M3 Interceptor
      MavenCli.main
      1. org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
      2. org.apache.maven.cli.MavenCli.doMain(MavenCli.java:216)
      3. org.apache.maven.cli.MavenCli.main(MavenCli.java:160)
      3 frames
    7. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
      4. java.lang.reflect.Method.invoke(Method.java:508)
      4 frames
    8. Plexus
      Launcher.main
      1. org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
      2. org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
      3. org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
      4. org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
      4 frames