Examples of PluginRegistry


Examples of org.apache.maven.plugin.registry.PluginRegistry

    }

    private boolean checkForRejectedStatus( String groupId, String artifactId, String version )
        throws PluginVersionResolutionException
    {
        PluginRegistry pluginRegistry = getPluginRegistry( groupId, artifactId );

        org.apache.maven.plugin.registry.Plugin plugin = getPlugin( groupId, artifactId, pluginRegistry );

        return plugin.getRejectedVersions().contains( version );
    }
View Full Code Here

Examples of org.apache.maven.plugin.registry.PluginRegistry

    }

    private void addNewVersionToRejectedListInExisting( String groupId, String artifactId, String rejectedVersion )
        throws PluginVersionResolutionException
    {
        PluginRegistry pluginRegistry = getPluginRegistry( groupId, artifactId );

        org.apache.maven.plugin.registry.Plugin plugin = getPlugin( groupId, artifactId, pluginRegistry );

        String pluginKey = constructPluginKey( groupId, artifactId );
View Full Code Here

Examples of org.apache.maven.plugin.registry.PluginRegistry

    }

    private String resolveExistingFromPluginRegistry( String groupId, String artifactId )
        throws PluginVersionResolutionException
    {
        PluginRegistry pluginRegistry = getPluginRegistry( groupId, artifactId );

        org.apache.maven.plugin.registry.Plugin plugin = getPlugin( groupId, artifactId, pluginRegistry );

        String version = null;
View Full Code Here

Examples of org.apache.maven.plugin.registry.PluginRegistry

    }

    private void updatePluginVersionInRegistry( String groupId, String artifactId, String version )
        throws PluginVersionResolutionException
    {
        PluginRegistry pluginRegistry = getPluginRegistry( groupId, artifactId );

        org.apache.maven.plugin.registry.Plugin plugin = getPlugin( groupId, artifactId, pluginRegistry );

        // if we can find the plugin, but we've gotten here, the useVersion must be missing; fill it in.
        if ( plugin != null )
        {
            if ( PluginRegistry.GLOBAL_LEVEL.equals( plugin.getSourceLevel() ) )
            {
                // do nothing. We don't rewrite the globals, under any circumstances.
                getLogger().warn( "Cannot update registered version for plugin {" + groupId + ":" + artifactId +
                    "}; it is specified in the global registry." );
            }
            else
            {
                plugin.setUseVersion( version );

                SimpleDateFormat format =
                    new SimpleDateFormat( org.apache.maven.plugin.registry.Plugin.LAST_CHECKED_DATE_FORMAT );

                plugin.setLastChecked( format.format( new Date() ) );
            }
        }
        else
        {
            plugin = new org.apache.maven.plugin.registry.Plugin();

            plugin.setGroupId( groupId );
            plugin.setArtifactId( artifactId );
            plugin.setUseVersion( version );

            pluginRegistry.addPlugin( plugin );

            pluginRegistry.flushPluginsByKey();
        }

        writeUserRegistry( groupId, artifactId, pluginRegistry );
    }
View Full Code Here

