jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven 2 & 3
  • MNG-2227

Can't use repositories in protocols other than http

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 2.0.4
  • Fix Version/s: Issues to be reviewed for 3.x
  • Component/s: Artifacts and Repositories
  • Labels:
    None
  • Complexity:
    Intermediate

Description

When adding the wagon-scm to the build extensions to add another scm based repo (not to replace the http one) Maven fails because tries to validate the scm repo before downloading the wagon-scm jar from the http repo.

<build>
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-scm</artifactId>
<version>1.0-alpha-7-SNAPSHOT</version>
</extension>
</extensions>
</build>

[WARNING] repository metadata for: 'snapshot org.apache.maven.wagon:wagon-scm:1.0-alpha-7-SNAPSHOT' could not be retrieved from repository: acme due to an error: Unsupported Protocol: 'scm': Cannot find wagon which supports the requested protocol: scm
[INFO] Repository 'acme' will be blacklisted
[DEBUG] Exception
org.apache.maven.wagon.TransferFailedException: Unsupported Protocol: 'scm': Cannot find wagon which supports the requested protocol: scm
at org.apache.maven.artifact.manager.DefaultWagonManager.getRemoteFile(DefaultWagonManager.java:325)
at org.apache.maven.artifact.manager.DefaultWagonManager.getArtifactMetadata(DefaultWagonManager.java:295)
at org.apache.maven.artifact.repository.metadata.DefaultRepositoryMetadataManager.resolveAlways(DefaultRepositoryMetadataManager.java:356)
at org.apache.maven.artifact.repository.metadata.DefaultRepositoryMetadataManager.resolve(DefaultRepositoryMetadataManager.java:91)
at org.apache.maven.artifact.transform.AbstractVersionTransformation.resolveVersion(AbstractVersionTransformation.java:62)
at org.apache.maven.artifact.transform.SnapshotTransformation.transformForResolve(SnapshotTransformation.java:60)
at org.apache.maven.artifact.transform.DefaultArtifactTransformationManager.transformForResolve(DefaultArtifactTransformationManager.java:40)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:104)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:63)
at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:467)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository(DefaultMavenProjectBuilder.java:225)
at org.apache.maven.project.artifact.MavenMetadataSource.retrieve(MavenMetadataSource.java:102)
at org.apache.maven.artifact.resolver.DefaultArtifactCollector.recurse(DefaultArtifactCollector.java:275)
at org.apache.maven.artifact.resolver.DefaultArtifactCollector.collect(DefaultArtifactCollector.java:67)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:223)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:211)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:182)
at org.apache.maven.extension.DefaultExtensionManager.addExtension(DefaultExtensionManager.java:68)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.findExtensions(DefaultLifecycleExecutor.java:155)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:138)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
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:585)
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)
Caused by: org.apache.maven.wagon.UnsupportedProtocolException: Cannot find wagon which supports the requested protocol: scm
at org.apache.maven.artifact.manager.DefaultWagonManager.getWagon(DefaultWagonManager.java:99)
at org.apache.maven.artifact.manager.DefaultWagonManager.getRemoteFile(DefaultWagonManager.java:319)
... 30 more
Caused by: org.codehaus.plexus.component.repository.exception.ComponentLookupException: Component descriptor cannot be found in the component repository: org.apache.maven.wagon.Wagonscm.
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:323)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:440)
at org.apache.maven.artifact.manager.DefaultWagonManager.getWagon(DefaultWagonManager.java:94)
... 31 more

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Text File
    log.txt
    13/Apr/06 8:15 PM
    38 kB
    Carlos Sanchez

Issue Links

is duplicated by

Bug - A problem which impairs or prevents the functions of the product. WAGON-137 Unsupported Protocol: 'ftp': Cannot find wagon which supports the requested protocol: ftp

  • Critical - Crashes, loss of data, severe memory leak.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Bug - A problem which impairs or prevents the functions of the product. MNG-2195 FTP download is not supported directly by Maven

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.
relates to

Bug - A problem which impairs or prevents the functions of the product. MNG-2225 Classloader problem when adding jars to M2_HOME

  • Critical - Crashes, loss of data, severe memory leak.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Task - A task that needs to be done. MNG-657 possible chicken and egg problem with extensions

  • Trivial - Cosmetic problem like misspelt words or misaligned text.
  • Open - The issue is open and ready for the assignee to start work on it.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Carlos Sanchez added a comment - 13/Apr/06 8:20 PM

Actually it doesn't fail due to the previous exception, it fails later when trying to download a jar wich is not in the repositories checked before the scm one.

