[ 
http://jira.codehaus.org/browse/MNG-1323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_102012
 ] 

Piotr Tabor edited comment on MNG-1323 at 7/11/07 11:17 PM:
------------------------------------------------------------

I am trying to work on the issue too. 

The simplest solution is in DefaultPluginManager change the code to:

 private PluginDescriptor verifyVersionedPlugin( Plugin plugin,
                                                    MavenProject project,
                                                    ArtifactRepository 
localRepository )


            File pluginFile = pluginArtifact.getFile();

*            if  /*( !pluginCollector.isPluginInstalled( plugin ) ||*/  ( 
pluginContainer == null ) *
            {
                addPlugin( plugin, pluginArtifact, project, localRepository );
            }
*            else  /*if ( pluginFile.lastModified() > 
pluginContainer.getCreationDate().getTime() )/ * *
            {
                getLogger().info(
                    "Reloading plugin container for: " + plugin.getKey() + ". 
The plugin artifact has changed." );

                pluginContainer.dispose();

                pluginCollector.flushPluginDescriptor( plugin );

                addPlugin( plugin, pluginArtifact, project, localRepository );
            }

But it slows Maven to much... I will trying to prepare know a little bit better 
solution that checks if getted descriptor matches and if
not - to replace it. 

The best solution is to build plugin's identifiers that contains hashcode of 
dependencies.

Any comments from Commiters ? 


 was:
I am trying to work on the issue too. 

The simplest solution is in DefaultPluginManager change the code to:

 private PluginDescriptor verifyVersionedPlugin( Plugin plugin,
                                                    MavenProject project,
                                                    ArtifactRepository 
localRepository )


            File pluginFile = pluginArtifact.getFile();

            if * /*( !pluginCollector.isPluginInstalled( plugin ) ||*/ * ( 
pluginContainer == null )
            {
                addPlugin( plugin, pluginArtifact, project, localRepository );
            }
            else * /*if ( pluginFile.lastModified() > 
pluginContainer.getCreationDate().getTime() )*/ *
            {
                getLogger().info(
                    "Reloading plugin container for: " + plugin.getKey() + ". 
The plugin artifact has changed." );

                pluginContainer.dispose();

                pluginCollector.flushPluginDescriptor( plugin );

                addPlugin( plugin, pluginArtifact, project, localRepository );
            }

But it slows Maven to much... I will trying to prepare know a little bit better 
solution that checks if getted descriptor matches and if
not - to replace it. 

The best solution is to build plugin's identifiers that contains hashcode of 
dependencies.

Any comments from Commiters ? 

> Plugin extensions (dependencies) not resolved in reactor build
> --------------------------------------------------------------
>
>                 Key: MNG-1323
>                 URL: http://jira.codehaus.org/browse/MNG-1323
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Plugins and Lifecycle
>    Affects Versions: 2.0
>            Reporter: Kenney Westerhof
>             Fix For: 2.0.x
>
>         Attachments: MNG-1323-core-integration-tests.diff
>
>
> I've added a dependency on an Ant Task in 
> project/build/plugins/plugin[artifactId='maven-antrun-plugin']/dependencies/ 
> and run that anttask using the antrun plugin.
> When run from the project dir itself it runs fine.
> When running from the root of the project tree (reactor build, project one 
> level below root),
> antrun bails out because the taskdef can't be found (not on classpath).
> It looks like the dependency isn't resolved, or not added to the plugins' 
> classrealm.

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

        

Reply via email to