You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Andrew Williams (JIRA)" <ji...@codehaus.org> on 2007/03/27 15:02:34 UTC

[jira] Updated: (MNG-2904) Misleading error message if profiles that are active by default do not have an ID

     [ http://jira.codehaus.org/browse/MNG-2904?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Williams updated MNG-2904:
---------------------------------

    Fix Version/s: 2.0.7

It seems that this is somehow due to the <id> field which should be required not being verified when the ~/.m2/settings.xml is merged into the effective-pom.

> Misleading error message if profiles that are active by default do not have an ID
> ---------------------------------------------------------------------------------
>
>                 Key: MNG-2904
>                 URL: http://jira.codehaus.org/browse/MNG-2904
>             Project: Maven 2
>          Issue Type: Improvement
>          Components: Errors
>    Affects Versions: 2.0.5
>         Environment: Maven 2.0.x on Mac OSX Java 1.5.0_07 - happens on Java 1.4.2 also
>            Reporter: Andrew Williams
>             Fix For: 2.0.7
>
>
> to reproduce edit your ~/.m2/settings.xml and add a new profile.
> Mark it as active by default and make sure it has no ID.
> The resulting stack is thus:
> java.lang.ClassCastException: Settings.addActiveProfiles(string) parameter must be instanceof java.lang.String
>         at org.apache.maven.settings.Settings.addActiveProfile(Settings.java:91)
>         at org.apache.maven.settings.DefaultMavenSettingsBuilder.activateDefaultProfiles(DefaultMavenSettingsBuilder.java:197)
>         at org.apache.maven.settings.DefaultMavenSettingsBuilder.buildSettings(DefaultMavenSettingsBuilder.java:177)
>         at org.apache.maven.settings.DefaultMavenSettingsBuilder.buildSettings(DefaultMavenSettingsBuilder.java:153)
>         at org.apache.maven.settings.DefaultMavenSettingsBuilder.buildSettings(DefaultMavenSettingsBuilder.java:141)
>         at org.apache.maven.cli.MavenCli.buildSettings(MavenCli.java:315)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:176)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.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)

-- 
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