Examples of org.apache.maven.plugin.registry.PluginRegistry

    private void writeUserRegistry( String groupId, String artifactId, PluginRegistry pluginRegistry )
    {
        File pluginRegistryFile = pluginRegistry.getRuntimeInfo().getFile();

        PluginRegistry extractedUserRegistry = PluginRegistryUtils.extractUserPluginRegistry( pluginRegistry );

        // only rewrite the user-level registry if one existed before, or if we've created user-level data here.
        if ( extractedUserRegistry != null )
        {
            FileWriter fWriter = null;
View Full Code Here

Examples of org.apache.maven.plugin.registry.PluginRegistry

     * @param parser
     */
    private PluginRegistry parsePluginRegistry(String tagName, XmlPullParser parser, boolean strict, String encoding)
        throws IOException, XmlPullParserException
    {
        PluginRegistry pluginRegistry = new PluginRegistry();
        pluginRegistry.setModelEncoding( encoding );
        java.util.Set parsed = new java.util.HashSet();
        int eventType = parser.getEventType();
        boolean foundRoot = false;
        while ( eventType != XmlPullParser.END_DOCUMENT )
        {
            if ( eventType == XmlPullParser.START_TAG )
            {
                if ( parser.getName().equals( tagName ) )
                {
                    foundRoot = true;
                }
                else if ( parser.getName().equals( "updateInterval" )  )
                {
                    if ( parsed.contains( "updateInterval" ) )
                    {
                        throw new XmlPullParserException( "Duplicated tag: '" + parser.getName() + "'", parser, null);
                    }
                    parsed.add( "updateInterval" );
                    pluginRegistry.setUpdateInterval( getTrimmedValue( parser.nextText()) );
                }
                else if ( parser.getName().equals( "autoUpdate" )  )
                {
                    if ( parsed.contains( "autoUpdate" ) )
                    {
                        throw new XmlPullParserException( "Duplicated tag: '" + parser.getName() + "'", parser, null);
                    }
                    parsed.add( "autoUpdate" );
                    pluginRegistry.setAutoUpdate( getTrimmedValue( parser.nextText()) );
                }
                else if ( parser.getName().equals( "checkLatest" )  )
                {
                    if ( parsed.contains( "checkLatest" ) )
                    {
                        throw new XmlPullParserException( "Duplicated tag: '" + parser.getName() + "'", parser, null);
                    }
                    parsed.add( "checkLatest" );
                    pluginRegistry.setCheckLatest( getTrimmedValue( parser.nextText()) );
                }
                else if ( parser.getName().equals( "plugins" )  )
                {
                    if ( parsed.contains( "plugins" ) )
                    {
                        throw new XmlPullParserException( "Duplicated tag: '" + parser.getName() + "'", parser, null);
                    }
                    parsed.add( "plugins" );
                    java.util.List plugins = new java.util.ArrayList();
                    pluginRegistry.setPlugins( plugins );
                    while ( parser.nextTag() == XmlPullParser.START_TAG )
                    {
                        if ( parser.getName().equals( "plugin" ) )
                        {
                            plugins.add( parsePlugin( "plugin", parser, strict, encoding ) );
View Full Code Here

Examples of org.gradle.api.internal.plugins.PluginRegistry

    public Class<?> resolve() {
        ClassPath classPath = classPathFactory.create();
        ClassLoaderScope loaderScope = parent.createChild();
        loaderScope.local(classPath);
        loaderScope.lock();
        PluginRegistry pluginRegistry = new DefaultPluginRegistry(pluginInspector, loaderScope.getLocalClassLoader());
        PotentialPluginWithId lookup = pluginRegistry.lookup(pluginId.toString());
        if (lookup == null) {
            throw new UnknownPluginException("Plugin with id '" + pluginId + "' not found.");

        }
        return lookup.asClass();
View Full Code Here

Examples of org.hotswap.agent.config.PluginRegistry

            will(returnValue(Collections.singletonList(SimplePlugin.class.getName())));
            allowing(annotationProcessor).processAnnotations(with(any(Class.class)), with(any(Class.class)));
            will(returnValue(true));
        }});

        PluginRegistry pluginRegistry = pluginManager.getPluginRegistry();
        pluginRegistry.setAnnotationScanner(annotationScanner);
        pluginRegistry.setAnnotationProcessor(annotationProcessor);
        pluginManager.init(instrumentation);

        assertEquals("Plugin registered", pluginRegistry.getRegisteredPlugins().size(), 1);
        assertTrue("Plugin correct class", pluginRegistry.getRegisteredPlugins().keySet().iterator().next().equals(SimplePlugin.class));
    }
View Full Code Here

Examples of org.jboss.seam.wiki.core.plugin.PluginRegistry

            if (cacheRegions != null) {
                requiredCacheRegions.addAll(cacheRegions);
            }

            PluginRegistry pluginRegistry = PluginRegistry.instance();
            for (Plugin plugin : pluginRegistry.getPlugins()) {
                for (PluginModule pluginModule : plugin.getModules()) {
                    if (pluginModule.getFragmentCacheRegions() != null)
                        requiredCacheRegions.addAll(pluginModule.getFragmentCacheRegions());
                }
            }
View Full Code Here

Examples of org.jboss.seam.wiki.core.plugin.PluginRegistry

        if (themeResourceName == null) {
            response.sendError(HttpServletResponse.SC_BAD_REQUEST, "Resource name not found");
            return;
        }

        PluginRegistry registry = PluginRegistry.instance();
        Plugin plugin = registry.getPlugin(pluginKey);
        if (plugin == null) {
            response.sendError(HttpServletResponse.SC_NOT_FOUND, "Plugin not found in registry: " + pluginKey);
            return;
        }
        PluginModule pluginModule = plugin.getModuleByKey(pluginModuleKey);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.