You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Mirko Friedenhagen (JIRA)" <ji...@codehaus.org> on 2014/05/16 16:27:10 UTC

[jira] (MRELEASE-850) mvn release:prepare reformats pom.xml comments

    [ https://jira.codehaus.org/browse/MRELEASE-850?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=346396#comment-346396 ] 

Mirko Friedenhagen commented on MRELEASE-850:
---------------------------------------------

[~psychonaut], while the general problem will not go away easily, I am not sure you are allowed to use less-than or greater-than unescaped even in comments, so the XML parser takes your GPL-URL as an self closing tag with the strange element name {{http://www.gnu.org/licenses}} :-). With JDK8, the same thing may happen when you use this license in Java file comments and run {{javadoc}}, BTW.

[~rfscholte], do you think the coverage now is good enough to tackle the update? I have several inhouse users complaining about this behavior as well.

> mvn release:prepare reformats pom.xml comments
> ----------------------------------------------
>
>                 Key: MRELEASE-850
>                 URL: https://jira.codehaus.org/browse/MRELEASE-850
>             Project: Maven Release Plugin
>          Issue Type: Bug
>    Affects Versions: 2.4.1
>         Environment: openSUSE 12.3 (x86-64)
>            Reporter: Tristan Miller
>         Attachments: pom.xml
>
>
> We have a Maven project that contains licence headers as XML comments in the pom.xml files.  We use a licence checker plugin which checks for the presence of these licence headers.
> It seems the mvn release:prepare command subtly reformats the XML comments.  The licence checker runs after this reformatting, and fails since the licence header is no longer an exact match to the reference text.  The problem occurs with the following comment lines:
>     You should have received a copy of the GNU General Public License
>     along with this program.  If not, see <http://www.gnu.org/licenses/>.
> Maven inserts some extra whitespace:
>     You should have received a copy of the GNU General Public License
>     along with this program.  If not, see <http://www.gnu.org/licenses />.
> I suspect this is a bug in Maven (or whatever XML parser it relies on).  Maven should not reformat XML comments (and especially not in a URL where whitespace is significant).



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)