[ http://jira.codehaus.org/browse/MCHANGELOG-20?page=all ]
Brett Porter moved MOJO-149 to MCHANGELOG-20: --------------------------------------------- Key: MCHANGELOG-20 (was: MOJO-149) Project: Maven 2.x Changelog Plugin (was: Mojo) > You must use the id tag when listing developers in your POM, otherwise NPE if > using the changelog plugin > -------------------------------------------------------------------------------------------------------- > > Key: MCHANGELOG-20 > URL: http://jira.codehaus.org/browse/MCHANGELOG-20 > Project: Maven 2.x Changelog Plugin > Type: Bug > Environment: OSX 10.4.3, java 1.4.2._09, > changelog-maven-plugin-2.0-beta-2-SNAPSHOT > Reporter: Julian Wood > Assignee: Edwin Punzalan > > > If you don't add an id tag to your developer in your pom (which is not > required), and you configure a changelog report, then this piece of code will > generate an NPE, because you can't add a null key to a Hashtable: > ChangeLog.java > -- > private Properties getUserList() > { > Properties userList = new Properties(); > > Developer developer = null; > for (Iterator i = getDevelopers().iterator(); i.hasNext();) > { > developer = (Developer) i.next(); > userList.put(developer.getId(), developer.getName()); > } > > return userList; > } > -- > [INFO] Generate "changelog" report. > [INFO] Generating changed sets xml to: > /Volumes/Jaguar/Users/woodj/Documents/pmgt/pmgt/trunk/pmgt-jar/target/changelog.xml > [INFO] SCM Working Directory: > /Volumes/Jaguar/Users/woodj/Documents/pmgt/pmgt/trunk/pmgt-jar/src/main/java > [INFO] SCM Command Line[0]: svn > [INFO] SCM Command Line[1]: log > [INFO] SCM Command Line[2]: -v > [INFO] SCM Command Line[3]: -r{2005-11-29}:{2005-10-29} > [INFO] ChangeSet between 2005-10-29 and 2005-11-29: 14 entries > [INFO] > ---------------------------------------------------------------------------- > [ERROR] FATAL ERROR > [INFO] > ---------------------------------------------------------------------------- > [INFO] null > [INFO] > ---------------------------------------------------------------------------- > [DEBUG] Trace > java.lang.NullPointerException > at java.util.Hashtable.put(Hashtable.java:398) > at > org.apache.maven.changelog.ChangeLog.getUserList(ChangeLog.java:530) > at > org.apache.maven.changelog.ChangeLog.replaceAuthorIdWithName(ChangeLog.java:541) > at org.apache.maven.changelog.ChangeLog.doExecute(ChangeLog.java:370) > at > org.apache.maven.changelog.ChangeLogReport.getChangeLog(ChangeLogReport.java:263) > at > org.apache.maven.changelog.ChangeLogReport.generateChangeSetsFromSCM(ChangeLogReport.java:218) > at > org.apache.maven.changelog.ChangeLogReport.getChangedSets(ChangeLogReport.java:198) > at > org.apache.maven.changelog.ChangeLogReport.executeReport(ChangeLogReport.java:173) > at > org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:117) > at > org.apache.maven.plugins.site.SiteMojo.generateReportsPages(SiteMojo.java:802) > at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:301) > at > org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:519) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:469) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:448) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:301) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:268) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:137) > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322) > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115) > at org.apache.maven.cli.MavenCli.main(MavenCli.java:249) > 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:324) > 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) > [INFO] > ---------------------------------------------------------------------------- > Not sure if this should be fixed in the docs, or in code. > Thanks, > Julian -- 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