Bug 998463 - javapackages-tools: whitespace breaks XML node matching for pom macros
javapackages-tools: whitespace breaks XML node matching for pom macros
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: javapackages-tools (Show other bugs)
18
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Mikolaj Izdebski
Mikolaj Izdebski
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-19 07:30 EDT by Stanislav Ochotnicky
Modified: 2013-10-02 12:22 EDT (History)
4 users (show)

See Also:
Fixed In Version: 3.3.1-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-02 12:22:39 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Stanislav Ochotnicky 2013-08-19 07:30:05 EDT
Description of problem:
When artifactId (or other node which is being matched) contains whitespace such as new line it will break XML node matching causing pom modification to fail.

Example snippet:
<build>
...
   <plugins>
...
      <plugin>
        <artifactId>maven-compiler-plugin
        </artifactId>  <!-- HERE -->
        <configuration>
          <source>1.4</source>
          <target>1.4</target>
        </configuration>
      </plugin
...
   </plugins>
...
</build>

This example was taken from plexus-sec-dispatcher which currently suffers from this problem.
Comment 1 Michael Simacek 2013-08-19 08:07:00 EDT
Fixed in upstream commit c3fbde5b.
Comment 2 Mikolaj Izdebski 2013-09-10 14:25:58 EDT
Fixed in javapackages-tools-3.0.2-3
Comment 3 Mikolaj Izdebski 2013-09-10 14:29:17 EDT
Verified in rawhide.

$ cat pom.xml 
<project>
<build>
   <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin
        </artifactId>  <!-- HERE -->
        <configuration>
          <source>1.4</source>
          <target>1.4</target>
        </configuration>
      </plugin>
   </plugins>
</build>
</project>

$ (pom_remove_plugin :maven-compiler-plugin)

$ cat pom.xml
<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/xsd/maven-4.0.0.xsd">
<build>
   <plugins>
      <!-- plugin disabled by maintainer: maven-compiler-plugin -->
   </plugins>
</build>
</project>
Comment 4 Mikolaj Izdebski 2013-10-02 12:22:39 EDT
I believe that this bug is fixed in javapackages-tools-3.3.1-1,
which is available in Fedora Rawhide, so I am closing this bug now.

The build containing the fix can be found at Koji:
http://koji.fedoraproject.org/koji/buildinfo?buildID=469008

This bug was fixed in the next release of Fedora, and is not planned
to be fixed in the release it was filed against.  If you want this bug
to be fixed in updates for Fedora 18, please say so in a comment.
Otherwise you can update to the newer release of Fedora to get the fix.

Note You need to log in before you can comment on or make changes to this bug.