This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 111110 - ant clean should delete config registry files
ant clean should delete config registry files
Status: CLOSED WONTFIX
Product: Red Hat Web Application Framework
Classification: Retired
Component: dev environment (Show other bugs)
nightly
All Linux
medium Severity medium
: ---
: ---
Assigned To: ccm-bugs-list
Jon Orris
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-11-27 10:22 EST by Daniel Berrange
Modified: 2007-04-18 12:59 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-08-03 14:39:12 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Daniel Berrange 2003-11-27 10:22:20 EST
Description of problem:
When doing an 'ant clean', only the webapp is removed. The config
propoerty files are left untouched in $CCM_WEB_HOME/conf. So the next
time you run 'ccm load' having just done a 'dropdb, createdb, ant
clean, ant deploy' sequence it complains that the packages are already
loaded. To sort this, you need to remove (at minimum)
registry.properties & preferrably all the per-package config property
files. Care must be taken, however, not to delete servlet stuff like
resin.conf

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Deploy & load a server
2. Run 'ant clean' and 'ant deploy'
3. Run ccm load
  
Actual results:
Complains about conflicting packages

Expected results:
Loads the system.

Additional info:
Comment 1 Rafael H. Schloming 2003-11-29 10:58:29 EST
This functionality doesn't sound like it belongs in ant clean to me.
The primary thing I use ant clean; ant deploy for (and I would submit
this is its primary purpose as well) is to rebuild the java code from
scratch after making changes that might impact APIs, changes that the
compiler won't catch from an incremental build. I often do this
without reloading the db. If this change were to be made then my usage
of ant clean deploy would end up breaking my installation by
unnecessarily blowing away my config directory.

I would submit that the ant targets (build, deploy, clean) are
currently only for compiling code and copying class files, and to
extend them into the realm of managing ccm instance data would be
making them do something that the ccm tool probably should do.

This division of responsibilities makes sense from the "deployment and
development" environments should be the same perspective since
building code and moving around class files is the one thing that is
guaranteed to be unique to the development environment, whereas
clearing the config data is probably something we want to be able to
do in a deployment environment as well.

What you probably want to be doing here is after you clear the db just
run ccm load --schema --data. That will tell the ccm tool to reload
the data model and data loading scripts.
Comment 2 Daniel Berrange 2003-12-01 11:25:42 EST
There are obviously occasions when we need to reload the db & clean
out all existing config packages to ensure consistency with changes to
the PDL / Java code. If this isn't appropriate for the ant clean
command, then it looks like we need a 'ccm un-hostinit' (with a better
name than that!) to do these tasks. Dropping the data model has become
much more tiresome now that the drop-all.sql is hidden away inside a
JAR file rather than just in the webapp & since we're not creating the
config registry by hand anymore it'll be non-obvious to developers
just where the files to delete are.
Comment 3 Vadim Nasardinov 2003-12-01 11:31:56 EST
Regardless of the path taken to resolve this ticket, it would seem
like a good idea to separate deletable files such as 
$CCM_WEB_HOME/conf/ccm-conf/, $CCM_WEB_HOME/conf/registry.properties
from files that should not be casually deleted.

Can we put all deletable files into a single subdirectory
of $CCM_WEB_HOME/conf?
Comment 4 Vadim Nasardinov 2005-08-03 14:39:12 EDT
stale

Note You need to log in before you can comment on or make changes to this bug.