org.codehaus.classworlds.ClassRealm Java Examples
The following examples show how to use
org.codehaus.classworlds.ClassRealm.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: IncludeProjectDependenciesComponentConfigurator.java From incubator-hivemall with Apache License 2.0 | 6 votes |
@SuppressWarnings("unchecked") private static void addProjectDependenciesToClassRealm( final ExpressionEvaluator expressionEvaluator, final ClassRealm containerRealm) throws ComponentConfigurationException { final List<String> runtimeClasspathElements; try { // noinspection unchecked runtimeClasspathElements = (List<String>) expressionEvaluator.evaluate( "${project.runtimeClasspathElements}"); } catch (ExpressionEvaluationException e) { throw new ComponentConfigurationException( "There was a problem evaluating: ${project.runtimeClasspathElements}", e); } // Add the project dependencies to the ClassRealm final URL[] urls = buildURLs(runtimeClasspathElements); for (URL url : urls) { containerRealm.addConstituent(url); } }
Example #2
Source File: IncludeProjectDependenciesComponentConfigurator.java From protostuff with Apache License 2.0 | 6 votes |
private void addProjectDependenciesToClassRealm(ExpressionEvaluator expressionEvaluator, ClassRealm containerRealm) throws ComponentConfigurationException { List<String> runtimeClasspathElements; try { // noinspection unchecked runtimeClasspathElements = (List<String>) expressionEvaluator .evaluate("${project.runtimeClasspathElements}"); } catch (ExpressionEvaluationException e) { throw new ComponentConfigurationException( "There was a problem evaluating: ${project.runtimeClasspathElements}", e); } // Add the project dependencies to the ClassRealm final URL[] urls = buildURLs(runtimeClasspathElements); for (URL url : urls) { containerRealm.addConstituent(url); } }
Example #3
Source File: IncludeProjectDependenciesComponentConfigurator.java From incubator-hivemall with Apache License 2.0 | 5 votes |
public void configureComponent(final Object component, final PlexusConfiguration configuration, final ExpressionEvaluator expressionEvaluator, final ClassRealm containerRealm, final ConfigurationListener listener) throws ComponentConfigurationException { addProjectDependenciesToClassRealm(expressionEvaluator, containerRealm); converterLookup.registerConverter(new ClassRealmConverter(containerRealm)); ObjectWithFieldsConverter converter = new ObjectWithFieldsConverter(); converter.processConfiguration(converterLookup, component, containerRealm.getClassLoader(), configuration, expressionEvaluator, listener); }
Example #4
Source File: IncludeProjectDependenciesComponentConfigurator.java From protostuff with Apache License 2.0 | 5 votes |
public void configureComponent(Object component, PlexusConfiguration configuration, ExpressionEvaluator expressionEvaluator, ClassRealm containerRealm, ConfigurationListener listener) throws ComponentConfigurationException { addProjectDependenciesToClassRealm(expressionEvaluator, containerRealm); converterLookup.registerConverter(new ClassRealmConverter(containerRealm)); ObjectWithFieldsConverter converter = new ObjectWithFieldsConverter(); converter.processConfiguration(converterLookup, component, containerRealm.getClassLoader(), configuration, expressionEvaluator, listener); }
Example #5
Source File: IncludeProjectDependenciesComponentConfigurator.java From swagger-maven-plugin with Apache License 2.0 | 5 votes |
@Override public void configureComponent(Object component, PlexusConfiguration configuration, ExpressionEvaluator expressionEvaluator, ClassRealm containerRealm, ConfigurationListener listener) throws ComponentConfigurationException { addProjectDependenciesToClassRealm(expressionEvaluator, containerRealm); ObjectWithFieldsConverter converter = new ObjectWithFieldsConverter(); converter.processConfiguration(converterLookup, component, containerRealm.getClassLoader(), configuration, expressionEvaluator, listener); }
Example #6
Source File: IncludeProjectDependenciesComponentConfigurator.java From swagger-maven-plugin with Apache License 2.0 | 5 votes |
private void addProjectDependenciesToClassRealm(ExpressionEvaluator expressionEvaluator, ClassRealm containerRealm) throws ComponentConfigurationException { List<String> compileClasspathElements; try { //noinspection unchecked compileClasspathElements = (List<String>) expressionEvaluator.evaluate("${project.compileClasspathElements}"); } catch (ExpressionEvaluationException e) { throw new ComponentConfigurationException("There was a problem evaluating: ${project.compileClasspathElements}", e); } // Add the project dependencies to the ClassRealm final URL[] urls = buildURLs(compileClasspathElements); for (URL url : urls) { containerRealm.addConstituent(url); } }