|
|
![]() Anthill OS FAQQ: 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:
Q: How do you pass properties to Ant?
So, to pass a property called, MyProperty=MyValue, the value of "anthill.build.ant.params" would be:
Q: What source repositories are supported by Anthill? 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?
Q: What version of Apache Ant does Anthill support? 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?
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.
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?
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?
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? <prefix><buildNo><postfix> where
<prefix>can be any String like "MyProduct" or "1.0."
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?
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.? 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? 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?
Q: What if I'm a Perforce User who only uses 1 client?
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:
In this case, you would set the P4VIEW property as a depot view to the root of the project: 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? 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:
If you have further questions feel free to email Urbancode at developer@urbancode.com or join the Anthill OS mailing list.
|