org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.sonatype.plugins:nexus-m2settings-maven-plugin:1.5.1:download (default-cli) on project standalone-pom: Failed to save content to: C:\Users\xxx\.m2\settings.xml

Sonatype JIRA | Tamás Cservenák | 3 years 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

    I use templates with: {noformat} <username>$[userToken.nameCode]</username> <password>$[userToken.passCode.encrypted]</password> {noformat} When I run {{mvn -e nexus-m2settings:download}} I'm getting: {noformat} [INFO] --- nexus-m2settings-maven-plugin:1.5.1:download (default-cli) @ standalone-pom --- Username [xxxx]: Password: ********* [INFO] Connecting to: xxxx (as xxxx) [INFO] Connected: Sonatype Nexus Professional 2.6.3-01 Available Templates: 0) default Select Template: 0 [INFO] Fetching content for templateId: default [INFO] Backing up: C:\Users\xxxx\.m2\settings.xml to: C:\Users\xxxx\.m2\settings.xml-20131127140235 [INFO] Saving content to: C:\Users\xxxx\.m2\settings.xml [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 15.482s [INFO] Finished at: Wed Nov 27 14:02:35 CET 2013 [INFO] Final Memory: 19M/576M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.sonatype.plugins:nexus-m2settings-maven-plugin:1.5.1:download (default-cli) on project standalone-pom: Failed to save content to: C:\Users\xxxx\.m2\settings.xml: No org.sonatype.nexus.client.core.spi.SubsystemProvider was able to create a subsystem of typecom.sonatype.nexus.usertoken.client.UserToken -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.sonatype.plugins:nexus-m2settings-maven-plugin:1.5.1:download (default-cli) on project standalone-pom: Failed to save content to: C:\Users\xxx\.m2\settings.xml at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to save content to: C:\Users\xxxx\.m2\settings.xml at org.sonatype.nexus.maven.m2settings.MojoSupport.fail(MojoSupport.java:77) at org.sonatype.nexus.maven.m2settings.DownloadMojo.save(DownloadMojo.java:398) at org.sonatype.nexus.maven.m2settings.DownloadMojo.doExecute(DownloadMojo.java:197) at org.sonatype.nexus.maven.m2settings.MojoSupport.execute(MojoSupport.java:40) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) ... 19 more Caused by: java.lang.IllegalArgumentException: No org.sonatype.nexus.client.core.spi.SubsystemProvider was able to create a subsystem of typecom.sonatype.nexus.usertoken.client.Use rToken at org.sonatype.nexus.client.rest.jersey.JerseyNexusClient.createSubsystem(JerseyNexusClient.java:195) at org.sonatype.nexus.client.internal.rest.AbstractNexusClient.getSubsystem(AbstractNexusClient.java:67) at org.sonatype.nexus.maven.m2settings.template.UserTokenCustomizer.getUserToken(UserTokenCustomizer.java:83) at org.sonatype.nexus.maven.m2settings.template.UserTokenCustomizer.getNameCode(UserTokenCustomizer.java:96) at org.sonatype.nexus.maven.m2settings.template.UserTokenCustomizer.getPlainValue(UserTokenCustomizer.java:66) at org.sonatype.nexus.maven.m2settings.template.MasterPasswordCustomizerSupport.getValue(MasterPasswordCustomizerSupport.java:72) at org.sonatype.nexus.maven.m2settings.template.TemplateInterpolatorCustomizerSupport$1.getValue(TemplateInterpolatorCustomizerSupport.java:59) at org.codehaus.plexus.interpolation.StringSearchInterpolator.interpolate(StringSearchInterpolator.java:197) at org.codehaus.plexus.interpolation.StringSearchInterpolator.interpolate(StringSearchInterpolator.java:124) at org.codehaus.plexus.interpolation.StringSearchInterpolator.interpolate(StringSearchInterpolator.java:103) at org.codehaus.plexus.interpolation.InterpolatorFilterReader.read(InterpolatorFilterReader.java:368) at org.codehaus.plexus.interpolation.InterpolatorFilterReader.read(InterpolatorFilterReader.java:209) at java.io.Reader.read(Reader.java:100) at com.google.common.io.CharStreams.copy(CharStreams.java:244) at org.sonatype.nexus.maven.m2settings.DownloadMojo.save(DownloadMojo.java:390) ... 23 more {noformat} In version 1.4.8 worked ok. Migrated from https://github.com/sonatype/nexus-maven-plugins/issues/58

    Sonatype JIRA | 3 years ago | Tamás Cservenák
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.sonatype.plugins:nexus-m2settings-maven-plugin:1.5.1:download (default-cli) on project standalone-pom: Failed to save content to: C:\Users\xxx\.m2\settings.xml

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      No org.sonatype.nexus.client.core.spi.SubsystemProvider was able to create a subsystem of typecom.sonatype.nexus.usertoken.client.Use rToken

      at org.sonatype.nexus.client.rest.jersey.JerseyNexusClient.createSubsystem()
    2. org.sonatype.nexus
      TemplateInterpolatorCustomizerSupport$1.getValue
      1. org.sonatype.nexus.client.rest.jersey.JerseyNexusClient.createSubsystem(JerseyNexusClient.java:195)
      2. org.sonatype.nexus.client.internal.rest.AbstractNexusClient.getSubsystem(AbstractNexusClient.java:67)
      3. org.sonatype.nexus.maven.m2settings.template.UserTokenCustomizer.getUserToken(UserTokenCustomizer.java:83)
      4. org.sonatype.nexus.maven.m2settings.template.UserTokenCustomizer.getNameCode(UserTokenCustomizer.java:96)
      5. org.sonatype.nexus.maven.m2settings.template.UserTokenCustomizer.getPlainValue(UserTokenCustomizer.java:66)
      6. org.sonatype.nexus.maven.m2settings.template.MasterPasswordCustomizerSupport.getValue(MasterPasswordCustomizerSupport.java:72)
      7. org.sonatype.nexus.maven.m2settings.template.TemplateInterpolatorCustomizerSupport$1.getValue(TemplateInterpolatorCustomizerSupport.java:59)
      7 frames
    3. Maven
      InterpolatorFilterReader.read
      1. org.codehaus.plexus.interpolation.StringSearchInterpolator.interpolate(StringSearchInterpolator.java:197)
      2. org.codehaus.plexus.interpolation.StringSearchInterpolator.interpolate(StringSearchInterpolator.java:124)
      3. org.codehaus.plexus.interpolation.StringSearchInterpolator.interpolate(StringSearchInterpolator.java:103)
      4. org.codehaus.plexus.interpolation.InterpolatorFilterReader.read(InterpolatorFilterReader.java:368)
      5. org.codehaus.plexus.interpolation.InterpolatorFilterReader.read(InterpolatorFilterReader.java:209)
      5 frames
    4. Java RT
      Reader.read
      1. java.io.Reader.read(Reader.java:100)
      1 frame
    5. Guava
      CharStreams.copy
      1. com.google.common.io.CharStreams.copy(CharStreams.java:244)
      1 frame
    6. org.sonatype.nexus
      MojoSupport.execute
      1. org.sonatype.nexus.maven.m2settings.DownloadMojo.save(DownloadMojo.java:390)
      2. org.sonatype.nexus.maven.m2settings.DownloadMojo.doExecute(DownloadMojo.java:197)
      3. org.sonatype.nexus.maven.m2settings.MojoSupport.execute(MojoSupport.java:40)
      3 frames
    7. Maven Plugin
      DefaultBuildPluginManager.executeMojo
      1. org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
      1 frame
    8. Maven Core
      DefaultMaven.execute
      1. org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
      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:84)
      5. org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
      6. org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
      7. org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
      8. org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
      9. org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
      9 frames
    9. M3 Interceptor
      MavenCli.main
      1. org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
      2. org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
      3. org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
      3 frames
    10. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:606)
      4 frames
    11. Plexus
      Launcher.main
      1. org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
      2. org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
      3. org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
      4. org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
      4 frames