-
Notifications
You must be signed in to change notification settings - Fork 21
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
353/feature/config resolve #399
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tested all three config placements and found one issue.
I can't seem to get the context.xml configuration working. When I add a path to get config from it does not update when i restart the tomcat. If i then redeploy the webapp, the contenxt.xml gets overwritten.
* <li>As {@code env:user.dir/resource}, {@code env:user.dir/../resource} etc</li> | ||
* <li>As {@code env:user.home/resource}</li> | ||
* </ul> | ||
* When running under Tomcat, {@code catalina.home} is guaranteed to be set and {@code catalina.home} might be set. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are referencing catalina.home twice here. One of them should be catalina.base
* <li>As {@code env:user.dir/resource}, {@code env:user.dir/../resource} etc</li> | ||
* <li>As {@code env:user.home/resource}</li> | ||
* </ul> | ||
* When running under Tomcat, {@code catalina.home} is guaranteed to be set and {@code catalina.home} might be set. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, home twice, no base
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Adds more flexible resolving of the config files. The use case is for the SolrWayback bundle, where the config files can now be placed directly in the bundle folder. It it also be possible to place the config files in the root of the project folder with the source code, when running under jetty.
If the location of the two property files are not specified in the WAR context, they are sought resolved from the container (e.g. tomcat or jetty) root. If not there, the parent folder is checked and so forth. If that does not yield results, the current folder as well as the user's home folder is checked in a similar manner.
Testing this properly is cumbersome as it requires at least
solrwayback.xml
) for SolrWayback using tomcat and checking that this is used instead of another config placed directly in the tomcat folder. See thewebapp/META-INF/context.xml
for how to specify the location explicitlyThis closes #353