سؤال

I have to edit a file at run time. the file in question is a java properties file. Basically, i am storing a value in this props file for later use. However, when i check-in this file in perforce, this becomes a read-only and at run time the file cannot be edited and an exception is thrown as access-denied. The reason is that this file cannot be edited as it has now become a read-only file after checking in. Please can anyone help me to solve this problem.

هل كانت مفيدة؟

المحلول

Your build should not have a runtime dependence on a file in your source tree.

You instead should copy the necessary file from your source tree into your build tree as part of the build process (where it then can freely change the permissions to be writable). Your build then should depend on that copy of the file.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top