ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Charbel BITAR <antprettybu...@free.fr>
Subject RE: Ant Pretty Build... (The Return)
Date Mon, 11 Aug 2003 09:11:36 GMT

Hi All,
I was trying to implement more requested features to Ant Pretty Build,
Check out one more time for the new v0.5 at http://antprettybuild.free.fr

I'll explicitly describe how to use this tool:

1- Referencing xsl stylesheet in buildfile.
This is done by adding an instruction after the xml declaration:
  <?xml-stylesheet type="text/xsl" href="antprettybuild.xsl"?>
href is pointing to stylesheet location. Could 
be "../../xsl/antprettybuild.xsl" for example.

2- Environment variables.
Environment variables may be set or not in the xsl stylesheet depending on your 
system.
So, if you already have configured your environment to run Ant,
you only need to clear tag content of xsl:variable like this:

  <!-- Environment Variables -->
  <xsl:variable name="JAVA_HOME"></xsl:variable>
  <xsl:variable name="ANT_HOME"></xsl:variable>
  <xsl:variable name="PATH"></xsl:variable>

If not, you have to set variables to match your local paths.
(I can't imagine you don't know what are JAVA_HOME, ANT_HOME and PATH!)
In the tag text, you can use '/' or '\\' as separator this way:

  <!-- Environment Variables -->
  <xsl:variable name="JAVA_HOME"></xsl:variable>
  <xsl:variable name="ANT_HOME">C:/Program Files/Apache Group/Ant</xsl:variable>
  <xsl:variable name="PATH">%PATH%;C:/Program Files/Apache 
Group/Ant/bin</xsl:variable>

or 

  <!-- Environment Variables -->
  <xsl:variable name="JAVA_HOME"></xsl:variable>
  <xsl:variable name="ANT_HOME">C:\\Program Files\\Apache 
Group\\Ant</xsl:variable>
  <xsl:variable name="PATH">%PATH%;C:/Program Files/Apache 
Group/Ant/bin</xsl:variable>

If someone needs to pass these as params from outside the xsl, <xsl:param>s may 
be used instead of <xsl:variable>s.

3- The layout.
Under the header, project name, basedir and default target are listed.
Here comes the properties table, listing internal project properties,
external property files that can be viewed by clicking on the '?' button near 
each one,
and additional custom properties (these are the famous blank textfields, navy 
blue now!)
I've added 3 custom fields to input properties under build properties.
So, to pass a property like you do in the command line by writing:
  -Dproperty=value
you only have to write in the first column the property and in the second its 
corresponding value.
(e.g. -Ddebug=true may be entered by clicking in an empty field typing 'debug', 
then typing 'true' in the same row, next column)

Next comes the targets table, this table lists all project targets (and also 
those defined when including xml snippets).
The project's default target is in red, the main targets in yellow and the rest 
in white.
You can run each target by clicking on the button before its name.
To select targets, you check boxes in order to finally run the sequence with 
the 'Run' button.

Then, logger and logfile can be specified. If so, logfile may be viewed after 
(or before if file exists!) running build by clicking on the '?' button.

Just under you can see 'More', this is a special request to add more command 
line options,
In this textfield, you can write for example '-diagnostics' or '-listener...' 
and will be added to command line.

The run mode may also be chosen, the 'default' mode by default to 'debug' mode.

And before clicking on the run button, you may want to keep or close the shell 
window after building,
so you can check or uncheck the 'Close when done' box.

And that's all folks...

Hope this helps!

--
Charbel

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message