Nice TWiki > Doc > NiceTutorial > NicecAntTaskdef TWiki webs:
Dev | Doc | Main | TWiki | Sandbox
Doc . { Changes | Index | Search | Go }
To use the Nice compiler laso in an ant build script, we developed a task definition for it. Here you can see the documentation with some examples.



Runs the Nice compiler.

All arguments to the Nice compiler Task has to be placed as attributes in the nicec xml-element.


Attribute Description Required
package The Nice package to compile. Yes
jar Compile the Nice sources to archive. No
sourcepath Search path for source packages. Is a list of directories and .jar archives. No
destination Destination directory for compiled packages. No
classpath Search path for compiled packages and libraries. No
output Generate native executable. No
compile Compile packages but do not link them. No
recompile Force recompilation of package. No
recompile_all Force recompilation of all dependant packages. No
exclude_runtime Avoid inclusion of the runtime in the archive. No
runtime Location of nice.jar. Yes
native_compiler Location of the native compiler binary (gcj). No
editor Tell nicec that it is called by an editor. No


Nicec's classpath attribute is a PATH like structure and can also be set via a nested classpath element. This is very reasonable if you want to make your build script's pathes platform independent.

   <nicec package="test" >
       <pathelement location="\test.jar"/>
       <pathelement path="${java.class.path}"/>

It is possible to use the classpath attribute together with the classpath nested tag. In this case the result is a concatenated path.

It is highly recommended to use the nested version!


   <taskdef name="nicec" classname=""/>
   <target name="nice-compiler">
     <nicec package="test" runtime="../share/java/nice.jar"/>

-- AlexGreif - 14 Mar 2003

It is important, that the class is in the ANT classpath. You can easily achieve that with placing the nice.jar in the library directory of your Ant distribution: $ANT_HOME/lib.

-- ChristianS - 04 Oct 2003

Topic NicecAntTaskdef . { Edit | Attach | Ref-By | Printable | Diffs | r1.7 | > | r1.6 | > | r1.5 | More }
Revision r1.7 - 28 Apr 2005 - 11:54 GMT - TWikiGuest
Parents: WebHome > NiceTutorial
Copyright © 1999-2003 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback.