Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove timestamp from "plugin.properties" + use linux-style file separator #2193

Open
raducoravu opened this issue Jan 12, 2016 · 13 comments
Open
Labels
enhancement Changes to an existing feature priority/low Low priority issue

Comments

@raducoravu
Copy link
Member

Every time after I run the DITA OT integrator, my SVN client detects and marks as outgoing in the repository the "plugin.properties" and the "dost-configuration.jar".
All this because the "plugin.properties" contains a timestamp which constantly gets modified.
Maybe we could try to remove that timestamp from the properties file when the integrator is run.
Also when running on Windows the plugin.properties contains references to resources using the "" Windows style separator. So this would mean that if I share my DITA OT repository with somebody on Linux, they will have problems using the information in the plugin.properties.
The linux style path separator should be used on all platforms because the Windows Java VM supports both styles of path separators when creating File objects.

@jelovirt
Copy link
Member

Properties.store method adds the timestamp, I don't know how to disable that.

Using *NIX path separators would mean we would have to normalize all values on read.

👍 for both.

@jelovirt jelovirt added this to the 2.3 milestone Jan 12, 2016
@jelovirt jelovirt added priority/low Low priority issue enhancement Changes to an existing feature labels Jan 12, 2016
@raducoravu
Copy link
Member Author

About the properties, indeed we would need either to pass it an output stream implementation which skips that part or maybe better have our own properties implementation which also sorts keys before they are flushed to disk (or maybe better, save them to XML as ANT can also load properties from XML).

@jelovirt
Copy link
Member

You can read properties format with Ant, we don't need to use XML.

@raducoravu
Copy link
Member Author

I know, we can probably continue to use them, at least the code will remain backward compatible.
I'm not a big fan of properties files because they have a very limited encoding (ISO 8859-1) and all other characters are escaped, making them hard to be human readable, for example here's how a Japanese value looks in a properties files:

  Add_first_choice_particle=\u6700\u521D\u306E\u9078\u629E\u80A2\u306E\u8FFD\u52A0

@jelovirt
Copy link
Member

I would prefer to not use Java properties, but since that's what Ant supports. We could add support for some configuration file format, but then we'd need to add custom Ant tasks to read them into Ant properties. In Java code it would not be that bad. We could use e.g. https://github.com/typesafehub/config that's a superset of JSON, thus pretty familiar format; or then just stick to JSON or XML. I would prefer not use TOML/YAML/INI.

@raducoravu
Copy link
Member Author

Sure, no problem if we continue using the properties format.

@jelovirt
Copy link
Member

I think my current preference would be https://github.com/typesafehub/config#using-hocon-the-json-superset and keep it as close to either JSON or Properties format as possible. And, use *NIX directory separators.

@stefan-jung
Copy link
Contributor

but then we'd need to add custom Ant tasks to read them into Ant properties

@jelovirt : Will you provide an ANT-based getter and setter solution? I think that it is important, that someone without real programming skills (Java, etc.) can read/write from/to a properties file.

@jelovirt
Copy link
Member

@xephon2 Yes, we'd add a task to read those configuration files in and have them be available for Ant code to use. Since this is the main configuration file, we would not add a writer task, because those files don't need to be written at run-time.

@stefan-jung
Copy link
Contributor

👍

@jelovirt jelovirt modified the milestones: 3.0, 2.3 Feb 26, 2016
@jelovirt jelovirt modified the milestones: 2.4, 3.0 Nov 5, 2016
@jelovirt jelovirt removed this from the 3.0 milestone Oct 5, 2017
@stale
Copy link

stale bot commented Oct 5, 2019

This issue has been automatically marked as stale because it has not been updated recently. It will be closed soon if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale No recent activity. May be closed soon. label Oct 5, 2019
@stale stale bot closed this as completed Oct 19, 2019
@easirois
Copy link
Contributor

Hi, We have run into this issue ourselves for our hosted environment and one of our clients has hit it as well while using the dita command to run the integrator on Windows and failing to run properly on the Linux side of the house. The issue is the plugin.properties having Windows-style separator. I can open up a new ticket instead of reopening this one if folks prefer.

@raducoravu @jelovirt @robander

@raducoravu
Copy link
Member Author

I'm reopening the issue, I think it's easier in order to preserve all comments.

@raducoravu raducoravu reopened this May 15, 2020
@stale stale bot removed the stale No recent activity. May be closed soon. label May 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Changes to an existing feature priority/low Low priority issue
Projects
None yet
Development

No branches or pull requests

4 participants