New to ANT - Every other build fails
Is this because there is not a 'clean' method in the default (sample) extension's build.xml?
Here's the error i get every 2nd time i run 'ant
myextension':
[java] Caused by: java.util.zip.ZipException: duplicate entry:
com/moneydance/modules/features/myextension/signature.dict
But if i run 'ant myextension' again, every other 2nd time it works, and builds something that is able to be used.
Again it goes like this:
-Build -Success -Build again without changing anything -Fail -Buid
again without changing anything -Success then again and fail...
etc.
Note i did slightly modify the build.xml file to add some .jar libraries as a beginning point.
The jars i added were:
<pathelement path="../lib/extadmin.jar"/>
<pathelement path="../lib/moneydance.jar"/>
<pathelement path="../lib/jcommon-1.0.17.jar"/>
<pathelement path="../lib/swtgraphics2d.jar"/>
<pathelement path="../lib/jackson-all-1.9.4.jar"/>
<pathelement path="../lib/jfreechart-1.0.14.jar"/>
<pathelement path="../lib/junit.jar"/>
Don't ask me why i added those, i was just looking at the source to another extension and saw it used them, and thought something like jfreechart would be a good base to build on, for example, even though i don't want to (if i don't have to) copy the source from the original extension, but rather learn from it as i build mine.
I haven't yet touched the source java files.
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Sean Reilly on 03 Feb, 2012 04:58 PM
Hi Rob, the every-other-signature thing sounds like the same extension (.mxt) file is being signed multiple times. Maybe the build process the myextension.mxt file is not being deleted before the class files, resources and signature are added? If this were the case then the signing process would fail because a jar/mxt file can only have one signature. I'm guessing that this works every other time because when it fails the file is truncated and (hopefully) reset for the next time around.
Thanks,
Sean
2 Posted by robwilkens on 03 Feb, 2012 05:26 PM
Thanks, I figured i can ignore this error and just build again and it works. I think you're right that it truncates the file resutling in it working the next time.
Another question may be coming soon, but first i'm digging around docs. Basically, when i 'getBalance()' on an account, i'm getting the value in pennies, but i'd like to display it in dollars (or, presumably, whatever the currency of choice's main representation is).
robwilkens closed this discussion on 03 Feb, 2012 05:45 PM.