How use jarbundler to create an .app from JPortsUI.jar?

Murray Eisenberg murrayeisenberg at gmail.com
Mon Apr 28 11:48:41 PDT 2014


OK, so I changed build.xml to:

   <?xml version="1.0"?>
   <project name="JPortsUI">
   <taskdef name="jarbundler" 
         classname="net.sourceforge.jarbundler.JarBundler" />
   </project>

Now running "ant build.xml" gives a different error:


Buildfile: /Users/[myuserdirname]/jPorts/build.xml

BUILD FAILED
/Users/[myuserdirname]/jPorts/build.xml:4: taskdef class net.sourceforge.jarbundler.JarBundler cannot be found
 using the classloader AntClassLoader[]

I don't know where the MacPorts apache-ant port is supposed to put that unfound file.

On Apr 28, 2014, at 1:27 PM, Jeremy Lavergne <jeremy at lavergne.gotdns.org> wrote:

>> I have the MacPorts ports of jarbundler (@2.2.0_0) and apache-ant (@1.9.3_0) installed and active. I have the file JPortsUI.jar in the folder  ~/jPorts.
>> 
>> Trying to make sense of the docs at http://informagen.com/JarBundler/, I created in that same folder the file build.xml
>> 
>>    <taskdef name="jarbundler" 
>>        classname="net.sourceforge.jarbundler.JarBundler" />
>> 
>> as well as file jarbundler:
>> 
>>    <jarbundler dir="."
>>            name="jPort"
>>            mainclass="JPortsUI"
>>            jar="./JPortsUI.jar" />
>> 
>> I tried now:
>> 
>> cd ~/JPorts
>> ant build.xml
>> 
>> This generates error:
>> 
>> Buildfile: /Users/[myuserdirname]/jPorts/build.xml
>> 
>> BUILD FAILED
>> /Users/[myuserdirname]/jPorts/build.xml:2: Unexpected element "{}tasked" {antlib:org.apache.tools.ant}taskdef
> 
> My understanding of the error is that “taskdef” tag must be inside a wrapper tag.
> 
> Consider this from StackOverflow:
> http://stackoverflow.com/a/3582036
> 
> 
>> Question: What am I doing wrong?
>> 
>> A couple of particular questions:
>> 
>> (i) Should there be an extension to file "jarbundler" and, if so, what?
>> 
>> (ii) The docs at http://informagen.com/JarBundler/ say to "move the file jarbundler-2.3.1.jar into your local ANT lib directory." Given the configuration of MacPorts, with ports going into /opt, what does that mean I also need to do, if anything?  I note that /opt/local/lib has no ant subdirectory.

---
Murray Eisenberg		murrayeisenberg at gmail.com
503 King Farm Blvd #101		Home (240)-246-7240
Rockville, MD 20850-6667	Mobile (413)-427-5334







More information about the macports-users mailing list