Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * Copyright 2013 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * You may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
  * http://www.apache.org/licenses/LICENSE-2.0
  *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
/*
 * Originally from http://stackoverflow.com/questions/2659048/add-maven-build-classpath-to-plugin-execution-classpath
 */
package org.codehaus.gmavenplus.plexus;
A custom ComponentConfigurator which adds the project's runtime classpath elements.

Author(s):
Brian Jackson
Keegan Witt
Since:
1.0-beta-3
Plexus.component:
role="org.codehaus.plexus.component.configurator.ComponentConfigurator" role-hint="include-project-runtime-dependencies"
Plexus.requirement:
role="org.codehaus.plexus.component.configurator.converters.lookup.ConverterLookup" role-hint="default"
//    private static final Log LOG = new SystemStreamLog();

    

Parameters:
component the Component to configure
configuration the Configuration to use to configure the component
expressionEvaluator the ExpressionEvaluator
containerRealm the Classrealm to use to configure the component
listener the component's Listener
Throws:
org.codehaus.plexus.component.configurator.ComponentConfigurationException when an exception occurs in component configuration
    public void configureComponent(final Object componentfinal PlexusConfiguration configurationfinal ExpressionEvaluator expressionEvaluator,
                                   final org.codehaus.plexus.classworlds.realm.ClassRealm containerRealmfinal ConfigurationListener listenerthrows ComponentConfigurationException {
        addDependenciesToClassRealm(expressionEvaluator.containerRealm);
        .registerConverter(new ClassRealmConverter(containerRealm));
        ObjectWithFieldsConverter converter = new ObjectWithFieldsConverter();
        converter.processConfiguration(componentcontainerRealm.getParentClassLoader(), configurationexpressionEvaluatorlistener);
    }

    

Parameters:
component the Component to configure
configuration the Configuration to use to configure the component
expressionEvaluator the ExpressionEvaluator
containerRealm the Classrealm to use to configure the component
listener the component's Listener
Throws:
org.codehaus.plexus.component.configurator.ComponentConfigurationException when an exception occurs in component configuration
    @SuppressWarnings("deprecation")
    public void configureComponent(final Object componentfinal PlexusConfiguration configurationfinal ExpressionEvaluator expressionEvaluator,
                                   final org.codehaus.classworlds.ClassRealm containerRealmfinal ConfigurationListener listenerthrows ComponentConfigurationException {
        addDependenciesToClassRealm(expressionEvaluator.containerRealm);
        .registerConverter(new ClassRealmConverter(containerRealm));
        ObjectWithFieldsConverter converter = new ObjectWithFieldsConverter();
        converter.processConfiguration(componentcontainerRealm.getClassLoader(), configurationexpressionEvaluatorlistener);
    }
New to GrepCode? Check out our FAQ X