-
Notifications
You must be signed in to change notification settings - Fork 23
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
Allow having walkmod.xml outside of sources #48
Comments
Any suggestion to improve walkmod is always welcome! When you are creating a file with a relative path in java using 'new File("foo")', java resolves the absolute path with the value of the execution dir ("user.dir") and the value of the relative path. In order to conserve correct paths when walkmod is executed recursively (e.g for maven modules), walkmod modifies the value of the "user.dir". Yes, you can do it with WALKMOD_OPTS checking if the environment variable exists and there is a value for it. However, walkmod can be executed from a maven plugin or embedded in another system (e.g Eclipse IDE or forge) and people that participate into the project probably want to have the configuration file in another place (e.g a subdirectory). For that reason, I think that this feature would also be implemented with a new optional parameter into all the commands (e.g -f). Anyway, let's start from just modifying WALKMOD_OPTS 👍 Please, in order to do so, use the dev branch (at this moment is in the same commit than master). Thanks again for your contributions :) |
I am not sure I understand the use of "user.dir" because I am getting some weird behaviour, and maybe this it is expected. I created a project to demo it.
But debugging I see that the initialisation in the Facade works properly, but If I check the ScriptProcessor (here: https://github.com/rpau/walkmod-core/blob/master/src/main/java/org/walkmod/scripting/ScriptProcessor.java#L108) I see that it searches from the root path of the project, and I access to |
Btw, when the script is not found no error or message is shown. |
Not a big deal but I would like to keep one walkmod.xml for several projects and be able to specify path to it using WALKMOD_OPTS. I would submit a pull request but don't really understand all those getting/setting of user.dir, also
new File(System.getProperty("user.dir"))
found on several places - this I believe is equal tonew File("")
The text was updated successfully, but these errors were encountered: