Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Developers

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-26-2007, 04:02 AM
Junior Member
 
Posts: 8
Default Setting up Eclipse for Subversion development

I recently installed the necessary software to build the Zimbra subversion code using Eclipse under Windows. I outlined the steps I took, and some of the issues I faced, here:

http://articles.bluishcoder.co.nz/ar...-with-eclipse/

A couple of days ago I also wrote something on getting the binary install working in Ubuntu 6.10:

http://www.bluishcoder.co.nz/2007/01...buntu-610.html

With the subversion build I do get some issues but they don't seem to be showstoppers. I couldn't get the web client to work on the trunk build due to javascript errors in the browser. The EDISON branch worked fine.

The 'reset-the-world' ant task failed looking for a samplecontacts.xml - exactly the error in this forum posting:

developer install and LDAP inject : samplecontacts.xml missing

But it didn't seem to stop things from working so I just carried on. Hope the information proves useful to someone and any feedback is welcome.
Reply With Quote
  #2 (permalink)  
Old 01-26-2007, 07:10 AM
New Member
 
Posts: 4
Unhappy

I face the same issues.
When running the "reset-the-world" target, it appears that some files/folder are missing:
  • data/soap/samplecontacts.xml
  • data/soap/samplesearchfolders.xml
  • data/wiki/user1
(I use this workaround: I set "failonerror" to "false" in ZimbraServer/build.xml line 493, 497 and 510)
--> Can someone from Zimbra commit these files?


I don't understand why there are Javascript errors in ZimbraWebClient. The Subversion repository seems out of date.

For instance, there are unbalanced braces in the following Javascript file: ZimbraWebClient/WebRoot/js/zimbraMail/ZmZimbraMail.js
The "else" statement on line 412 has no corresponding "if"!
This blocking issue exists since revision 393, Sat Nov 25 01:05:38 2006!!

