On Mon, 25 Jun 2018 10:28:20 -0400 "William L. Thomson Jr." <wlt...@o-sinc.com> wrote:
> Hi Robert, > > > Based on the analysis in the comments the issue does seem to be > > having 2 instances instead of 1. I would try to figure out where and > > why this is happening. > > That I have been doing for sometime. Its rare for me to reach out for > help in building stuff. Having spent some time debugging this, I came to realize the it is not initializing twice. It initializes the MetaDataPlugin as part of Plexus startup. Which precedes Modello startup. But those are not Generators. For what ever reason no Generator plugins are loaded, or show up. But the HashMap has elements. I can provide the patch, but it basically just does System.out.println in places where I added text. In initialize I loop through plugins. System.out.println("plugins = "+plugins.size()); plugins.forEach((k, v) -> System.out.println(k + " : " + v)); https://github.com/codehaus-plexus/modello/blob/master/modello-core/src/main/java/org/codehaus/modello/plugin/AbstractPluginManager.java#L44 Where plugins is private Map<String, T> plugins = new HashMap<String, T>() What is interesting there, is that there is a plugin count, with empty key or value for Generators . I can try to print out null elements. Though likely get a NPE or something in that process. Here is some example output with java, xml, and xsd plugins. I see the MetaDataPlugins, but never any Generators. The plugin ModelloCLI wants is a generator not a MetaDataPlugin. -------------------------------------------------------------------------------------------------------------- $ modello settings.mdo modello ../java/ 4.0.0 false true DefaultPlexusContainer AbstractPluginManager.initialize() plugins = 4 xsd : org.codehaus.modello.plugin.xsd.metadata.XsdMetadataPlugin@275710fc model : org.codehaus.modello.plugin.model.ModelMetadataPlugin@4de5031f java : org.codehaus.modello.plugin.java.metadata.JavaMetadataPlugin@5d47c63f xml : org.codehaus.modello.plugins.xml.metadata.XmlMetadataPlugin@3bbc39f8 AbstractPluginManager.initialize() plugins = 6 ModelloCore new Modello() parsed args generatorId = modello plugins = 6 getPlugin = modello Exception in thread "main" org.codehaus.modello.ModelloRuntimeException: No such plugin: modello -------------------------------------------------------------------------------------------------------------- Not sure how it sees 6 plugins from 4 before. Or why I cannot access any. Seems like some Generator plugins exist. But the HashMap has some issues. Not sure if its improper types being passed or what. -- William L. Thomson Jr.
pgpxkNJFDmlJ9.pgp
Description: OpenPGP digital signature