Skip to content

ExecuteMojo doesn't update Ruby classloader to plugin classloader #252

Open
@byteit101

Description

@byteit101

When using pom.rb, the Parser uses the coreExtension>io.takari.polyglot:polyglot-ruby classloader. When executing the mojos, the Thread context classloader is the plugin>io.takari.polyglot:polyglot-maven-plugin classloader with custom dependencies added, but JRuby still uses the "coreExtension" classloader.

Ruby execute blocks should pick up dependencies added:

# ...
plugin!('io.takari.polyglot:polyglot-maven-plugin', VERSIONS[:polyglot_version]) do
    dependency( 'org.apache.maven.shared', 'maven-dependency-tree', '3.2.1')
end

execute :install_gems, :'initialize' do |ctx|
    org.apache.maven.shared.dependency.graph.DependencyGraphBuilder # => Exception!
end
# ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions