Thanks Brett, So I'll re-close the issue telling that if the Exception issue not saying the settings is badly formed belongs to core maven instead to the archetype plugin.
Regards, Raphaël 2008/6/4 Brett Porter <[EMAIL PROTECTED]>: > Hi Raphaël, > > Having mirrors is not mandatory (this is the default for a maven > installation), but if you have a mirror element, mirrorOf for that element > is mandatory (I'm not sure if settings.xml reflects that, but it makes no > sense with out it). > > ie, this is invalid: > > <mirror> > <id>new-central</id> > <url>http://repo1.maven.org</url> > </mirror> > > Cheers, > Brett > > On 04/06/2008, at 7:11 AM, Raphaël Piéroni wrote: > >> Hi folks, >> >> I answered that the mirrorOf element in settings >> is mandatory, as it behave such. >> But reading the http://maven.apache.org/xsd/settings-1.0.0.xsd >> It seems that any element in >> settings/mirrors/mirror ain't mandatory. >> Which resulted in the described problem in the issue. >> >> Here the problem on which i need some understanding of >> the settings.xml. >> >> I checked in archetype code, the only reference to mirrors is in the >> GenerationRequest file. >> But it is never used. >> >> Please comment and let me know what you think about. >> >> Thanks in advance >> >> Raphaël >> >> 2008/6/3 Frank Adcock (JIRA) <[EMAIL PROTECTED]>: >>> >>> [ >>> http://jira.codehaus.org/browse/ARCHETYPE-177?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel >>> ] >>> >>> Frank Adcock reopened ARCHETYPE-177: >>> ------------------------------------ >>> >>> >>> Why is this not a defect. >>> >>> As a user you receive a null pointer exception because of something >>> missing in the settings.xml file. >>> >>> At the very least you should receive an error message indicating the >>> problem. If you can have a situation where the mirrorOf setting is >>> optional, then it should not be throwing a null pointer exception but >>> handling it better. >>> >>> To my mind there is a problem, whether the priority needs to be adjusted >>> to suit the impact, but certainly the way it is it takes a considerable >>> amount of time to figure out what the problem is, and it is not necessarily >>> obvious that the mirrorOf field is the problem. >>> >>>> NullPointerException generating archetype when mirrors are in >>>> settings.xml >>>> >>>> -------------------------------------------------------------------------- >>>> >>>> Key: ARCHETYPE-177 >>>> URL: http://jira.codehaus.org/browse/ARCHETYPE-177 >>>> Project: Maven Archetype >>>> Issue Type: Bug >>>> Components: Archetypes, Generator >>>> Environment: Windows XP Pro >>>> Reporter: Frank Adcock >>>> >>>> When attempting to generate any archetype from the mvn >>>> archetype:generate command I get a null pointer exception thrown if I have >>>> mirrors defined in my settings.xml file. I believe there is a related >>>> issue >>>> where mvn package will also get a null pointer exception if a repository >>>> specified in the project pom does not have a matching mirror id in the >>>> settings.xml. However, the stack trace for the archetype generation is: >>>> Choose a number: >>>> (1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19/20/21/22/23/2 >>>> 4/25/26/27/28/29/30/31/32/33/34/35/36/37/38/39/40/41/42/43/44) 15: : 6 >>>> [INFO] >>>> ------------------------------------------------------------------------ >>>> [ERROR] BUILD FAILURE >>>> [INFO] >>>> ------------------------------------------------------------------------ >>>> [INFO] : java.lang.NullPointerException >>>> null >>>> [INFO] >>>> ------------------------------------------------------------------------ >>>> [INFO] Trace >>>> org.apache.maven.BuildFailureException >>>> at >>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa >>>> ultLifecycleExecutor.java:579) >>>> at >>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone >>>> Goal(DefaultLifecycleExecutor.java:512) >>>> at >>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau >>>> ltLifecycleExecutor.java:482) >>>> at >>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan >>>> dleFailures(DefaultLifecycleExecutor.java:330) >>>> at >>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen >>>> ts(DefaultLifecycleExecutor.java:227) >>>> at >>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi >>>> fecycleExecutor.java:142) >>>> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336) >>>> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129) >>>> at org.apache.maven.cli.MavenCli.main(MavenCli.java:287) >>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>>> at >>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. >>>> java:39) >>>> at >>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces >>>> sorImpl.java:25) >>>> at java.lang.reflect.Method.invoke(Method.java:585) >>>> at >>>> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) >>>> at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) >>>> at >>>> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) >>>> at org.codehaus.classworlds.Launcher.main(Launcher.java:375) >>>> Caused by: org.apache.maven.plugin.MojoFailureException >>>> at >>>> org.apache.maven.archetype.mojos.CreateProjectFromArchetypeMojo.execu >>>> te(CreateProjectFromArchetypeMojo.java:202) >>>> at >>>> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi >>>> nManager.java:451) >>>> at >>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa >>>> ultLifecycleExecutor.java:558) >>>> ... 16 more >>>> [INFO] >>>> ------------------------------------------------------------------------ >>>> [INFO] Total time: 7 seconds >>>> [INFO] Finished at: Wed May 28 17:49:39 EST 2008 >>>> [INFO] Final Memory: 8M/14M >>>> [INFO] >>>> ------------------------------------------------------------------------ >>>> C:\Documents and Settings\frank\My Documents\Development\Sandbox>mvn -v >>>> Maven version: 2.0.9 >>>> Java version: 1.5.0_08 >>>> OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows" >>>> The mirrored settings from the settings.xml file are: >>>> <mirrors> >>>> <mirror> >>>> <id>public-snapshots</id> >>>> <name>public-snapshots</name> >>>> >>>> <url>http://maven.ho.bushlife.com.au:8081/nexus/content/groups/public-snapshots</url> >>>> </mirror> >>>> <mirror> >>>> <id>nexus-central</id> >>>> >>>> <url>http://maven.ho.bushlife.com.au:8081/nexus/content/groups/public</url> >>>> <mirrorOf>central</mirrorOf> >>>> </mirror> >>>> <mirror> >>>> <id>nexus-maven-repo</id> >>>> >>>> <url>http://maven.ho.bushlife.com.au:8081/nexus/content/groups/public</url> >>>> <mirrorOf>maven-repo</mirrorOf> >>>> </mirror> >>>> <mirror> >>>> <id>nexus-apache-m2-incubator</id> >>>> >>>> <url>http://maven.ho.bushlife.com.au:8081/nexus/content/groups/public</url> >>>> <mirrorOf>apache.m2.incubator</mirrorOf> >>>> </mirror> >>>> <mirror> >>>> <id>nexus-eclipse-repository</id> >>>> >>>> <url>http://maven.ho.bushlife.com.au:8081/nexus/content/groups/public</url> >>>> <mirrorOf>eclipse-repository</mirrorOf> >>>> </mirror> >>>> <mirror> >>>> <id>nexus-safehaus-repository</id> >>>> >>>> <url>http://maven.ho.bushlife.com.au:8081/nexus/content/groups/public</url> >>>> <mirrorOf>safehaus-repository</mirrorOf> >>>> </mirror> >>>> <mirror> >>>> <id>nexus-spring-ext</id> >>>> >>>> <url>http://maven.ho.bushlife.com.au:8081/nexus/content/groups/public</url> >>>> <mirrorOf>spring-ext</mirrorOf> >>>> </mirror> >>>> <mirror> >>>> <id>nexus-i21-s3-osgi-repo</id> >>>> >>>> <url>http://maven.ho.bushlife.com.au:8081/nexus/content/groups/public</url> >>>> <mirrorOf>i21-s3-osgi-repo</mirrorOf> >>>> </mirror> >>>> <mirror> >>>> <id>nexus-i21-s3-maven-repo</id> >>>> >>>> <url>http://maven.ho.bushlife.com.au:8081/nexus/content/groups/public</url> >>>> <mirrorOf>i21-s3-maven-repo</mirrorOf> >>>> </mirror> >>>> <mirror> >>>> <id>nexus-appfuse</id> >>>> >>>> <url>http://maven.ho.bushlife.com.au:8081/nexus/content/groups/public</url> >>>> <mirrorOf>appfuse</mirrorOf> >>>> </mirror> >>>> <mirror> >>>> <id>nexus-java.net</id> >>>> >>>> <url>http://maven.ho.bushlife.com.au:8081/nexus/content/groups/public</url> >>>> <mirrorOf>java.net</mirrorOf> >>>> </mirror> >>>> </mirrors> >>>> These mirrored settings work for other builds within eclipse, just not >>>> from the archetype generation, so the proxy repo is working well, but the >>>> null pointer exceptions make it difficult to figure out what the problem >>>> is. >>> >>> -- >>> This message is automatically generated by JIRA. >>> - >>> If you think it was sent incorrectly contact one of the administrators: >>> http://jira.codehaus.org/secure/Administrators.jspa >>> - >>> For more information on JIRA, see: http://www.atlassian.com/software/jira >>> >>> >>> > > -- > Brett Porter > [EMAIL PROTECTED] > http://blogs.exist.com/bporter/ > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >