maven-archetype icon indicating copy to clipboard operation
maven-archetype copied to clipboard

[ARCHETYPE-584] fix indentation in root pom.xml

Open newur opened this issue 5 years ago • 10 comments

Problem: linebreaks + indentions (whitespaces) are read as actual document nodes. This causes problems in combination with

tr.setOutputProperty( OutputKeys.INDENT, "yes" );
tr.setOutputProperty( "{http://xml.apache.org/xslt}indent-amount", "2" );

Removed the .normalizeWhitespace() in tests, because this shadowed the actual bug. Also split one test into multiple tests. Test content remains the same.

Had to add the maven-4.0.0.xsd, not sure if this is desired.

newur avatar Jan 05 '20 06:01 newur

Any chance to get this PR merged?

softdays avatar Feb 25 '20 07:02 softdays

Any progress on this PR?

newur avatar May 11 '20 22:05 newur

Updated the branch

newur avatar May 12 '20 15:05 newur

@elharo is this ok now to merge, or do you think something additional is required?

hboutemy avatar Jun 05 '20 05:06 hboutemy

can't merge, there are 4 ITs failing: https://builds.apache.org/blue/organizations/jenkins/maven-box%2Fmaven-archetype/detail/ARCHETYPE-584/14/pipeline :(

hboutemy avatar Jun 08 '20 20:06 hboutemy

IT failures look real. I'm guessing that the golden data needs to be updated to match the output after this PR:

How does one update the golden data then ? This PR has gone stale but seems really only this last hurdle is missing.

jorgheymans avatar Jun 30 '21 09:06 jorgheymans

Wow, this branch/bug is still around. I totally forgot about it.

After playing around with the integration tests a bit, one problem was to load the .xsd from the packaged .jar (which works differently from reading from a single file). Solving the loading from the jar seems to fix the ITs.

Let's see what comes up next or if this long journey reaches its happy end. :)

newur avatar Jul 03 '21 07:07 newur

I committed a new attempt to get this merged. Since I do not understand which solution is acceptable, I made an unclean commit (code in comments, no proper exception handling). Would be nice to have some feedback, if this solution has any chance to get accepted before I clean it up.

newur avatar Aug 02 '21 23:08 newur

I think this is superseded by #128

kwin avatar Jan 30 '24 11:01 kwin

I think so too and would love to try it out @kwin. Unfortunately maven-archetype-plugin version 3.3.0 is not released, yet.

Any estimated time when the release will happen? Or any way to test this, besides building the plugin locally?

newur avatar Feb 04 '24 14:02 newur