You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Was this only an issue with NAR for you? Or did it affect other aspects of your Maven builds, too?
If the filtering is specified using Maven properties, then there is a bit of a catch-22, no? Would it suffice to simply filter all known-problematic characters such as newlines?
Originally (maybe back in 2.) it was a real problem with a hang that required accessing a build vm to kill tasks, now it is reporting the error and failing so at least build slaves don't become locked and the error information can be tracked back and addressed. In that regard this is a "nice to have" what do others think.
For NAR it is specifically the defines.
You can't do the following for instance in code
#define a split
string like this
You could make it one string with the multi line continuation\join
#define a split \
string like this
Or make it one string that includes a newline
#define a split \nstring like this
If you where to use maven-resources-plugin filtering to substitute some value into a file then you would end up with the similar issue.
I think that is not unreasonable as it lacks context.
The plugin offers one filter of the input properties 'escapeWindowsPaths'
I have a similar issue with NPanday and it's generation of AssemblyInfo.cs [INFO] | target\build-sources\META-INF\com\AssemblyInfo.cs(3,32): error CS1010: Newline in constant
NAR & NPanday have some knowledge about limitations of a define that could be applied, I think that this additional processing would be after Maven substitution of properties and setting the defines list and so would not be a catch-22 situation.
It would probably be sufficient to simply filter\strip known problem characters such as the newline or carriage return.
Plugin passes defines/options etc. through without filtering for special characters
For instance windows resource compiler can have issue with newline.
For newline resource compile resulting in
error RC2001: newline in constant
This came up several times for us as auto formatting of the pom.xml adding newlines.
Would be nice to have option to filter characters and give replacement values, like
replace return\newline with \r\n
strip return\newline
The text was updated successfully, but these errors were encountered: