View Javadoc

1   // Copyright (C) 2004, Brian Enigma <enigma at netninja.com>
2   // This file is part of Mac-Package.
3   //
4   // Mac-Package is free software; you can redistribute it and/or modify
5   // it under the terms of the GNU General Public License as published by
6   // the Free Software Foundation; either version 2 of the License, or
7   // (at your option) any later version.
8   //
9   // Mac-Package is distributed in the hope that it will be useful,
10  // but WITHOUT ANY WARRANTY; without even the implied warranty of
11  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  // GNU General Public License for more details.
13  //
14  // You should have received a copy of the GNU General Public License
15  // along with Foobar; if not, write to the Free Software
16  // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17  package org.ninjasoft.macpackager;
18  
19  import java.util.StringTokenizer;
20  
21  /***
22   * Simple bean wrapper for MacPackager class, used by Jelly (as a Jelly Bean!).
23   * @author Brian Enigma
24   */
25  public MavenAntPackager {/package-summary.html">class MavenAntPackager {
26      privateMacPackager macPackager = new MacPackager()/package-summary.html">ong> MacPackager macPackager = new MacPackager();
27      
28      public void execute() throws PackageException {
29          macPackager.buildApplication();
30      }
31      
32      
33      // #####################################################################
34      // Setters
35      public void setJars(String path) {
36          StringTokenizer st = new StringTokenizer(path, ":");
37          while (st.hasMoreTokens()) {
38              String jar = st.nextToken().trim();
39              if (jar.length() > 0)
40                  macPackager.addJar(jar);
41          }
42      }
43      public void addJar(String filename) {
44          macPackager.addJar(filename);
45      }
46      public void setIcon(String icon) {
47          macPackager.setIcon(icon);
48      }
49      public void setInfoString(String infoString) {
50          macPackager.setInfoString(infoString);
51      }
52      public void setMainClass(String mainClass) {
53          macPackager.setMainClass(mainClass);
54      }
55      public void setVersion(String version) {
56          macPackager.setVersion(version);
57      }
58      public void setVmOptions(String vmOptions) {
59          macPackager.setVmOptions(vmOptions);
60      }
61      public void setAppName(String appName) {
62          macPackager.setAppName(appName);
63      }
64  }