You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Roman Cerny (JIRA)" <ji...@codehaus.org> on 2007/06/22 11:37:57 UTC

[jira] Created: (MRELEASE-255) during a release several elements are removed from the pom.xml (which should be left there)

during a release several elements are removed from the pom.xml (which should be left there)
-------------------------------------------------------------------------------------------

                 Key: MRELEASE-255
                 URL: http://jira.codehaus.org/browse/MRELEASE-255
             Project: Maven 2.x Release Plugin
          Issue Type: Bug
    Affects Versions: 2.0-beta-4
            Reporter: Roman Cerny


the following elements are removed from the pom.xml, during a release...

<?xml version="1.0" encoding="UTF-8"?>

<!-- SVN keywords
 $Author: $
 $Revision: $
 $Date: $
-->

<!DOCTYPE project [
  <!ENTITY auml    "&#228;" >
  <!ENTITY ouml    "&#246;" >
  <!ENTITY uuml    "&#252;" >
  <!ENTITY szlig   "&#223;" >
]>




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

        

[jira] Closed: (MRELEASE-255) during a release several elements are removed from the pom.xml (which should be left there)

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MRELEASE-255?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann closed MRELEASE-255.
--------------------------------------

         Assignee: Benjamin Bentmann
       Resolution: Fixed
    Fix Version/s: 2.0-beta-8

Fixed in [r659603|http://svn.apache.org/viewvc?view=rev&revision=659603].

bq. A very simple approach would be to use an xslt stylesheet for this: it can match on the elements to change and just copy everything else.
This seems like a major rewrite of the plugin. If you would go for it, we would be happy to review it ;-) 

> during a release several elements are removed from the pom.xml (which should be left there)
> -------------------------------------------------------------------------------------------
>
>                 Key: MRELEASE-255
>                 URL: http://jira.codehaus.org/browse/MRELEASE-255
>             Project: Maven 2.x Release Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0-beta-4
>            Reporter: Roman Cerny
>            Assignee: Benjamin Bentmann
>             Fix For: 2.0-beta-8
>
>
> the following elements are removed from the pom.xml, during a release...
> <?xml version="1.0" encoding="UTF-8"?>
> <!-- SVN keywords
>  $Author: $
>  $Revision: $
>  $Date: $
> -->
> <!DOCTYPE project [
>   <!ENTITY auml    "&#228;" >
>   <!ENTITY ouml    "&#246;" >
>   <!ENTITY uuml    "&#252;" >
>   <!ENTITY szlig   "&#223;" >
> ]>

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

        

[jira] Issue Comment Edited: (MRELEASE-255) during a release several elements are removed from the pom.xml (which should be left there)

Posted by "Roman Cerny (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MRELEASE-255?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_100327 ] 

Roman Cerny edited comment on MRELEASE-255 at 6/22/07 7:05 AM:
---------------------------------------------------------------

just tested with <version>2.0-beta-6</version>


the plugin still removes all three entries (xml, svn keywords and doctype)

the plugin also changed a <developer><name> containing an umlaut from "&amp;ouml;" to "ö"
(which leads to an error in the team list (of the generated project site))


error takes place during the "mvn release:prepare" goal


 was:
just tested with <version>2.0-beta-6</version>


the plugin still removes all three entries (xml, svn keywords and doctype)

the plugin also changed a <developer><name> containing an umlaut from "&amp;ouml;" to "ö"
(which leads to an error in the team list (of the generated project site))



> during a release several elements are removed from the pom.xml (which should be left there)
> -------------------------------------------------------------------------------------------
>
>                 Key: MRELEASE-255
>                 URL: http://jira.codehaus.org/browse/MRELEASE-255
>             Project: Maven 2.x Release Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0-beta-4
>            Reporter: Roman Cerny
>
> the following elements are removed from the pom.xml, during a release...
> <?xml version="1.0" encoding="UTF-8"?>
> <!-- SVN keywords
>  $Author: $
>  $Revision: $
>  $Date: $
> -->
> <!DOCTYPE project [
>   <!ENTITY auml    "&#228;" >
>   <!ENTITY ouml    "&#246;" >
>   <!ENTITY uuml    "&#252;" >
>   <!ENTITY szlig   "&#223;" >
> ]>

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

       

[jira] Issue Comment Edited: (MRELEASE-255) during a release several elements are removed from the pom.xml (which should be left there)

Posted by "Roman Cerny (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MRELEASE-255?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_100327 ] 

Roman Cerny edited comment on MRELEASE-255 at 6/22/07 7:02 AM:
---------------------------------------------------------------

just tested with <version>2.0-beta-6</version>


the plugin still removes all three entries (xml, svn keywords and doctype)

the plugin also changed a <developer><name> containing an umlaut from "&amp;ouml;" to "ö"
(which leads to an error in the team list (of the generated project site))




 was:
just tested with <version>2.0-beta-6</version>


the plugin still removes all three entries (xml, svn keywords and doctype)

the plugin also changed a <developer><name> containing an umlaut from "&ouml;" to "ö"
(which leads to an error in the team list (of the generated project site))



> during a release several elements are removed from the pom.xml (which should be left there)
> -------------------------------------------------------------------------------------------
>
>                 Key: MRELEASE-255
>                 URL: http://jira.codehaus.org/browse/MRELEASE-255
>             Project: Maven 2.x Release Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0-beta-4
>            Reporter: Roman Cerny
>
> the following elements are removed from the pom.xml, during a release...
> <?xml version="1.0" encoding="UTF-8"?>
> <!-- SVN keywords
>  $Author: $
>  $Revision: $
>  $Date: $
> -->
> <!DOCTYPE project [
>   <!ENTITY auml    "&#228;" >
>   <!ENTITY ouml    "&#246;" >
>   <!ENTITY uuml    "&#252;" >
>   <!ENTITY szlig   "&#223;" >
> ]>

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

       

[jira] Commented: (MRELEASE-255) during a release several elements are removed from the pom.xml (which should be left there)

Posted by "Marcello Teodori (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MRELEASE-255?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=155660#action_155660 ] 

Marcello Teodori commented on MRELEASE-255:
-------------------------------------------

I also see that empty properties get transformed from <property.name></property.name> to <property.name />, the version replace mechanism should definitely be more respectful of the original format of the XML.


> during a release several elements are removed from the pom.xml (which should be left there)
> -------------------------------------------------------------------------------------------
>
>                 Key: MRELEASE-255
>                 URL: http://jira.codehaus.org/browse/MRELEASE-255
>             Project: Maven 2.x Release Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0-beta-4
>            Reporter: Roman Cerny
>            Assignee: Benjamin Bentmann
>             Fix For: 2.0-beta-8
>
>
> the following elements are removed from the pom.xml, during a release...
> <?xml version="1.0" encoding="UTF-8"?>
> <!-- SVN keywords
>  $Author: $
>  $Revision: $
>  $Date: $
> -->
> <!DOCTYPE project [
>   <!ENTITY auml    "&#228;" >
>   <!ENTITY ouml    "&#246;" >
>   <!ENTITY uuml    "&#252;" >
>   <!ENTITY szlig   "&#223;" >
> ]>

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

        

[jira] Commented: (MRELEASE-255) during a release several elements are removed from the pom.xml (which should be left there)

Posted by "Roman Cerny (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MRELEASE-255?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_100327 ] 

Roman Cerny commented on MRELEASE-255:
--------------------------------------

just tested with <version>2.0-beta-6</version>


the plugin still removes all three entries (xml, svn keywords and doctype)

the plugin also changed a <developer><name> containing an umlaut from "&ouml;" to "ö"
(which leads to an error in the team list (of the generated project site))



> during a release several elements are removed from the pom.xml (which should be left there)
> -------------------------------------------------------------------------------------------
>
>                 Key: MRELEASE-255
>                 URL: http://jira.codehaus.org/browse/MRELEASE-255
>             Project: Maven 2.x Release Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0-beta-4
>            Reporter: Roman Cerny
>
> the following elements are removed from the pom.xml, during a release...
> <?xml version="1.0" encoding="UTF-8"?>
> <!-- SVN keywords
>  $Author: $
>  $Revision: $
>  $Date: $
> -->
> <!DOCTYPE project [
>   <!ENTITY auml    "&#228;" >
>   <!ENTITY ouml    "&#246;" >
>   <!ENTITY uuml    "&#252;" >
>   <!ENTITY szlig   "&#223;" >
> ]>

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

       

[jira] Issue Comment Edited: (MRELEASE-255) during a release several elements are removed from the pom.xml (which should be left there)

Posted by "Roman Cerny (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MRELEASE-255?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_100327 ] 

Roman Cerny edited comment on MRELEASE-255 at 6/22/07 7:05 AM:
---------------------------------------------------------------

just tested with <version>2.0-beta-6</version>


the plugin still removes all three entries (xml, svn keywords and doctype)

the plugin also changed a <developer><name> containing an umlaut from "&amp;ouml;" to "ö"
(which leads to an error in the team list (of the generated project site))


error takes place when executing the "mvn release:prepare" goal


 was:
just tested with <version>2.0-beta-6</version>


the plugin still removes all three entries (xml, svn keywords and doctype)

the plugin also changed a <developer><name> containing an umlaut from "&amp;ouml;" to "ö"
(which leads to an error in the team list (of the generated project site))


error takes place during the "mvn release:prepare" goal

> during a release several elements are removed from the pom.xml (which should be left there)
> -------------------------------------------------------------------------------------------
>
>                 Key: MRELEASE-255
>                 URL: http://jira.codehaus.org/browse/MRELEASE-255
>             Project: Maven 2.x Release Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0-beta-4
>            Reporter: Roman Cerny
>
> the following elements are removed from the pom.xml, during a release...
> <?xml version="1.0" encoding="UTF-8"?>
> <!-- SVN keywords
>  $Author: $
>  $Revision: $
>  $Date: $
> -->
> <!DOCTYPE project [
>   <!ENTITY auml    "&#228;" >
>   <!ENTITY ouml    "&#246;" >
>   <!ENTITY uuml    "&#252;" >
>   <!ENTITY szlig   "&#223;" >
> ]>

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

       

[jira] Commented: (MRELEASE-255) during a release several elements are removed from the pom.xml (which should be left there)

Posted by "Carsten Ziegeler (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MRELEASE-255?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_105611 ] 

Carsten Ziegeler commented on MRELEASE-255:
-------------------------------------------

I can confirm that this is still a bug - under specific circumstances the plugin removes everything before the first xml element (the intro and outro parts).

After some testing, I found some problems: the main problem is that the pom is parsed into a dom and then compared with a string version to detect the intro and outro parts. If the underlying dom implementation or the serialization from the dom to a string is altering only one single character the comparison will fail, and intro and outro is removed!

One problem I noticed are the namespace and schema definitions:

If I have the following in my pom:
<project xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

everything before <project> is removed, if I use

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

(everything in one line and specific order) it works!

Imho, the current approach should be replaced with an approach which just replaces the changing elements in the pom, like a sax based approach which detects the locations and just changes them on the fly. A very simple approach would be to use an xslt stylesheet for this: it can match on the elements to change and just copy everything else. If you need help in such a solution, let me know.


> during a release several elements are removed from the pom.xml (which should be left there)
> -------------------------------------------------------------------------------------------
>
>                 Key: MRELEASE-255
>                 URL: http://jira.codehaus.org/browse/MRELEASE-255
>             Project: Maven 2.x Release Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0-beta-4
>            Reporter: Roman Cerny
>
> the following elements are removed from the pom.xml, during a release...
> <?xml version="1.0" encoding="UTF-8"?>
> <!-- SVN keywords
>  $Author: $
>  $Revision: $
>  $Date: $
> -->
> <!DOCTYPE project [
>   <!ENTITY auml    "&#228;" >
>   <!ENTITY ouml    "&#246;" >
>   <!ENTITY uuml    "&#252;" >
>   <!ENTITY szlig   "&#223;" >
> ]>

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

        

[jira] Commented: (MRELEASE-255) during a release several elements are removed from the pom.xml (which should be left there)

Posted by "Emmanuel Venisse (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MRELEASE-255?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_100319 ] 

Emmanuel Venisse commented on MRELEASE-255:
-------------------------------------------

Can you test with beta-5 or beta-6? I'm sure it's fixed since beta-5

> during a release several elements are removed from the pom.xml (which should be left there)
> -------------------------------------------------------------------------------------------
>
>                 Key: MRELEASE-255
>                 URL: http://jira.codehaus.org/browse/MRELEASE-255
>             Project: Maven 2.x Release Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0-beta-4
>            Reporter: Roman Cerny
>
> the following elements are removed from the pom.xml, during a release...
> <?xml version="1.0" encoding="UTF-8"?>
> <!-- SVN keywords
>  $Author: $
>  $Revision: $
>  $Date: $
> -->
> <!DOCTYPE project [
>   <!ENTITY auml    "&#228;" >
>   <!ENTITY ouml    "&#246;" >
>   <!ENTITY uuml    "&#252;" >
>   <!ENTITY szlig   "&#223;" >
> ]>

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