ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject creating manifest informations for distributable
Date Tue, 11 Sep 2001 13:39:40 GMT
I just tried to make a target "jar" for generating a jar file. Because this
jar file needs some specific manifest information to run properly I have to
add a manifest file. How it's possible to create such a manifest file within
the build file ? The first possibility I tried out is to make a propertyfile
tag but somehow it doesn't work. 
Example code:
<target name="jar" depends="build">
  <jar jarfile="Application.jar" basedir="${Dest}"
The better possibility for me is to create an own task that will generate a
manifest file in a specific directory. I watched the documentation and found
a standard example for doing this:
package com.mydomain;
public class MyVeryOwnTask extends Task {
  private String msg;
  // The method executing the task
  public void execute() throws BuildException {
  // The setter for the "message" attribute
  public void setMessage(String msg) {
    this.msg = msg;
The task can then very easy used for own purposes by implementing the
following lines in the build.xml.
<project name="OwnTaskExample" default="main" basedir=".">
  <taskdef name="mytask" classname="com.mydomain.MyVeryOwnTask"/>
  <target name="main">
    <mytask message="Hello World! MyVeryOwnTask works!"/>
But !
I found not out how it's possible to make a getter for a different type than
String. How it's possible to make a getter- method for an array or a string
list. Is there somebody able to give me an answer ?

Thomas Kerle
 E-mail :  <>

  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message