wiki:Doc/compiler/running

Version 3 (modified by /O=GRID-FR/C=FR/O=CNRS/OU=LAL/CN=Charles Loomis, 17 years ago) (diff)

--

Running the Compiler

Command Line

The compiler can be invoked from the command line by using "panc". This is a script that is installed with the pan compiler package that invokes a java virtual machine and the compiler. The script options have been designed to be as compatible with previous versions of the "panc" command as possible.

The full list of options can be obtained with the "--help" option.

Ant Task

Using an ant task to invoke the compiler allows the compiler to be easily integrated with other machine management tasks. To use the pan compiler within an ant build file, the pan compiler task must be defined. This can be done with a task like:

<target name="define.panc.task">

	<taskdef resource="org/quattor/ant/panc-ant.xml">
		<classpath>
			<pathelement path="${panc.jar}" />
		</classpath>
	</taskdef>

</target>

where the property ${panc.jar} points to the jar file panc.jar distributed with the pan compiler release.

Running the compiler can be done with a task like the following:

<target name="compile.cluster.profiles">

	<!-- Define the load path.  By default this is just the cluster area. -->
	<path id="pan.loadpath">
		<dirset dir="${basedir}" includes="**/*" />
	</path>

	<panc ...options... >
		<path refid="pan.loadpath" />
		<fileset dir="${basedir}/profiles" casesensitive="yes" includes="*.tpl" />
	</panc>

</target>

where ...options... is replaced with valid options for the panc ant task. The full set of options can be found by looking at the javadoc information for the "org.quattor.pan.ant.PanCompilerTask" class in the javadoc distributed with the release.