maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brett Porter <br...@apache.org>
Subject Re: cvs commit: maven/src/java/org/apache/maven/plugin PluginManager.java
Date Fri, 02 Jul 2004 00:33:03 GMT
Emmanuel,

This is checking the wrong directory - the user plugin directory is usually
empty (ie jars in $MAVEN_HOME_LOCAL/plugins). It should be checking the first
one: pluginFiles. (that is $MAVEN_HOME/plugins)

Also, wouldn't userPluginFiles.isEmpty() be much easier? :)

- Brett

>            Map pluginFiles = getPluginFiles( pluginsDir, true );
>   -        pluginFiles.putAll( getPluginFiles( userPluginsDir, false ) );
>   +        Map userPluginFiles = getPluginFiles( userPluginsDir, false );
>   +        
>   +        if ( !Collections.EMPTY_MAP.equals( userPluginFiles ) &&
>   +            Collections.EMPTY_MAP.hashCode() == userPluginFiles.hashCode()
> )
>   +        {
>   +            pluginFiles.putAll( userPluginFiles );
>   +        }
>   +        else
>   +        {
>   +            throw new MavenException( "Maven was badly installed. Please
> reinstall it." );
>   +        }
>   +        

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


Mime
View raw message