Hi Hervé, On 5 February 2011 18:30, Hervé BOUTEMY <herve.bout...@free.fr> wrote:
> archetype-common, like any other Maven component, does not instanciate > components directly but uses plexus container as dependency injection > toolkit. > Maven core does the container initialization for Maven usage, but if you're > creating a standalone application, you have to init the container yourself > and > retrieve the first component. > See "Executing the Plexus Application" in Plexus quickstart [1]. > Thanks for the information and reference. I'll follow up if I have more questions on this. Thanks and Regards, Harshana > > Regards, > > Hervé > > [1] http://plexus.codehaus.org/guides/quick-start/getting-started.html > > Le samedi 5 février 2011, Harshana Eranga Martin a écrit : > > Hi All, > > > > I'm trying to use maven archetypes programmatically to create a maven > > project. > > > > While I'm looking at the source code of the class > > *DefaultArchetypeManager*of *archetype-common-2.0.jar*, I see possible > > NPEs from the > > *generateProjectFromArchetype > > *method and *createArchetypeFromProject *method. The causes are, these > > methods try to invoke methods on *ArchetypeGenerator *and > *ArchetypeCreator > > *references without instantiating them. > > > > Is this a known situation or a bug? > > > > > > Thanks and Regards, > > Harshana Martin > > -- > > Harshana Eranga Martin > > Software Engineer, > > WSO2 Inc. > > Web: http://wso2.com > > http://wso2.org > > > > ECF Committer: http://www.eclipse.org/ecf/ > > Blog: http://harshana05.blogspot.com > > Profile: https://www.google.com/profiles/harshana05 > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org > For additional commands, e-mail: dev-h...@maven.apache.org > > -- Thanks and Regards, Harshana Martin -- Harshana Eranga Martin Software Engineer, WSO2 Inc. Web: http://wso2.com http://wso2.org ECF Committer: http://www.eclipse.org/ecf/ Blog: http://harshana05.blogspot.com Profile: https://www.google.com/profiles/harshana05