Help please with my unsolved issue .... :)
Shahzad Qureshi Systems Analyst/Programmer Applications Directorate, CIOB Environment Canada shahzad.qure...@ec.gc.ca -----Original Message----- From: Qureshi,Shahzad [Ontario] [mailto:shahzad.qure...@ec.gc.ca] Sent: Tuesday, March 17, 2009 4:43 PM To: Maven Users List Subject: RE: Using archetype:generate with internal repository Hello Sagara, That really helped, thank you. I had to do a bit of digging but I finally got it. One question though. If I do mvn archetype:generate -DarchetypeCatalog=http://url it works fine, but if I do the following it gives me errors mvn archetype:generate -DarchetypeArtifactId=artifact-id -DarchetypeGroupId=group-id -DarchetypeVersion=1.0 -DarchetypeCatalog=http://url I get the following error [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'archetype'. [INFO] ------------------------------------------------------------------------ [INFO] Building Maven Default Project [INFO] task-segment: [archetype:generate] (aggregator-style) [INFO] ------------------------------------------------------------------------ [INFO] Preparing archetype:generate [INFO] No goals needed for project - skipping [INFO] Setting property: classpath.resource.loader.class => 'org.codehaus.plexus .velocity.ContextClassLoaderResourceLoader'. [INFO] Setting property: velocimacro.messages.on => 'false'. [INFO] Setting property: resource.loader => 'classpath'. [INFO] Setting property: resource.manager.logwhenfound => 'false'. [INFO] [archetype:generate] [INFO] Generating project in Interactive mode [INFO] ------------------------------------------------------------------------ [ERROR] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] : java.lang.NullPointerException null [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: 4 seconds [INFO] Finished at: Tue Mar 17 15:04:03 EDT 2009 [INFO] Final Memory: 8M/14M [INFO] ------------------------------------------------------------------------ Also if I do exacttly the above but replace the url with "local" and if I've the archetype-catalog.xml in my .m2 directory it works fine too. What am I doing wrong? Shahzad Qureshi Systems Analyst/Programmer Applications Directorate, CIOB Environment Canada shahzad.qure...@ec.gc.ca -----Original Message----- From: Sagara Gunathunga [mailto:sagar...@gmail.com] Sent: Tuesday, March 17, 2009 1:05 AM To: Maven Users List Subject: Re: Using archetype:generate with internal repository Hi Shahzad, Do you have archetype-catalog.xml file on your internal repository ? ,it is required to have a archetype-catalog.xml file to get Archetype information for Maven Archetype Plug-in. please see the [1] [1] - http://maven.apache.org/plugins/maven-archetype-plugin/specification/arc hetype-catalog.html Thanks , On Tue, Mar 17, 2009 at 12:07 AM, Qureshi,Shahzad [Ontario] <shahzad.qure...@ec.gc.ca> wrote: > Hi all, > > I am having difficulty using archetype:generate plugin where I want it > to use an archetype stored in our internal repository. I was able to > do so using archetype:create plugin. I've a settings.xml in .m2 > directory and that's where archetype:create reads the internal > repository information but archetype:generate doesn't seem to do that. > > I tried using -DarchetypeRepository but I probably am not entering the > internal repository url properly. This is what I am typing and I am > getting Build Error because it can't find my archetype > > mvn archetype:generate -DarchetypeArtifactId=default-archetype > -DarchetypeGroupId=default-archetype -DarchetypeVersion=1.0 > -DarchetypeRepository=http://serveraddress/Intranet/maven-repo > > http://serveraddress/Intranet/maven-repo is where archetype-default > archetype is residing > > Any ideas? > > thanks > > Shahzad Qureshi > Systems Analyst/Programmer > Applications Directorate, CIOB > Environment Canada > shahzad.qure...@ec.gc.ca > > -- Sagara Gunathunga Blog - ssagara.blogspot.com Web - http://sagaras.awardspace.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org