Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-4754

long name and password combination fail upon authentication with maven repository with mvn 2.2.1

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 2.2.1
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      Description

      The problem seems to be with the wagon package or the module that calls wagon but I'm not a maven developer so I didn't look at what version of wagon is used. The only fix I could find was to revert to 2.2.0 which works.

      This is an anonymized version of my repository credentials. I kept the length the same in both username and password
      <server>
      <id>repo</id>
      <username>nmichalakis@xxxxxxxx.com</username>
      <password>{DESede}xxxxxxxxxxxxxxxxxxxxxx==</password>
      </server>

      Here is the exception I get (hiding the auth info):

      java.lang.RuntimeException: java.lang.IllegalArgumentException: Illegal character(s) in message header value: Basic bm1pXXXXXXXXXXXXXXXXXXXXpelN3
      PT0=
      at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1014)
      at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:2211)
      at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:382)
      at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:318)
      at org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputData(LightweightHttpWagon.java:115)
      at org.apache.maven.wagon.StreamWagon.getInputStream(StreamWagon.java:116)
      at org.apache.maven.wagon.StreamWagon.getIfNewer(StreamWagon.java:88)
      at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:61)
      at org.apache.maven.artifact.manager.DefaultWagonManager.getRemoteFile(DefaultWagonManager.java:546)
      at org.apache.maven.artifact.manager.DefaultWagonManager.getArtifactMetadata(DefaultWagonManager.java:443)
      at org.apache.maven.artifact.repository.metadata.DefaultRepositoryMetadataManager.resolve(DefaultRepositoryMetadataManager.java:97)
      at org.apache.maven.artifact.transform.AbstractVersionTransformation.resolveVersion(AbstractVersionTransformation.java:65)
      at org.apache.maven.artifact.transform.LatestArtifactTransformation.transformForResolve(LatestArtifactTransformation.java:41)
      at org.apache.maven.artifact.transform.DefaultArtifactTransformationManager.transformForResolve(DefaultArtifactTransformationManager.java:55)
      at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:145)
      at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:90)
      at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:558)
      at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository(DefaultMavenProjectBuilder.java:251)
      at org.apache.maven.project.artifact.MavenMetadataSource.retrieveRelocatedProject(MavenMetadataSource.java:163)
      at org.apache.maven.project.artifact.MavenMetadataSource.retrieve(MavenMetadataSource.java:299)
      at org.apache.maven.plugin.version.DefaultPluginVersionManager.resolveMetaVersion(DefaultPluginVersionManager.java:673)
      at org.apache.maven.plugin.version.DefaultPluginVersionManager.resolvePluginVersion(DefaultPluginVersionManager.java:187)
      at org.apache.maven.plugin.version.DefaultPluginVersionManager.resolvePluginVersion(DefaultPluginVersionManager.java:91)
      at org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPluginManager.java:179)
      at org.apache.maven.plugin.DefaultPluginManager.loadPluginDescriptor(DefaultPluginManager.java:1642)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1540)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.bindPluginToLifecycle(DefaultLifecycleExecutor.java:1503)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.constructLifecycleMappings(DefaultLifecycleExecutor.java:1282)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:534)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
      at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
      at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

      If I remove 3 characters from my username this exception is not thrown. Instead I get an (expected) authentication error.

      It seems there was a bug in the past related to this, but it was on Maven 1 and it was fixed:
      http://jira.codehaus.org/browse/MAVEN-1273

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                bentmann Benjamin Bentmann
                Reporter:
                nmichalakis Nikos Michalakis
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: