You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "John Casey (JIRA)" <ji...@codehaus.org> on 2007/01/15 16:48:41 UTC

[jira] Created: (MNG-2771) Provide a means of loading custom substitute components instead of default Maven components

Provide a means of loading custom substitute components instead of default Maven components
-------------------------------------------------------------------------------------------

                 Key: MNG-2771
                 URL: http://jira.codehaus.org/browse/MNG-2771
             Project: Maven 2
          Issue Type: New Feature
          Components: General
    Affects Versions: 2.0.4
            Reporter: John Casey
             Fix For: 2.1-alpha-1


At times, it is necessary to use different mechanisms for resolving artifacts, building projects, etc. Since Maven is built on component-oriented technology, it should be possible to substitute the component implementation used for these tasks. Yet this is currently impossible.

We need a mechanism for specifying, resolving, loading, and using custom components during the build process.

-- 
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

        

[jira] Updated: (MNG-2771) Provide a means of loading custom substitute components instead of default Maven components

Posted by "Jason van Zyl (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-2771?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jason van Zyl updated MNG-2771:
-------------------------------

    Fix Version/s:     (was: 2.1-alpha-1)
                   2.1-alpha-2

> Provide a means of loading custom substitute components instead of default Maven components
> -------------------------------------------------------------------------------------------
>
>                 Key: MNG-2771
>                 URL: http://jira.codehaus.org/browse/MNG-2771
>             Project: Maven 2
>          Issue Type: New Feature
>          Components: General
>    Affects Versions: 2.0.4
>            Reporter: John Casey
>            Assignee: Kenney Westerhof
>             Fix For: 2.1-alpha-2
>
>
> At times, it is necessary to use different mechanisms for resolving artifacts, building projects, etc. Since Maven is built on component-oriented technology, it should be possible to substitute the component implementation used for these tasks. Yet this is currently impossible.
> We need a mechanism for specifying, resolving, loading, and using custom components during the build process.

-- 
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

        

[jira] Commented: (MNG-2771) Provide a means of loading custom substitute components instead of default Maven components

Posted by "Jason van Zyl (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_106259 ] 

Jason van Zyl commented on MNG-2771:
------------------------------------

Ok, I would have to put a container in the path of the default container so that custom components can be loaded. Or make a small change to plexus to allow overriding of existing registered components but this  would require the extensions be scoped to the POM for the build at hand. So not terribly difficult but using the m2_home/extensions is the only way right now which preempts any loading of components and is global.

> Provide a means of loading custom substitute components instead of default Maven components
> -------------------------------------------------------------------------------------------
>
>                 Key: MNG-2771
>                 URL: http://jira.codehaus.org/browse/MNG-2771
>             Project: Maven 2
>          Issue Type: New Feature
>          Components: General
>    Affects Versions: 2.0.4
>            Reporter: John Casey
>            Assignee: Kenney Westerhof
>             Fix For: 2.1-alpha-1
>
>
> At times, it is necessary to use different mechanisms for resolving artifacts, building projects, etc. Since Maven is built on component-oriented technology, it should be possible to substitute the component implementation used for these tasks. Yet this is currently impossible.
> We need a mechanism for specifying, resolving, loading, and using custom components during the build process.

-- 
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

        

[jira] Commented: (MNG-2771) Provide a means of loading custom substitute components instead of default Maven components

Posted by "Jason van Zyl (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_106202 ] 

Jason van Zyl commented on MNG-2771:
------------------------------------

Did you look at the embedder tests where Kenney has an example? I'll take a look and validate.

> Provide a means of loading custom substitute components instead of default Maven components
> -------------------------------------------------------------------------------------------
>
>                 Key: MNG-2771
>                 URL: http://jira.codehaus.org/browse/MNG-2771
>             Project: Maven 2
>          Issue Type: New Feature
>          Components: General
>    Affects Versions: 2.0.4
>            Reporter: John Casey
>            Assignee: Kenney Westerhof
>             Fix For: 2.1-alpha-1
>
>
> At times, it is necessary to use different mechanisms for resolving artifacts, building projects, etc. Since Maven is built on component-oriented technology, it should be possible to substitute the component implementation used for these tasks. Yet this is currently impossible.
> We need a mechanism for specifying, resolving, loading, and using custom components during the build process.

-- 
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

        

[jira] Commented: (MNG-2771) Provide a means of loading custom substitute components instead of default Maven components

Posted by "Kenney Westerhof (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_89691 ] 

Kenney Westerhof commented on MNG-2771:
---------------------------------------

There are currently 3 ways this works in 2.1-SNAPSHOT.

The first way is to place extension jars in $M2_HOME/extensions/. The jars there,
and the component.xml's will override previous declarations.
It's also possible to just edit/create the file $M2_HOME/extensions/META-INF/plexus/components.xml,
and put jars in $M2_HOME/lib/.

The second mechanism involves the <extensions> tag in the pom. Components defined
in dependencies there will also override previous declarations.
The problem with this right now is that they override the components for the entire reactor,
while they should only override them for the duration of the build of that specific project.

The third mechanism involves adding <dependencies> to <plugin> declarations in a pom. Components
defined there will override both components in the plugin, and in the core, but only when they're looked
up within the plugin context, so their scope is properly confined.

More elaborate systems could ofcourse be deviced, but I think the current solutions provide for everything
needed, once the 2nd approach is fixed. You'll have the 3 options above:
- maven global overrides
- per project overrides
- per plugin overrides.

> Provide a means of loading custom substitute components instead of default Maven components
> -------------------------------------------------------------------------------------------
>
>                 Key: MNG-2771
>                 URL: http://jira.codehaus.org/browse/MNG-2771
>             Project: Maven 2
>          Issue Type: New Feature
>          Components: General
>    Affects Versions: 2.0.4
>            Reporter: John Casey
>         Assigned To: Kenney Westerhof
>             Fix For: 2.1-alpha-1
>
>
> At times, it is necessary to use different mechanisms for resolving artifacts, building projects, etc. Since Maven is built on component-oriented technology, it should be possible to substitute the component implementation used for these tasks. Yet this is currently impossible.
> We need a mechanism for specifying, resolving, loading, and using custom components during the build process.

-- 
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

        

[jira] Closed: (MNG-2771) Provide a means of loading custom substitute components instead of default Maven components

Posted by "Jason van Zyl (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-2771?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jason van Zyl closed MNG-2771.
------------------------------

    Resolution: Fixed
      Assignee: Igor Fedorenko  (was: Kenney Westerhof)

> Provide a means of loading custom substitute components instead of default Maven components
> -------------------------------------------------------------------------------------------
>
>                 Key: MNG-2771
>                 URL: http://jira.codehaus.org/browse/MNG-2771
>             Project: Maven 2 & 3
>          Issue Type: New Feature
>          Components: General
>    Affects Versions: 2.0.4
>            Reporter: John Casey
>            Assignee: Igor Fedorenko
>             Fix For: 3.x
>
>
> At times, it is necessary to use different mechanisms for resolving artifacts, building projects, etc. Since Maven is built on component-oriented technology, it should be possible to substitute the component implementation used for these tasks. Yet this is currently impossible.
> We need a mechanism for specifying, resolving, loading, and using custom components during the build process.

-- 
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

        

[jira] Commented: (MNG-2771) Provide a means of loading custom substitute components instead of default Maven components

Posted by "Kenney Westerhof (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_98192 ] 

Kenney Westerhof commented on MNG-2771:
---------------------------------------

I don't think this'll be available in 2.0.x, as it uses some heavily refactored code in 2.1.

It should now all work in 2.1-snapshot; the extensions is not mentioned in the m2.conf because
it needs special treatment. The embedder/cli will check if M2_HOME/extensions exists and process
it's contents during startup.

The reason it's not in m2.conf is that m2.conf is for the classworlds booter and contains no maven
specific configuration whatsoever. The extensions are maven specific. m2.conf should actually
be called 'classworlds.conf' since it's unrelated to maven itself.

> Provide a means of loading custom substitute components instead of default Maven components
> -------------------------------------------------------------------------------------------
>
>                 Key: MNG-2771
>                 URL: http://jira.codehaus.org/browse/MNG-2771
>             Project: Maven 2
>          Issue Type: New Feature
>          Components: General
>    Affects Versions: 2.0.4
>            Reporter: John Casey
>            Assignee: Kenney Westerhof
>             Fix For: 2.1-alpha-1
>
>
> At times, it is necessary to use different mechanisms for resolving artifacts, building projects, etc. Since Maven is built on component-oriented technology, it should be possible to substitute the component implementation used for these tasks. Yet this is currently impossible.
> We need a mechanism for specifying, resolving, loading, and using custom components during the build process.

-- 
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

        

[jira] Updated: (MNG-2771) Provide a means of loading custom substitute components instead of default Maven components

Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-2771?page=all ]

John Casey updated MNG-2771:
----------------------------

    Fix Version/s: 2.1-alpha-1

> Provide a means of loading custom substitute components instead of default Maven components
> -------------------------------------------------------------------------------------------
>
>                 Key: MNG-2771
>                 URL: http://jira.codehaus.org/browse/MNG-2771
>             Project: Maven 2
>          Issue Type: New Feature
>          Components: General
>    Affects Versions: 2.0.4
>            Reporter: John Casey
>             Fix For: 2.1-alpha-1
>
>
> At times, it is necessary to use different mechanisms for resolving artifacts, building projects, etc. Since Maven is built on component-oriented technology, it should be possible to substitute the component implementation used for these tasks. Yet this is currently impossible.
> We need a mechanism for specifying, resolving, loading, and using custom components during the build process.

-- 
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

        

[jira] Commented: (MNG-2771) Provide a means of loading custom substitute components instead of default Maven components

Posted by "Jason van Zyl (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_106256 ] 

Jason van Zyl commented on MNG-2771:
------------------------------------

Only method 1) works and that was the only thing that was planned at the time but using extensions (at first blush) would probably be fine as you want to use them globally across all your builds.

> Provide a means of loading custom substitute components instead of default Maven components
> -------------------------------------------------------------------------------------------
>
>                 Key: MNG-2771
>                 URL: http://jira.codehaus.org/browse/MNG-2771
>             Project: Maven 2
>          Issue Type: New Feature
>          Components: General
>    Affects Versions: 2.0.4
>            Reporter: John Casey
>            Assignee: Kenney Westerhof
>             Fix For: 2.1-alpha-1
>
>
> At times, it is necessary to use different mechanisms for resolving artifacts, building projects, etc. Since Maven is built on component-oriented technology, it should be possible to substitute the component implementation used for these tasks. Yet this is currently impossible.
> We need a mechanism for specifying, resolving, loading, and using custom components during the build process.

-- 
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

        

[jira] Commented: (MNG-2771) Provide a means of loading custom substitute components instead of default Maven components

Posted by "Mark Hobson (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_100709 ] 

Mark Hobson commented on MNG-2771:
----------------------------------

Added it0124 to reproduce the above problem.

> Provide a means of loading custom substitute components instead of default Maven components
> -------------------------------------------------------------------------------------------
>
>                 Key: MNG-2771
>                 URL: http://jira.codehaus.org/browse/MNG-2771
>             Project: Maven 2
>          Issue Type: New Feature
>          Components: General
>    Affects Versions: 2.0.4
>            Reporter: John Casey
>            Assignee: Kenney Westerhof
>             Fix For: 2.1-alpha-1
>
>
> At times, it is necessary to use different mechanisms for resolving artifacts, building projects, etc. Since Maven is built on component-oriented technology, it should be possible to substitute the component implementation used for these tasks. Yet this is currently impossible.
> We need a mechanism for specifying, resolving, loading, and using custom components during the build process.

-- 
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

        

[jira] Commented: (MNG-2771) Provide a means of loading custom substitute components instead of default Maven components

Posted by "Jason van Zyl (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=204494#action_204494 ] 

Jason van Zyl commented on MNG-2771:
------------------------------------

This can be done by dropping in components, or using the new extension mechanism where plugins can add core components.

> Provide a means of loading custom substitute components instead of default Maven components
> -------------------------------------------------------------------------------------------
>
>                 Key: MNG-2771
>                 URL: http://jira.codehaus.org/browse/MNG-2771
>             Project: Maven 2 & 3
>          Issue Type: New Feature
>          Components: General
>    Affects Versions: 2.0.4
>            Reporter: John Casey
>            Assignee: Igor Fedorenko
>             Fix For: 3.x
>
>
> At times, it is necessary to use different mechanisms for resolving artifacts, building projects, etc. Since Maven is built on component-oriented technology, it should be possible to substitute the component implementation used for these tasks. Yet this is currently impossible.
> We need a mechanism for specifying, resolving, loading, and using custom components during the build process.

-- 
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

        

[jira] Commented: (MNG-2771) Provide a means of loading custom substitute components instead of default Maven components

Posted by "Mark Hobson (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_100592 ] 

Mark Hobson commented on MNG-2771:
----------------------------------

I can't seem to get the extensions mechanism working when overriding descriptors in 2.0.x nor 2.1.  Looking at both sources, DefaultExtensionManager.addExtension calls DefaultPlexusContainer.addJarResource in which discoverComponents never overrides a descriptor if it already exists.  This seems to go against Kenney's comment above - am I missing something?

> Provide a means of loading custom substitute components instead of default Maven components
> -------------------------------------------------------------------------------------------
>
>                 Key: MNG-2771
>                 URL: http://jira.codehaus.org/browse/MNG-2771
>             Project: Maven 2
>          Issue Type: New Feature
>          Components: General
>    Affects Versions: 2.0.4
>            Reporter: John Casey
>            Assignee: Kenney Westerhof
>             Fix For: 2.1-alpha-1
>
>
> At times, it is necessary to use different mechanisms for resolving artifacts, building projects, etc. Since Maven is built on component-oriented technology, it should be possible to substitute the component implementation used for these tasks. Yet this is currently impossible.
> We need a mechanism for specifying, resolving, loading, and using custom components during the build process.

-- 
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

        

[jira] Commented: (MNG-2771) Provide a means of loading custom substitute components instead of default Maven components

Posted by "Jason van Zyl (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2771?page=comments#action_85059 ] 
            
Jason van Zyl commented on MNG-2771:
------------------------------------

This corresponds to http://docs.codehaus.org/display/MAVEN/Substitution+of+Custom+Maven+Components

And Milos/Eugene are already using the ContainerCustomizer in the Embedder but we have to expose this via configuration for the command line.

> Provide a means of loading custom substitute components instead of default Maven components
> -------------------------------------------------------------------------------------------
>
>                 Key: MNG-2771
>                 URL: http://jira.codehaus.org/browse/MNG-2771
>             Project: Maven 2
>          Issue Type: New Feature
>          Components: General
>    Affects Versions: 2.0.4
>            Reporter: John Casey
>             Fix For: 2.1-alpha-1
>
>
> At times, it is necessary to use different mechanisms for resolving artifacts, building projects, etc. Since Maven is built on component-oriented technology, it should be possible to substitute the component implementation used for these tasks. Yet this is currently impossible.
> We need a mechanism for specifying, resolving, loading, and using custom components during the build process.

-- 
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

        

[jira] Commented: (MNG-2771) Provide a means of loading custom substitute components instead of default Maven components

Posted by "Mark Hobson (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_94003 ] 

Mark Hobson commented on MNG-2771:
----------------------------------

Are there any plans to backport this to 2.0.x?  Method (1) works on 2.0.7-SNAPSHOT if m2.conf is updated accordingly; (2) doesn't work; (3) I haven't tried.

Does (1) work on 2.1-SNAPSHOT with no changes?  I couldn't see any reference to extensions in m2.conf.

> Provide a means of loading custom substitute components instead of default Maven components
> -------------------------------------------------------------------------------------------
>
>                 Key: MNG-2771
>                 URL: http://jira.codehaus.org/browse/MNG-2771
>             Project: Maven 2
>          Issue Type: New Feature
>          Components: General
>    Affects Versions: 2.0.4
>            Reporter: John Casey
>            Assignee: Kenney Westerhof
>             Fix For: 2.1-alpha-1
>
>
> At times, it is necessary to use different mechanisms for resolving artifacts, building projects, etc. Since Maven is built on component-oriented technology, it should be possible to substitute the component implementation used for these tasks. Yet this is currently impossible.
> We need a mechanism for specifying, resolving, loading, and using custom components during the build process.

-- 
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