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

Fix #578 Update reference directory for server #579

Merged
merged 2 commits into from
May 30, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions common/src/main/java/com/tc/config/Directories.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,15 @@ public class Directories {
/**
* Get installation root directory.
*
* @return Installation root directory or null if TC_INSTALL_ROOT_IGNORE_CHECKS_PROPERTY_NAME is set and
* @return Installation root directory or {@code user.dir} if TC_INSTALL_ROOT_IGNORE_CHECKS_PROPERTY_NAME is set and
* TC_INSTALL_ROOT_PROPERTY_NAME is not.
* @throws FileNotFoundException If {@link #TC_INSTALL_ROOT_PROPERTY_NAME} has not been set. If
* {@link #TC_INSTALL_ROOT_IGNORE_CHECKS_PROPERTY_NAME} has not been set, this exception may be thrown if the
* installation root directory has not been set, is not a directory
* @throws FileNotFoundException If {@link #TC_INSTALL_ROOT_IGNORE_CHECKS_PROPERTY_NAME} has not been set,
* this exception may be thrown if the installation root directory is not a directory
*/
public static File getInstallationRoot() throws FileNotFoundException {
static File getInstallationRoot() throws FileNotFoundException {
boolean ignoreCheck = Boolean.getBoolean(TC_INSTALL_ROOT_IGNORE_CHECKS_PROPERTY_NAME);
if (ignoreCheck) {
// XXX hack to have enterprise system tests to find license key under <ee-branch>/code/base
String baseDir = System.getProperty("tc.base-dir");
return new File(baseDir != null ? baseDir : ".", "../../../code/base");
return new File(System.getProperty("user.dir"));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we are using this property TC_INSTALL_ROOT_IGNORE_CHECKS_PROPERTY_NAME, its better to remove it altogether instead of patching it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is still configured in build-parent/pom.xml and I did not want to start a big clean up here, just a minor removal. Filed #582 for this bigger clean up.

} else {
String path = System.getProperty(TC_INSTALL_ROOT_PROPERTY_NAME);
if (StringUtils.isBlank(path)) {
Expand Down