Project

General

Profile

Bug #7214

Metacat overwrites the deployDir property

Added by Chris Jones almost 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
metacat
Target version:
-
Start date:
10/04/2017
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:

Description

On a fresh installation of Metacat, the application.deployDir property value gets overwritten. This is undesirable for Docker deployments where the Metacat Admin UI is not used for configuration, but rather the metacat.properties file is pre-configured for deployment. Fix this. It looks to be happening in the PropertiesAdmin.configureProperties() method:

PropertyService.setPropertyNoPersist("application.deployDir",
                        SystemUtil.discoverDeployDir(request));

Look at the consequences of not calling discoverDeployDir() and perhaps remove this. Needs review.


Related issues

Is duplicate of Metacat - Bug #7211: Metacat sets a wrong default value for the deploy path during the totally fresh installationClosed10/03/2017

History

#1 Updated by Jing Tao almost 2 years ago

  • Is duplicate of Bug #7211: Metacat sets a wrong default value for the deploy path during the totally fresh installation added

#2 Updated by Jing Tao almost 2 years ago

This one duplicate issue 7211.

#3 Updated by Jing Tao almost 2 years ago

  • Status changed from New to Closed

The issue turns out to be Tomcat 8 has change the format of current path.
In Tomcat 7, it was /opt/local/share/java/tomcat7/webapps/metacat/.
But in Tomcat 8, it is /opt/local/share/java/tomcat8/webapps/metacat
So the fancy pattern match doesn't work.

Since we just want to remove the context part, I used the old lastIndexOf and substring method in the String class. It worked well.

Also available in: Atom PDF