Bug 977977 - javapackages-tools: POM editing macros should preserve formatting of injected XML
javapackages-tools: POM editing macros should preserve formatting of injected...
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: javapackages-tools (Show other bugs)
rawhide
Unspecified Unspecified
medium Severity unspecified
: ---
: ---
Assigned To: Mikolaj Izdebski
Fedora Extras Quality Assurance
: FutureFeature, Triaged, Upstream
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-25 13:31 EDT by Mikolaj Izdebski
Modified: 2013-09-12 01:41 EDT (History)
6 users (show)

See Also:
Fixed In Version: 3.0.3-1
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-12 01:41:25 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 Mikolaj Izdebski 2013-06-25 13:31:17 EDT
Description of problem:
Currenty POM macros that accept arbitrary XML to be injected (including %pom_xpath_inject, but also %pom_add_dep and %pom_add_plugin) remove unnecessary white spaces from XML code being injected.

To improve readability of patched POMs original indentation should be preserved. Alternatively injected XML could be reformated according to common practices.

Version-Release number of selected component (if applicable):
0.15.0-1
Comment 1 Mikolaj Izdebski 2013-08-09 07:37:31 EDT
Feature implemented upstream in commit b072410
Comment 2 Mikolaj Izdebski 2013-09-12 01:40:30 EDT
Verified in rawhide.

$ rpm -q javapackages-tools
javapackages-tools-3.0.3-1.fc21.noarch

$ cat pom.xml
<project>
	<dependencies>
	</dependencies>
</project>

$ (pom_add_dep foo:bar)

$ 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">
	<dependencies>
		<!-- begin of code added by maintainer -->
		<dependency>
			<groupId>foo</groupId>
			<artifactId>bar</artifactId>
			<version>any</version>
		</dependency>
		<!-- end of code added by maintainer -->
	</dependencies>
</project>
Comment 3 Mikolaj Izdebski 2013-09-12 01:40:40 EDT
Fixed in javapackages-tools-3.0.3-1
Comment 4 Mikolaj Izdebski 2013-09-12 01:41:25 EDT
I believe that this bug is fixed in javapackages-tools-3.0.3-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=463695

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