You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Matthew Beermann (JIRA)" <ji...@codehaus.org> on 2006/02/24 16:48:35 UTC

[jira] Created: (MNG-2110) ArtifactRepositoryLayout isn't extensible

ArtifactRepositoryLayout isn't extensible
-----------------------------------------

         Key: MNG-2110
         URL: http://jira.codehaus.org/browse/MNG-2110
     Project: Maven 2
        Type: Bug

  Components: Artifacts and Repositories  
    Versions: 2.0.2    
    Reporter: Matthew Beermann


I'm writing a plugin that (among other tasks) provides a new ArtifactRepositoryLayout suitable for Eclipse repositories. In my META-INF/plexus/components.xml, I have:

    <component>
      <role>org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout</role>
      <role-hint>eclipse</role-hint>
      <implementation>org.apache.maven.artifact.repository.layout.EclipseArtifactRepositoryLayout</implementation>
    </component>

This plugin is listed in the POM with <extensions>true</extensions>. I would expect that a <repository/> with <layout>eclipse</eclipse> would discover and load this layout provider. Instead, it simply results in an exception. Note that this same components.xml file also defines some lifecycle mappings, which work perfectly.

[INFO] Trace
org.apache.maven.reactor.MavenExecutionException: Cannot find layout implementation corresponding to: 'eclipse' for remote repository with id: 'Eclipse Update Site'.
        at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:365)
...
Caused by: org.codehaus.plexus.component.repository.exception.ComponentLookupException: Component descriptor cannot be found in the component repository: org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayouteclipse.
        at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:323)


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MNG-2110) ArtifactRepositoryLayout isn't extensible

Posted by "Matthew Beermann (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2110?page=comments#action_59857 ] 

Matthew Beermann commented on MNG-2110:
---------------------------------------

Can you dupe this (or at least provide a link) so I can keep an eye on it?

> ArtifactRepositoryLayout isn't extensible
> -----------------------------------------
>
>          Key: MNG-2110
>          URL: http://jira.codehaus.org/browse/MNG-2110
>      Project: Maven 2
>         Type: Bug

>   Components: Artifacts and Repositories
>     Versions: 2.0.2
>     Reporter: Matthew Beermann

>
>
> I'm writing a plugin that (among other tasks) provides a new ArtifactRepositoryLayout suitable for Eclipse repositories. In my META-INF/plexus/components.xml, I have:
>     <component>
>       <role>org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout</role>
>       <role-hint>eclipse</role-hint>
>       <implementation>org.apache.maven.artifact.repository.layout.EclipseArtifactRepositoryLayout</implementation>
>     </component>
> This plugin is listed in the POM with <extensions>true</extensions>. I would expect that a <repository/> with <layout>eclipse</eclipse> would discover and load this layout provider. Instead, it simply results in an exception. Note that this same components.xml file also defines some lifecycle mappings, which work perfectly.
> [INFO] Trace
> org.apache.maven.reactor.MavenExecutionException: Cannot find layout implementation corresponding to: 'eclipse' for remote repository with id: 'Eclipse Update Site'.
>         at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:365)
> ...
> Caused by: org.codehaus.plexus.component.repository.exception.ComponentLookupException: Component descriptor cannot be found in the component repository: org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayouteclipse.
>         at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:323)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MNG-2110) ArtifactRepositoryLayout isn't extensible

Posted by "Matthew Beermann (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2110?page=comments#action_59816 ] 

Matthew Beermann commented on MNG-2110:
---------------------------------------

Hm, it won't let me change the name of the issue, but a better summary line might be: "Only certain components are extensible from a plugin".  Lifecycles and packaging yes, but repository layouts no? It seems arbitrary.

I can make it work if I put the code directly into MAVEN_HOME\lib, but there's no (obvious) reason it shouldn't work from a <plugin/> with <extensions>true</extensions>.

> ArtifactRepositoryLayout isn't extensible
> -----------------------------------------
>
>          Key: MNG-2110
>          URL: http://jira.codehaus.org/browse/MNG-2110
>      Project: Maven 2
>         Type: Bug

>   Components: Artifacts and Repositories
>     Versions: 2.0.2
>     Reporter: Matthew Beermann

>
>
> I'm writing a plugin that (among other tasks) provides a new ArtifactRepositoryLayout suitable for Eclipse repositories. In my META-INF/plexus/components.xml, I have:
>     <component>
>       <role>org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout</role>
>       <role-hint>eclipse</role-hint>
>       <implementation>org.apache.maven.artifact.repository.layout.EclipseArtifactRepositoryLayout</implementation>
>     </component>
> This plugin is listed in the POM with <extensions>true</extensions>. I would expect that a <repository/> with <layout>eclipse</eclipse> would discover and load this layout provider. Instead, it simply results in an exception. Note that this same components.xml file also defines some lifecycle mappings, which work perfectly.
> [INFO] Trace
> org.apache.maven.reactor.MavenExecutionException: Cannot find layout implementation corresponding to: 'eclipse' for remote repository with id: 'Eclipse Update Site'.
>         at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:365)
> ...
> Caused by: org.codehaus.plexus.component.repository.exception.ComponentLookupException: Component descriptor cannot be found in the component repository: org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayouteclipse.
>         at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:323)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MNG-2110) ArtifactRepositoryLayout isn't extensible

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2110?page=comments#action_59844 ] 

Brett Porter commented on MNG-2110:
-----------------------------------

it depends on the way the components are instantiated. Those that are looked up from the container explicitly on the fly work, those that are instantiated once when first used don't. The first is a lot uglier to code and is only used for special cases.

A future version of plexus will support dynamic component maps that will facilitate making all of these work on the fly, without having to do the ugly lookup mechanism.

> ArtifactRepositoryLayout isn't extensible
> -----------------------------------------
>
>          Key: MNG-2110
>          URL: http://jira.codehaus.org/browse/MNG-2110
>      Project: Maven 2
>         Type: Bug

>   Components: Artifacts and Repositories
>     Versions: 2.0.2
>     Reporter: Matthew Beermann

>
>
> I'm writing a plugin that (among other tasks) provides a new ArtifactRepositoryLayout suitable for Eclipse repositories. In my META-INF/plexus/components.xml, I have:
>     <component>
>       <role>org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout</role>
>       <role-hint>eclipse</role-hint>
>       <implementation>org.apache.maven.artifact.repository.layout.EclipseArtifactRepositoryLayout</implementation>
>     </component>
> This plugin is listed in the POM with <extensions>true</extensions>. I would expect that a <repository/> with <layout>eclipse</eclipse> would discover and load this layout provider. Instead, it simply results in an exception. Note that this same components.xml file also defines some lifecycle mappings, which work perfectly.
> [INFO] Trace
> org.apache.maven.reactor.MavenExecutionException: Cannot find layout implementation corresponding to: 'eclipse' for remote repository with id: 'Eclipse Update Site'.
>         at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:365)
> ...
> Caused by: org.codehaus.plexus.component.repository.exception.ComponentLookupException: Component descriptor cannot be found in the component repository: org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayouteclipse.
>         at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:323)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org