[ http://jira.codehaus.org/browse/MJAVADOC-149?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Benjamin Bentmann updated MJAVADOC-149: --------------------------------------- Attachment: remove-newlines.patch The attached patch should solve this issue. All problematic string arguments that I know of are passed through the new helper method newlineFreeArgument(). Note that I chose to replace newlines with spaces rather than simply delete them as a newline is actually a whitespace and separates words. The patch also includes a unit test named "newline-test" to check for the newline handling. It is basically a copy&paste of the existing header-bottom-test, just extended to check some further parameters. You may want to either delete the header-bottom-test or split the newline-test into smaller tests if you want to check parameters individually to increase expressiveness of test failures. > Newline in ${project.organization.name} makes javadoc fail > ---------------------------------------------------------- > > Key: MJAVADOC-149 > URL: http://jira.codehaus.org/browse/MJAVADOC-149 > Project: Maven 2.x Javadoc Plugin > Issue Type: Bug > Affects Versions: 2.3 > Environment: Maven 2.0.7, JDK 1.5.0_12, Win > Reporter: Benjamin Bentmann > Attachments: remove-newlines.patch > > > Consider the following POM snippet: > {code}<organization> > <name> > My company, > my department > </name> > </organization>{code} > The Javadoc plugin outputs the following to the options file, using its > default configuration: > {code}-bottom > 'Copyright © 2007 My company, > my department. All Rights Reserved.'{code} > This actually makes javadoc fail with the following errors:{code}javadoc: > error - Illegal package name: "department." > javadoc: error - Illegal package name: "Reserved." > javadoc: error - Illegal package name: "" > javadoc: warning - No source files for package my > javadoc: warning - No source files for package All > javadoc: warning - No source files for package Rights{code} > Since line terminators are used as separators within the arg files, the > Javadoc plugin should replace line terminators (in all fashions) with spaces > before writing out any POM value so that the formatting of the XML contents > does not matter. -- 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