Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Set line endings for code generated by xtend-maven-plugin
Set line endings for code generated by xtend-maven-plugin [message #1796567] Tue, 16 October 2018 05:10 Go to next message
Eclipse UserFriend
I am using the xtend-maven-plugin to generate code.

On my Windows machine, the generated files all have CRLF line endings.
I would like to generate them with LF line endings.

Is it possible to enforce this?
Re: Set line endings for code generated by xtend-maven-plugin [message #1796569 is a reply to message #1796567] Tue, 16 October 2018 05:21 Go to previous messageGo to next message
Eclipse UserFriend
dos it work to set line.separator system property?

(mvn -Dline.separator=...?
Re: Set line endings for code generated by xtend-maven-plugin [message #1796575 is a reply to message #1796569] Tue, 16 October 2018 06:03 Go to previous messageGo to next message
Eclipse UserFriend
I haven't been able to set the line separator via the command line. When using Powershell I always get an error that the lifecycle "separator" is unknown. It probably is some kind of escaping issue, but copying & pasting from stackoverflow didn't work.

mvn -Dline.separator=$'\n' clean compile
Re: Set line endings for code generated by xtend-maven-plugin [message #1796578 is a reply to message #1796575] Tue, 16 October 2018 06:24 Go to previous messageGo to next message
Eclipse UserFriend
Sry i am no longer that Firm with windows.
Maybe it works with MAVEN_OPTS env var
Re: Set line endings for code generated by xtend-maven-plugin [message #1796651 is a reply to message #1796567] Tue, 16 October 2018 17:21 Go to previous messageGo to next message
Eclipse UserFriend
I think it should be a config property of the plugin, and it does not have one. Please open an issue to https://github.com/eclipse/xtext-xtend/issues.
Re: Set line endings for code generated by xtend-maven-plugin [message #1796662 is a reply to message #1796651] Wed, 17 October 2018 01:02 Go to previous messageGo to next message
Eclipse UserFriend
I have doubts that such a ticket will be fixed soon

[Updated on: Wed, 17 October 2018 01:19] by Moderator

Re: Set line endings for code generated by xtend-maven-plugin [message #1796664 is a reply to message #1796662] Wed, 17 October 2018 02:40 Go to previous messageGo to next message
Eclipse UserFriend
I could imagine working on such (not near time though), but this also is a candidate for contribution.
Re: Set line endings for code generated by xtend-maven-plugin [message #1796701 is a reply to message #1796664] Wed, 17 October 2018 14:14 Go to previous message
Eclipse UserFriend
Hi

There are quite a few tools with outstanding line ending bugs ...

I use http://git.eclipse.org/c/ocl/org.eclipse.ocl.git/tree/examples/org.eclipse.ocl.examples.build/src/org/eclipse/ocl/examples/build/utilities/ConvertToUnixLineEndings.java in my MWE2 workflows.

component = ConvertToUnixLineEndings {
directory = "org.eclipse.ocl.examples.codegen/emf-gen"
}


Regards

Ed Willink

Previous Topic:Update site down
Next Topic:Could not serialize Mission via backtracking
Goto Forum:
  


Current Time: Tue Jun 24 07:17:27 EDT 2025

Powered by FUDForum. Page generated in 0.09004 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top