Anthill OS FAQ

Q: How do you specify an Ant target to run for your build or publish script?
A: You would specify a target by making the value of "anthill.build.ant.params" or anthill.publish.ant.params the target name.

So to specify a build target called MyTarget, the value of "anthill.build.ant.params" would be:
MyTarget

Q: How do you pass properties to Ant?
A: Anthill passes the contents of the "anthill.build.ant.params" on the command line to Ant when invoking it. Since Ant accepts properties from the command line in the form of -Dproperty=value, any property that you want to pass to Ant, you can specify as the value of "anthill.build.ant.params".

So, to pass a property called, MyProperty=MyValue, the value of "anthill.build.ant.params" would be:
-DMyProperty=MyValue

Q: What source repositories are supported by Anthill?
A: Anthill can be used with CVS, PVCS, Perforce, VSS, MKS Integrity, and Starbase StarTeam. We have built an adapter specific to each source repository.
We also have a File System Repository that allows you to use Anthill without a specified source repository.

Additional source repositories are available in the commercial versions of the product. If your favorite tool isn't supported, contact us.

Q: Can Anthill rebuild previous versions of a project?
A: No. Currently Anthill builds the most recent version of all projects. Future versions of Anthill will support rebuilding previous versions.

Q: What version of Apache Ant does Anthill support?
A: Anthill supports all versions of Apache Ant. Configuring Anthill for your version of Ant is easy. Simple set the anthill.ant.home property in the main properties to location of your Ant home

For example, if you're using Ant 1.6 you might set the property to /usr/share/apache/ant1.6.2/

Q: How do you view or change the classpath for the Ant script execution?
A: Anthill includes all Jar files and Zip files that your Ant scripts need in the classpath that it uses to invoke Ant. Anthill gets the location of this directory from the anthill.ant.home property on the main Anthill properties page.

To add your own jar files to the classpath when executing Ant, copy those jar files into the location pointed to by the "anthill.ant.home" property. Changes are not made dynamically, so you will need to restart the servlet engine that runs Anthill after copying in the files.

We plan to allow users to build a classpath for their ant scripts through the web interface in the future.

Q: How do I tweak the source repository commands.
A:Source Repository commands are generated with Pagelets. Pagelets generate the commands that get executed by Anthill.

To alter the source repository commands, you must modify the Pagelets. Pagelets are similar in syntax to JSPs. They are basically JSP's not tied to an HTTP.

The Pagelets templates are in the conf/profile directory of the Anthill installation under directories for source repository and operating systems. They are saved as .pgl files, and may be edited in any text editor. The Pagelets for CVS and Anthill running under Windows would be in the conf/profile/win32/cvs/ directory.

Open the Pagelet file for your profile to tweak the commands.

For example, If you wanted to add the -P flag to prune empty directories to the CVS checkout command, you would open the CVS profile for your OS, and insert that flag into the command string.

Q: How does Anthill know when to build a project?
A: Each project in Anthill is set up with a schedule. When a scheduled time for a build will come up, Anthill will run a check if any of the source have been modified since last build. If changes have been made, then a build will be automatically done. To set up continuous integration, simply set a very short schedule and Anthill will poll the repository for changes and build when it detects some.

You may also force a build from the Build Project screen to build a project at an unscheduled time.

To access this screen, click on the "Build" link beside the project you wish to build on Anthill's main menu. On the build screen, select the Force Build checkbox and click "Submit Query."

Q: Do I need to use a publish script?
A: The publish script is optional.
To omit the publish process, merely leave the publish property field on the project property screen blank. The main build script can also handle the publishing tasks.

Future versions of Anthill will allow for greater control of ANT build scripts. In Anthill Pro, you can be configure your project to have a build script, a JUnit script, a publish script, and any other scripts you'd like. Or, you can still configure a project to use only a single build script.

All future versions will support at least the current feature set, so feel free to do whatever feels natural.

Q: What general format does the Anthill version file use?
A: The general format of the version file is:

<prefix><buildNo><postfix>

where

<prefix>can be any String like "MyProduct" or "1.0."
<buildNo>has to be a number like 1 or 50 or 1150
<postfix>can be any non numeric String like " alpha" or " beta"

So if you have a version such as 1.2.3.4, then 1.2.3. is the <prefix>, 4 is the <buildNo> and the <postfix> is an empty string. The UrbanCodeVersionAdapter looks for the build number starting at the end of the string and working its way forward. The build number is the first numeric portion that it encounters. So you could have a version such as 1.2.3.1150 alpha and then the build number would be 1150.

