John Poth created MNG-6371:
------------------------------

             Summary: Use ServiceLoader mechanism in JDK9 in maven plugins
                 Key: MNG-6371
                 URL: https://issues.apache.org/jira/browse/MNG-6371
             Project: Maven
          Issue Type: Improvement
          Components: Class Loading, Plugins and Lifecycle
    Affects Versions: 3.5.2
            Reporter: John Poth


It'd be nice to be able to use the ServiceLoader mechanism in maven plugins 
when using JDK9:

 

{code:java}

import org.apache.maven.plugin.AbstractMojo;

public class MyMojo extends AbstractMojo {

    public void execute() throws MojoExecutionException {

        // this is empty

        Iterator<Tool> iterator = 
ServiceLoader.load(javax.tools.Tool.class).iterator();
    }
}
{code}

 

Work around is to use a different classloader.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to