[ http://jira.codehaus.org/browse/MNG-697?page=comments#action_44290 ]
John Casey commented on MNG-697:
--------------------------------
one use case that I can think of would be using a newly minted implementation
of, say, plexus-compiler, where you're doing a lookup by ROLE which is provided
in -compiler-api, and using the implementation you just put together.
I guess the bottom line for me is that this doesn't amount to too much in the
way of extra code to implement. I know the above use case could be implemented
in other ways, but this would be far less code in the plugin itself.
Personally, I'm +0 - sort of without strong opinion, but willing to implement -
but I do believe its plausible to say that this could save some time and
complexity in plugin development.
An alternative might be some maven-plugin-utils artifact which is on a separate
release schedule, and could provide utilities for constructing/managing
classloaders based on ${project.compileClasspathElements} and the like.
> allow plugins to declare dependence on the project-classpath(s)
> ---------------------------------------------------------------
>
> Key: MNG-697
> URL: http://jira.codehaus.org/browse/MNG-697
> Project: Maven 2
> Type: New Feature
> Components: maven-plugin-descriptor, maven-core
> Versions: 2.0-alpha-3
> Reporter: John Casey
> Assignee: John Casey
> Priority: Critical
> Fix For: 2.0-beta-1
>
>
> Currently the only way to provide access to the classpath which consists of
> the project artifacts within some scope from a plugin is to manually create
> your own classloader inside the plugin using project.getCompileClasspath() or
> somesuch. In many plugins (thinking of integration-tests where the project is
> NOT an appserver module), it would be most useful to have the plugin
> container started with the appropriate project-classpath already added to the
> container. This might even be nice for testing plexus projects, and would
> allow the plugin to simply instantiate (somehow) and use compiled classes in
> order to run tests.
> Jesse even tells me this would be useful from a process-classes phase, in
> order to gather info about the classes that were compiled.
> I propose the following modifications:
> 1. Add addProjectClasspath="scope" (where scope = {compile,test...})
> configuration for the maven-plugin-plugin, alongside prefix or whatever else
> we use to define the plugin-level metadata.
> 2. For plugins declaring addProjectClasspath, add the appropriate project
> classpath to the plugin container before calling the mojo.
--
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]