[DEBUG] Trying repository apache.snapshots
Downloading: http://cvs.apache.org/maven-snapshot-repository/org/apache/maven/wagon/wagon-provider-api/1.0-alpha-5/wagon-provider-api-1.0-alpha-5.pom
[WARNING] Unable to get resource from repository apache.snapshots (http://cvs.apache.org/maven-snapshot-repository)
[DEBUG] Trying repository codehaus.snapshots
Downloading: http://snapshots.maven.codehaus.org/maven2/org/apache/maven/wagon/wagon-provider-api/1.0-alpha-5/wagon-provider-api-1.0-alpha-5.pom
[WARNING] Unable to get resource from repository codehaus.snapshots (http://snapshots.maven.codehaus.org/maven2)
[DEBUG] Trying repository acme-plugins
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).

Project ID: org.apache.maven.wagon:wagon-provider-api

Reason: Error getting POM for 'org.apache.maven.wagon:wagon-provider-api' from the repository: Unsupported Protocol: 'scm': Cannot find wagon which supports the requested protocol: scm
org.apache.maven.wagon:wagon-provider-api:pom:1.0-alpha-5

Show
Carlos Sanchez added a comment - 13/Apr/06 8:20 PM Actually it doesn't fail due to the previous exception, it fails later when trying to download a jar wich is not in the repositories checked before the scm one. [DEBUG] Trying repository apache.snapshots Downloading: http://cvs.apache.org/maven-snapshot-repository/org/apache/maven/wagon/wagon-provider-api/1.0-alpha-5/wagon-provider-api-1.0-alpha-5.pom [WARNING] Unable to get resource from repository apache.snapshots (http://cvs.apache.org/maven-snapshot-repository) [DEBUG] Trying repository codehaus.snapshots Downloading: http://snapshots.maven.codehaus.org/maven2/org/apache/maven/wagon/wagon-provider-api/1.0-alpha-5/wagon-provider-api-1.0-alpha-5.pom [WARNING] Unable to get resource from repository codehaus.snapshots (http://snapshots.maven.codehaus.org/maven2) [DEBUG] Trying repository acme-plugins [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Error building POM (may not be this project's POM). Project ID: org.apache.maven.wagon:wagon-provider-api Reason: Error getting POM for 'org.apache.maven.wagon:wagon-provider-api' from the repository: Unsupported Protocol: 'scm': Cannot find wagon which supports the requested protocol: scm org.apache.maven.wagon:wagon-provider-api:pom:1.0-alpha-5
Hide
Permalink
Carlos Sanchez added a comment - 13/Apr/06 8:23 PM

The workaround is adding the central repo to the list of repos, maven checks it before the scm repo (by chance) and download the necessary files.

Show
Carlos Sanchez added a comment - 13/Apr/06 8:23 PM The workaround is adding the central repo to the list of repos, maven checks it before the scm repo (by chance) and download the necessary files.
Hide
Permalink
Brett Porter added a comment - 13/Apr/06 8:43 PM

I believe this is a dupe - someone has filed the need-extension-to-use-repository-to-find-extension issue before, IIRC.

Show
Brett Porter added a comment - 13/Apr/06 8:43 PM I believe this is a dupe - someone has filed the need-extension-to-use-repository-to-find-extension issue before, IIRC.
Hide
Permalink
Carlos Sanchez added a comment - 13/Apr/06 8:48 PM

The solution of adding the central repo and using the SCM repo before the one that contains the wagon+wagon dependencies works because Maven looks in the repos in inverse order than they are defined.

So I have
1 scm repo
2 central repo
3 snapshot repo

and maven looks for dependencies in inverse order: 3,2,1

Show
Carlos Sanchez added a comment - 13/Apr/06 8:48 PM The solution of adding the central repo and using the SCM repo before the one that contains the wagon+wagon dependencies works because Maven looks in the repos in inverse order than they are defined. So I have 1 scm repo 2 central repo 3 snapshot repo and maven looks for dependencies in inverse order: 3,2,1
Hide
Permalink
Carlos Sanchez added a comment - 13/Apr/06 8:49 PM

Brett: that's more related with MNG-2225, this one is about gettiong wagons from http repo and use them to access other repos

Show
Carlos Sanchez added a comment - 13/Apr/06 8:49 PM Brett: that's more related with MNG-2225, this one is about gettiong wagons from http repo and use them to access other repos
Hide
Permalink
Carlos Sanchez added a comment - 13/Apr/06 8:52 PM

Brett: gotcha, I closed MNG-2195 as duplicate

Show
Carlos Sanchez added a comment - 13/Apr/06 8:52 PM Brett: gotcha, I closed MNG-2195 as duplicate

People

  • Assignee:
    Unassigned
    Reporter:
    Carlos Sanchez
Vote (1)
Watch (2)

Dates

  • Created:
    13/Apr/06 8:15 PM
    Updated:
    13/Dec/08 6:35 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.