Here is the diff between the ZmZimbraMail.js found in the 4.5 binary release and the one from subversion (revision 609):
Code:
46a47
> 	ZmZimbraMail.APP_CLASS[ZmZimbraMail.TASKS_APP]			= ZmTasksApp;
67a69,73
> 	// Register our keymap and global key action handler with the shell's keyboard manager
> 	var kbMgr = appCtxt.getKeyboardMgr();
> 	kbMgr.registerKeyMap(new ZmKeyMap());
> 	kbMgr.registerApplicationKeyActionHandler(this);
> 
80c86,88
< 	this._pollActionId = null;
---
>     this._pollActionId = null; // AjaxTimedAction ID of timer counting down to next poll time
>     this._pollRequest = null; // HTTP request of poll we've sent to server
>     this._pollInstantNotifications = false; // if TRUE, we're in "instant notification" mode
82c90
< 	this._needOverviewLayout = false;
---
>     this._needOverviewLayout = false;
98,99d105
< ZmZimbraMail.MAIL_APP			= "mail";
< ZmZimbraMail.CONTACTS_APP		= "contacts";
100a107
> ZmZimbraMail.CONTACTS_APP		= "contacts";
101a109,110
> ZmZimbraMail.MAIL_APP			= "mail";
> ZmZimbraMail.MIXED_APP			= "mixed";
104c113
< ZmZimbraMail.MIXED_APP			= "mixed";
---
> ZmZimbraMail.TASKS_APP			= "tasks";
118a128
> ZmZimbraMail.MSG_KEY[ZmZimbraMail.TASKS_APP]			= "tasks";
128a139
> ZmZimbraMail.APP_ICON[ZmZimbraMail.TASKS_APP]			= "Task";
143c154
< 					 ZmZimbraMail.IM_APP, ZmZimbraMail.NOTEBOOK_APP];
---
> 					 ZmZimbraMail.TASKS_APP, ZmZimbraMail.IM_APP, ZmZimbraMail.NOTEBOOK_APP];
149a161
> ZmZimbraMail.APP_BUTTON[ZmZimbraMail.TASKS_APP]			= ZmAppChooser.B_TASKS;
157a170
> ZmZimbraMail.APP_SETTING[ZmZimbraMail.TASKS_APP]		= ZmSetting.TASKS_ENABLED;
165,166c178,179
< //ZmZimbraMail.DEFAULT_SEARCH[ZmZimbraMail.CALENDAR_APP]	= ZmItem.APPT;
< ZmZimbraMail.DEFAULT_SEARCH[ZmZimbraMail.CALENDAR_APP]	= ZmSearchToolBar.FOR_MAIL_MI;
---
> ZmZimbraMail.DEFAULT_SEARCH[ZmZimbraMail.CALENDAR_APP]	= ZmSearchToolBar.FOR_MAIL_MI; //= ZmItem.APPT;
> ZmZimbraMail.DEFAULT_SEARCH[ZmZimbraMail.TASKS_APP]		= ZmSearchToolBar.FOR_MAIL_MI; //= ZmItem.TASK;
175a189
> ZmZimbraMail.OVERVIEW_TREES[ZmZimbraMail.TASKS_APP]			= [ZmOrganizer.TASKS, ZmOrganizer.ZIMLET];
205a220
> //ZmZimbraMail.ACTION_CODE_TO_APP[ZmKeyMap.GOTO_TASKS]	= ZmZimbraMail.TASKS_APP;
212c227,228
< 							  ZmOrganizer.ADDRBOOK, ZmOrganizer.CALENDAR, ZmOrganizer.NOTEBOOK];
---
> 							  ZmOrganizer.ADDRBOOK, ZmOrganizer.CALENDAR,
> 							  ZmOrganizer.TASKS, ZmOrganizer.NOTEBOOK];
309c325,326
< 		this._components[ZmAppViewMgr.C_USER_INFO] = this._createUserInfo();
---
> 		this._components[ZmAppViewMgr.C_USER_INFO] = this._userNameField = this._createUserInfo();
> 		this._components[ZmAppViewMgr.C_QUOTA_INFO] = this._usedQuotaField = this._createUserInfo();
379,384d395
< 	var kbMgr = this._appCtxt.getKeyboardMgr();
< 	if (this._appCtxt.get(ZmSetting.USE_KEYBOARD_SHORTCUTS)) {
< 		// Register our keymap and global key action handler with the shell's keyboard manager
< 		kbMgr.enable(true);
< 		kbMgr.registerKeyMap(new ZmKeyMap(this._appCtxt));
< 		kbMgr.pushDefaultHandler(this);
452a464,468
> 	var kbMgr = this._shell.getKeyboardMgr();
> 	kbMgr.setTabGroup(this._appCtxt.getRootTabGroup());
> 	var startupFocusItem = this._appViewMgr.getCurrentView().getController().getCurrentView();	// returns a list view
> 	kbMgr.grabFocus(startupFocusItem);
> 	
512,513c528
< * Sends a delayed NoOpRequest to see if we get any notifications (eg new mail). Ignores
< * exceptions unless they're auth-related.
---
> * Send a NoOpRequest to the server.  Used for '$set:noop'
515,525c530,585
< ZmZimbraMail.prototype._doPoll =
< function(now) {
< 	this._pollActionId = null; // so we don't try to cancel
< 	
< 	// It'd be more efficient to make these instance variables, but for some
< 	// reason that breaks polling in IE.
< 	var soapDoc = AjxSoapDoc.create("NoOpRequest", "urn:zimbraMail");
< 	var errorCallback = new AjxCallback(this, this._handleErrorDoPoll);
< 	var pollParams = {soapDoc: soapDoc, asyncMode: true, errorCallback: errorCallback, noBusyOverlay: true};
< 	var pollAction = new AjxTimedAction(this, this.sendRequest, [pollParams]);
< 	return AjxTimedAction.scheduleAction(pollAction, (now ? 0 : this._pollInterval));
---
> ZmZimbraMail.prototype.sendNoOp =
> function() {
>     var soapDoc = AjxSoapDoc.create("NoOpRequest", "urn:zimbraMail");
>     this.sendRequest({soapDoc: soapDoc, asyncMode: true, noBusyOverlay: true});
> }
> 
> /*
> * Put the client into "instant notifications" mode.
> */
> ZmZimbraMail.prototype.setInstantNotify =
> function(on) {
>     if (on) {
>         this._pollInstantNotifications = true;
>         // set a nonzero poll interval so that we cannot ever
>         // get into a full-speed request loop
>         this._pollInterval = 100;
>         if (this._pollActionId) {
>             AjxTimedAction.cancelAction(this._pollActionId);
>             this._pollActionId = null;
>         }
>         this._kickPolling(true);
>     } else {
>         this.setPollInterval();
>     }
> }
> 
> /**
> * Resets the interval between poll requests, based on what's in the settings,
> * only if we are not in instant notify mode.
> *
> */
> ZmZimbraMail.prototype.setPollInterval =
> function() {
>     if (!this._pollInstantNotifications) {
>         this._pollInterval = this._appCtxt.get(ZmSetting.POLLING_INTERVAL) * 1000;
>         DBG.println(AjxDebug.DBG1, "poll interval = " + this._pollInterval + "ms");
> 
>         if (this._pollInterval) {
>             this._kickPolling(true);
>         } else {
>             // cancel pending request if there is one
>             if (this._pollRequest) {
>                 this._requestMgr.cancelRequest(this._pollRequest);
>                 this._pollRequest = null;
>             }
>             // cancel timer if it is waiting...
>             if (this._pollActionId) {
>                 AjxTimedAction.cancelAction(this._pollActionId);
>                 this._pollActionId = null;
>             }
>         }
>         return true;
>     } else {
>         DBG.println(AjxDebug.DBG1, "Ignoring Poll Interval (in instant-notify mode)");
>         return false;
>     }
527a588,670
> /*
> * Make sure the polling loop is running.  Basic flow:
> *
> *       1) kickPolling():
> *             - cancel any existing timers
> *             - set a timer for _pollInterval time
> *             - call execPoll() when the timer goes off
> *
> *       2) execPoll():
> *             - make the NoOp request, if we're in "instant notifications"
> *               mode, this request will hang on the server until there is more data,
> *               otherwise it will return immediately.  Call into a handle() func below
> *
> *       3) handleDoPollXXXX():
> *             - call back to kickPolling() above
> *
> * resetBackoff = TRUE e.g. if we've just received a successful
> * response from the server, or if the user just changed our
> * polling settings and we want to start in fast mode
> */
> ZmZimbraMail.prototype._kickPolling =
> function(resetBackoff) {
>     DBG.println(AjxDebug.DBG2, "ZmZimbraMail._kickPolling(1) "+
>                                this._pollInterval + ", "+ this._pollActionId+", "+
>                                (this._pollRequest ? "request_pending" : "no_request_pending"));
> 
>     // reset the polling timeout
>     if (this._pollActionId) {
>         AjxTimedAction.cancelAction(this._pollActionId);
>         this._pollActionId = null;
>     }
> 
>     if (resetBackoff && this._pollInstantNotifications) {
>         if (this._pollInterval > 100) {
>             // we *were* backed off -- reset the delay back to 1s fastness
>             this._pollInterval = 100;
>             // need to kick the timer if it is waiting -- it might be waiting a long time
>             // and we want the change to take place immediately
>             if (this._pollActionId) {
>                 AjxTimedAction.cancelAction(this._pollActionId);
>                 this._pollActionId = null;
>             }
>         }
>     }
> 
>     if (this._pollInterval && !this._pollActionId && !this._pollRequest) {
>         try {
>             var pollAction = new AjxTimedAction(this, this._execPoll);
>             this._pollActionId = AjxTimedAction.scheduleAction(pollAction, this._pollInterval);
>         } catch (ex) {
>             this._pollActionId = null;
>             DBG.println(AjxDebug.DBG1, "Caught exception in ZmXimbraMail._kickPolling.  Polling chain broken!");
>         }
>     }
> };
> 
> /*
> * We've finished waiting, do the actual poll itself
> */
> ZmZimbraMail.prototype._execPoll =
> function() {
>     this._pollActionId = null;
> 
>     // It'd be more efficient to make these instance variables, but for some
>     // reason that breaks polling in IE.
>     var soapDoc = AjxSoapDoc.create("NoOpRequest", "urn:zimbraMail");
>     try {
>         if (this._pollInstantNotifications) {
>             var method = soapDoc.getMethod();
>             method.setAttribute("wait", 1);
>         }
>         var responseCallback = new AjxCallback(this, this._handleResponseDoPoll);
>         var errorCallback = new AjxCallback(this, this._handleErrorDoPoll);
> 
>         this._pollRequest = this.sendRequest({soapDoc: soapDoc, asyncMode: true, callback:responseCallback,
>             errorCallback: errorCallback, noBusyOverlay: true});
>     } catch (ex) {
>         // oops!
>         this._handleErrorDoPoll(ex);
>     }
> }
> 
> 
530c673,685
< 	return (ex.code != ZmCsfeException.SVC_AUTH_EXPIRED &&
---
>     this._pollRequest = null;
> 
>     if (this._pollInstantNotifications) {
>         // very simpleminded exponential backoff
>         this._pollInterval *= 2;
>         if (this._pollInterval > (1000 * 60 * 2)) {
>             this._pollInterval = 1000 * 60 * 2;
>         }
>     }
>     // restart poll timer if we didn't get an exception
>     this._kickPolling(false);
> 
>     return (ex.code != ZmCsfeException.SVC_AUTH_EXPIRED &&
534a690,697
> ZmZimbraMail.prototype._handleResponseDoPoll =
> function(ex) {
>     this._pollRequest = null;
>     // restart poll timer if we didn't get an exception
>    	this._kickPolling(true);
> };
> 
> 
711a875
> 			(id == ZmOrganizer.TASK_FOLDER && !this._appCtxt.get(ZmSetting.TASKS_ENABLED)) ||
738,739c902,905
< 		this._setUserInfoLink("ZmZimbraMail.helpLinkCallback();", "Help", ZmMsg.help, "skin_container_help");
< 		this._setUserInfoLink("ZmZimbraMail.conditionalLogOff();", "Logoff", ZmMsg.logOff, "skin_container_logoff");
---
> 		var hideIcon = skin.hints && skin.hints.help_button.hideIcon;
> 		this._setUserInfoLink("ZmZimbraMail.helpLinkCallback();", "Help", ZmMsg.help, "skin_container_help", hideIcon);
> 		hideIcon = skin.hints && skin.hints.logout_button.hideIcon;
> 		this._setUserInfoLink("ZmZimbraMail.conditionalLogOff();", "Logoff", ZmMsg.logOff, "skin_container_logoff", hideIcon);
745c911
< 		this._userNameField.innerHTML = username;
---
> 		this._userNameField.getHtmlElement().innerHTML = username;
747c913
< 			this._userNameField.style.lineHeight = "13px";
---
> 			this._userNameField.getHtmlElement().style.lineHeight = "13px";
760c926
< 	html[idx++] = "><td class='BannerText'>";
---
> 	html[idx++] = "><td class='BannerTextQuota'>";
784c950
< 		html[idx++] = "<td class='BannerText'>";
---
> 		html[idx++] = "<td class='BannerTextQuota'>";
789,790c955,957
< 	
< 	this._usedQuotaField.innerHTML = html.join("");
---
> 
> 	if (!(skin.hints && skin.hints.help_button.hideIcon))
> 		this._usedQuotaField.getHtmlElement().innerHTML = html.join("");
807a975
> 		this._components[ZmAppViewMgr.C_QUOTA_INFO].setToolTipContent(tooltip.join(""));
812c980
< function(staticFunc, icon, lbl, id) {
---
> function(staticFunc, icon, lbl, id, hideIcon) {
815,819c983,991
< 	html[i++] = "<table border=0 cellpadding=1 cellspacing=1 width=90% align=center><tr><td align=right><a href='javascript:;' onclick='";
< 	html[i++] = staticFunc;
< 	html[i++] = "'>";
< 	html[i++] = AjxImg.getImageHtml(icon, null, "border=0");
< 	html[i++] = "</a></td><td width=1% style='white-space:nowrap; font-weight:bold'><a href='javascript:;' onclick='";
---
> 	html[i++] = "<table border=0 cellpadding=1 cellspacing=1 align=right width=1%><tr>";
> 	if (!hideIcon) {
> 		html[i++] = "<td align=right><a href='javascript:;' onclick='";
> 		html[i++] = staticFunc;
> 		html[i++] = "'>";
> 		html[i++] = AjxImg.getImageHtml(icon, null, "border=0");
> 		html[i++] = "</a></td>";
> 	}
> 	html[i++] = "<td width=1% align=right style='white-space:nowrap; font-weight:bold'><a href='javascript:;' onclick='";
889,901d1060
< /**
< * Resets the interval between poll requests, based on what's in the settings.
< */
< ZmZimbraMail.prototype.setPollInterval =
< function() {
< 	this._pollInterval = this._appCtxt.get(ZmSetting.POLLING_INTERVAL) * 1000;
< 	DBG.println(AjxDebug.DBG1, "poll interval = " + this._pollInterval + "ms");
< 	if (this._pollActionId)
< 		AjxTimedAction.cancelAction(this._pollActionId);
< 	if (this._pollInterval)
< 		this._pollActionId = this._doPoll();
< };
< 
1106a1266
> 	var logoUrl = skin.hints && skin.hints.logo ? skin.hints.logo.url : this._appCtxt.get(ZmSetting.LOGO_URI);
1112c1272
< 	html[i++] = this._appCtxt.get(ZmSetting.LOGO_URI);
---
> 	html[i++] = logoUrl;
1122,1144c1282,1285
< 	var userInfo = new DwtComposite(this._shell, "BannerBar", Dwt.ABSOLUTE_STYLE);
< 	userInfo.setScrollStyle(Dwt.CLIP);
< 	userInfo._setMouseEventHdlrs();
< 
< 	var userNameId = Dwt.getNextId();
< 	var usedQuotaId = Dwt.getNextId();
< 
< 	var html = [];
< 	var i = 0;
< 	html[i++] = "<table border=0 cellpadding=0 cellspacing=0 width=100%>";
< 	html[i++] = "<tr><td><div class='BannerTextUser' id='";
< 	html[i++] = userNameId;
< 	html[i++] = "'></div></td></tr>";
< 	html[i++] = "<tr><td><div id='";
< 	html[i++] = usedQuotaId;
< 	html[i++] = "'></div></td></tr>";
< 	html[i++] = "</table>";
< 	userInfo.getHtmlElement().innerHTML = html.join("");
< 
< 	this._userNameField = document.getElementById(userNameId);
< 	this._usedQuotaField = document.getElementById(usedQuotaId);
< 	
< 	return userInfo;
---
> 	var ui = new DwtComposite(this._shell, "BannerBar BannerTextUser", Dwt.ABSOLUTE_STYLE);
> 	ui.setScrollStyle(Dwt.CLIP);
> 	ui._setMouseEventHdlrs();
> 	return ui;
1196d1336
< 		var searchController = this._appCtxt.getSearchController();
1198,1215c1338,1347
< 		DBG.println(AjxDebug.DBG1, "ZmZimbraMail button press: " + id);
< 		if (id == ZmAppChooser.B_EMAIL) {
< 			this.activateApp(ZmZimbraMail.MAIL_APP);
< 		} else if (id == ZmAppChooser.B_CONTACTS) {
< 			// force launch to display all contacts
< 			this.activateApp(ZmZimbraMail.CONTACTS_APP);
< 		} else if (id == ZmAppChooser.B_CALENDAR) {
< 			this.activateApp(ZmZimbraMail.CALENDAR_APP);
< 		} else if (id == ZmAppChooser.B_IM) {
< 			this.activateApp(ZmZimbraMail.IM_APP);			
< 		} else if (id == ZmAppChooser.B_NOTEBOOK) {
< 			this.activateApp(ZmZimbraMail.NOTEBOOK_APP);
< 		} else if (id == ZmAppChooser.B_HELP) {
< 			window.open(this._appCtxt.get(ZmSetting.HELP_URI));
< 		} else if (id == ZmAppChooser.B_OPTIONS) {
< 			this.activateApp(ZmZimbraMail.PREFERENCES_APP);
< 		} else if (id == ZmAppChooser.B_LOGOUT) {
< 			ZmZimbraMail.conditionalLogOff();
---
> 		switch (id) {
> 			case ZmAppChooser.B_EMAIL:		this.activateApp(ZmZimbraMail.MAIL_APP); break;
> 			case ZmAppChooser.B_CONTACTS:	this.activateApp(ZmZimbraMail.CONTACTS_APP); break;
> 			case ZmAppChooser.B_CALENDAR:	this.activateApp(ZmZimbraMail.CALENDAR_APP); break;
> 			case ZmAppChooser.B_TASKS:		this.activateApp(ZmZimbraMail.TASKS_APP); break;
> 			case ZmAppChooser.B_IM:			this.activateApp(ZmZimbraMail.IM_APP); break;
> 			case ZmAppChooser.B_NOTEBOOK:	this.activateApp(ZmZimbraMail.NOTEBOOK_APP); break;
> 			case ZmAppChooser.B_OPTIONS:	this.activateApp(ZmZimbraMail.PREFERENCES_APP); break;
> 			case ZmAppChooser.B_HELP:		window.open(this._appCtxt.get(ZmSetting.HELP_URI)); break;
> 			case ZmAppChooser.B_LOGOUT:		ZmZimbraMail.conditionalLogOff(); break;
They are completely different. And I could not find any other revision of this file similar to the one in the 4.5 release.
So, if the "trunk" is not the 4.5 version, what is it?
(The "Edison" branch is working, but I think it is the 4.0.5 stable version)
--> Where can we find working source of the 4.5 release?
Reply With Quote
  #3 (permalink)  
Old 01-26-2007, 02:55 PM
Zimbra Employee
 
Posts: 1,434
Default Frank branch

The 4.5 release is the Frank branch.
__________________
Bugzilla - Wiki - Downloads - Before posting... Search!
Reply With Quote
  #4 (permalink)  
Old 01-28-2007, 12:33 AM
Junior Member
 
Posts: 8
Default

Quote:
The 4.5 release is the Frank branch.
Is that in SVN? I didn't see a Frank branch when I looked a couple of days ago.
Reply With Quote
  #5 (permalink)  
Old 01-29-2007, 02:26 AM
New Member
 
Posts: 4
Default

Quote:
Originally Posted by dkarp View Post
The 4.5 release is the Frank branch.
Thank you for creating this branch in SVN so quickly after my previous post.

But Eclipse is now complaining about missing projects: ZimbraCommon and ZimbraIM.
Can you please commit them?
Reply With Quote
  #6 (permalink)  
Old 01-29-2007, 02:14 PM
Zimbra Employee
 
Posts: 1,434
Default Before I bother the build guy...

Are you sure that those projects aren't in SVN? You may have to explicitly import them into your eclipse workspace...
__________________
Bugzilla - Wiki - Downloads - Before posting... Search!
Reply With Quote
  #7 (permalink)  
Old 01-29-2007, 02:23 PM
Junior Member
 
Posts: 8
Default

Quote:
Originally Posted by dkarp View Post
Are you sure that those projects aren't in SVN? You may have to explicitly import them into your eclipse workspace...
I can confirm that ZimbraIM and ZimbraCommon are not in 'branches/FRANK'.
Reply With Quote
  #8 (permalink)  
Old 01-29-2007, 03:01 PM
Zimbra Employee
 
Posts: 1,434
Default Indeed they aren't.

Should be fixed by tomorrow morning, if not sooner.
__________________
Bugzilla - Wiki - Downloads - Before posting... Search!
Reply With Quote
  #9 (permalink)  
Old 01-29-2007, 07:43 PM
Junior Member
 
Posts: 8
Default

Quote:
Originally Posted by dkarp View Post
Should be fixed by tomorrow morning, if not sooner.
Thanks for that, they're there now. Unfortunately it looks like ZimbraTagLib is also needed to build the FRANK branch and it doesn't seem to be there. Can this be added also?

Chris.
--
http://www.bluishcoder.co.nz
Reply With Quote
  #10 (permalink)  
Old 01-29-2007, 08:04 PM
Junior Member
 
Posts: 8
Default

Quote:
Originally Posted by doublec View Post
Unfortunately it looks like ZimbraTagLib is also needed to build the FRANK branch and it doesn't seem to be there.
Using ZimbraTagLib from the trunk seems to work in the meantime.

Chris.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.