divinespear / jpa-schema-maven-plugin

Maven plugin for generate database schema or DDL scripts from JPA entities
http://divinespear.github.io/jpa-schema-maven-plugin
Apache License 2.0
21 stars 19 forks source link

Generate SQL with LF instead of CRLF #13

Closed keesvandieren closed 10 years ago

keesvandieren commented 10 years ago

We use the plugin to generate SQL files, which we persist in source control (Git).

Git has an option: core.autocrlf which converts CRLF to LF.

Every time the plugin runs, it will show local changes for SQL files.

Git also gives a warning on this: warning: LF will be replaced by CRLF in projectname/src/main/resources/sql/current/create-schema.sql. The file will have its original line endings in your working directory.

Desired feature: be able to configure how newlines are generated, either with CRLF or LF.

keesvandieren commented 10 years ago

Ideally the plugin should use "line.separator" system property as default.

divinespear commented 10 years ago

It looks from my over-cautious feature... it was unnecessary worry, cause most advanced editors has line end auto-detection.

Unfortunate, I'm pretty busy so I cannot fix now. I'll arrange that before next week.

keesvandieren commented 10 years ago

Yes, but by default, Git converts CRLF to LF.

Because of that, everytime we run 'mvn install', we see local changes.

divinespear commented 10 years ago

It's too late cause I had trouble with SSD broken, almose 2 days spent to reinstall OS and recover data. It will be fixed well and released as 0.1.10 today or tomorrow.