Q: What format does the Anthill version file use when building on a branch?
A: If you are on a branch, then the <prefix> must contain the name of your branch as specified in the RepositoryAdapter properties page. This is mostly because we could not figure out how to assign version numbers to multiple branches while making sure that each version number was unique across all branches Including the branch name in the version number solves this problem. We're definitely open to other ideas here.

So, if you are using CVS, and you have a BRANCH called "My_Release_1", you would configure the RepositoryAdapter to check out that branch. In the RA properties page there is a field that allows you to specify the branch that Anthill will build. Then, the version file in that branch will need to contain a string like the one below: My_Release_1 1.0.1150 or My_Release_1 1150

Anthill will then increment the last numeric portion that it finds -- 1150 in each case.

We usually have multiple branches of a project in Anthill at the same time. We have a separate version file for each branch. The TRUNK may have a version file called MyProject.version and the My_Release_1 branch may have a version file called MyProject.My_Release_1.version. Each version file would have different version string inside.

Q: How do you use Anthill to access CVS over SSH.?
A: Make sure you have an environment property called CVS_RSH set that points to your SSH executable (if you use putty on windows, then CVS_RSH=c:\programs\putty\plink.exe).

If you've exchanged keys with the server and can use the :ext method to connect (you can test that by connecting from another CVS client such as WinCVS), then Anthill can use this method as well and everything will work fine. In the CVS RepositoryAdapter properties rather than entering the cvs root as :pserver:you@server:/cvs, you would enter :ext:you@server:/cvs.

Q: Why should I create a Version file for my projects?
A: We recommend that you keep the version number within a file in the repository. Although it is not required, it is a safer practice.

Using a version file also allows you to configure multiple Anthill projects to point to the same source. For example, you might want to have one Anthill project build target_A every hour, and another Anthill project (pointing to the same source) build target_B every night. The version file would then make it easier to maintain consistent versions for all projects.

Q: I still don't want version file. How do I tell Anthill to manage the version internally?
A: Use the com.urbancode.anthill.adapter.ProjectPropertyFileVersionAdapter and be sure to configure a version in it. Q: Does Anthill require any modifications to Ant build files?
A: Anthill does not require you to change your build file at all. Anthill does pass two parameters to your build file; whether your build file does anything with those parameters or not does not matter to Anthill. The two parameters are "version" and "deployDir". The value of the "version" parameter is a string representation of the current version. The "deployDir" parameter is the fully qualified path to the project intranet document root. Any files that your build script copies over to the location identified by "deployDir" are going to be visible by following the "site" link next to your project on Anthill's main page.

Q: What if I'm a Perforce User who only uses 1 client?
A: The Perforce Adapter in Anthill can be used two ways. You can have one client per project or you can have one client for all of your projects. To set up your projects to use the same client, you need to set the P4VIEW property on the Perforce Adapter. This property, in effect, narrows the client view which limits what is synced and worked with when the project builds.

Normally, if you have one client for all your projects, the view for that client would have to map to the root of the depot:
//depot/... //client_name/...

In this case, you would set the P4VIEW property as a depot view to the root of the project:
// depot /product s /productA/..

Setting the client also causes the working directory of the build to change so you need to change the version file and build file paths. If they were products/productA/build/build.xml before, they will just be build/build.xml.

Q: How do I upgrade to a newer version of Anthill?
A: To upgrade Anthill, you need make a few changes to existing files and directories. Because some of the files have had their names changed in newer versions, an in-place update will not work. Most of these changes are isolated to the anthill.war file; but any changes to the RA profiles are located in the /conf/profiles directory tree.

Unfortunately, doing upgrades is not the easiest thing right now, but if you follow these steps, you shouldn't have any problems converting to the new version of Anthill:

  • Extract the contents of the /conf/profiles directory from the tar.gz file so that they overwrite the contents of your <anthill>/conf/profiles directory.
  • Extract the /dis/anthill.war file from the tar.gz file.
  • Shutdown Tomcat or your servlet container if you are using something other than Tomcat.
  • Deploy the new anthill.war file - on Tomcat you will also need to delete the /webapps/anthill directory which caches the old WAR file contents.
  • Start up your servlet container.

If you have further questions feel free to email Urbancode at developer@urbancode.com or join the Anthill OS mailing list.


© 2010 Urbancode, Inc.
Anthill, AnthillPro, and AnthillOS are trademarks of Urbancode, Inc.
All other trademarks are owned by their respective owners.
tel: (216) 858-9000 fax: (216) 393-0006 email:info@urbancode.com