java.lang.RuntimeException

org.apache.maven.plugin.MojoExecutionException: Unable to execute mojo

Samebug tips1

This happens when you try to instantiate a class that can't be instantiated, either because the class object is abstract, an interface, an array class, a primitive type, void, or because the class has no nullary constructor.

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web36026

  • via Atlassian JIRA by Matt Doar (ServiceRocket), 11 months ago
    org.apache.maven.plugin.MojoExecutionException: Unable to execute mojo
  • via Atlassian JIRA by Cedric Gagnon, 1 year ago
    org.apache.maven.plugin.MojoExecutionException: Unable to execute mojo
  • org.apache.maven.plugin.MojoExecutionException: Unable to execute mojo
  • Stack trace

    • java.lang.RuntimeException: org.apache.maven.plugin.MojoExecutionException: Unable to execute mojo at org.twdata.maven.cli.commands.ExecuteGoalCommand.run(ExecuteGoalCommand.java:111) at org.twdata.maven.cli.CliShell.interpretCommand(CliShell.java:42) at org.twdata.maven.cli.CliShell.run(CliShell.java:27) at org.twdata.maven.cli.AbstractCliMojo.displayShell(AbstractCliMojo.java:144) at org.twdata.maven.cli.AbstractCliMojo.access$000(AbstractCliMojo.java:22) at org.twdata.maven.cli.AbstractCliMojo$1.run(AbstractCliMojo.java:116) Caused by: org.apache.maven.plugin.MojoExecutionException: Unable to execute mojo at org.shaded.mojoexecutor.MojoExecutor.executeMojo(MojoExecutor.java:100) at org.twdata.maven.cli.MojoCall.run(MojoCall.java:31) at org.twdata.maven.cli.commands.ExecuteGoalCommand.runMojo(ExecuteGoalCommand.java:125) at org.twdata.maven.cli.commands.ExecuteGoalCommand.run(ExecuteGoalCommand.java:104) ... 5 more Caused by: org.apache.maven.plugin.PluginConfigurationException: Error configuring: org.apache.maven.plugins:maven-deploy-plugin. Reason: Unable to parse the created DOM for plugin configuration at org.apache.maven.plugin.DefaultPluginManager.populatePluginFields(DefaultPluginManager.java:1356) at org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultPluginManager.java:717) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:461) at org.shaded.mojoexecutor.MojoExecutor.executeMojo(MojoExecutor.java:98) ... 8 more Caused by: org.codehaus.plexus.component.configurator.ComponentConfigurationException: Class 'org.apache.maven.artifact.repository.ArtifactRepository' cannot be instantiated at org.codehaus.plexus.component.configurator.converters.AbstractConfigurationConverter.instantiateObject(AbstractConfigurationConverter.java:121) at org.codehaus.plexus.component.configurator.converters.composite.ObjectWithFieldsConverter.fromConfiguration(ObjectWithFieldsConverter.java:88) at org.codehaus.plexus.component.configurator.converters.ComponentValueSetter.configure(ComponentValueSetter.java:247) at org.codehaus.plexus.component.configurator.converters.composite.ObjectWithFieldsConverter.processConfiguration(ObjectWithFieldsConverter.java:137) at org.codehaus.plexus.component.configurator.BasicComponentConfigurator.configureComponent(BasicComponentConfigurator.java:56) at org.apache.maven.plugin.DefaultPluginManager.populatePluginFields(DefaultPluginManager.java:1350) ... 11 more Caused by: java.lang.InstantiationException: org.apache.maven.artifact.repository.ArtifactRepository at java.lang.Class.newInstance0(Class.java:340) at java.lang.Class.newInstance(Class.java:308) at org.codehaus.plexus.component.configurator.converters.AbstractConfigurationConverter.instantiateObject(AbstractConfigurationConverter.java:111) ... 16 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 1 year ago
    Unknown user
    2 times, 1 year ago
    38 more bugmates