Using the Eclipse MXUnit Plugin with Apache Virtual Hosts Revisited
MXUnit , cfeclipse , Apache Add commentsIn a previous post on the topic of using the MXUnit eclipse plugin with virtual hosts, I described how I setup my eclipse project and Apache virtual host for testing. Although that setup worked, I would get periodic errors that necessitated disabling and re-enabling the MXUnit plugin. Until recently, I was still running eclipse 3.2, so when I got the opportunity to configure a new machine from the ground up, I decided to go with a fresh install of the latest Eclipse (3.4) and essential plugins, CFEclipse (1.3.1.6), Subclipse (1.4.5) and MXUnit (1.0.7).
One of the pleasant side benefits of moving to the latest MXUnit plugin release is that I now do not need to keep my projects in the same directory as MXUnit to get the eclipse plugin to play nice with vhosts. Instead, all I have to do is specify the component root in my project's MXUnit properties along with a matching Apache Alias so that the project name, component path and alias are alike. Here's how I would set things up for a project called "myproject".
UPDATE: With the release of the 1.1 version of the MXUnit eclipse plugin, matching the component path to the project name and apache alias is no longer required. The screen grab of the MXUnit properties below reflects this change.
Here's the vhost declaration.
<VirtualHost 127.0.0.1:80>
DocumentRoot "/Users/paul/Sites/myproject/webroot"
Alias /mxunit "/Library/WebServer/Documents/mxunit"
Alias /config "/Users/paul/Sites/myproject/config"
Alias /model "/Users/paul/Sites/myproject/model"
Alias /tests "/Users/paul/Sites/myproject/tests"
Alias /myproject "/Users/paul/Sites/myproject"
ServerName myproject.fancybread.local
DirectoryIndex index.cfm
<Directory "/Users/paul/Sites/myproject/webroot">
Options +Indexes FollowSymLinks +ExecCGI
AllowOverride AuthConfig FileInfo
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
Here is the MXUnit properties.
And finally, the eclipse project.
Using the alias ans component path to direct the MXUnit plugin to the tests is a big help, since I prefer to keep my projects in a different folder from the default web root.
Aug 24, 2010 at 3:05 AM <p><a href="http://www.uggbootsretails.com" target="_blank">UGG Argyle Knit</a> features genuine twin-face sheepskin for refreshing comfort. It's one of our tallest boots and looks great all the way up or cuffed down. <a href="http://www.uggbootsretails.com" target="_blank">UGG boots</a> in our Classic Collection feature a soft foam insole covered with genuine sheepskin and have a molded EVA light such as <a href="http://www.uggbootsretails.com" target="_blank">UGG Sundance</a> and <a href="http://www.uggbootsretails.com" target="_blank">UGG Bailey Button</a>, the flexible outsole designed for amazing comfort with every step. Beat the chill in superior style with the <a href="http://www.uggbootsretails.com" target="_blank">UGG Ultra Tall</a>. The <a href="http://www.uggbootsretails.com" target="_blank">Bailey Button 1873</a> of light and flexible outsole along with a suede heel guard provides durable wear all season long. Detailed with three oversized wood buttons, this style can be styled up and buttoned, slouched and slightly unbuttoned, or completely cuffed. <a href="http://www.uggbootsretails.com" target="_blank">UGG Ultra Short</a> is also a good choice for people to refuge from the cold.Just buy one of the ugg boots for your family and yourself, it’s really a good gift both for you famlily and you.Action is better than thinking in heart.</p>