------ Forwarded Message
From: Clifton Craig <clifto...@gmail.com>
Date: Sat, 21 Jun 2008 10:17:51 -0400
To: <om...@yadan.net>, <jo...@pleumann.de>
Conversation: Maven Antenna 0.9.14 bug fix for preverify on OS X
Subject: FW: Maven Antenna 0.9.14 bug fix for preverify on OS X
I'm forwarding this to you two because I don't want to loose track of this
and it doesn't look like my email is showing in the sourceforge mailing list
view. I'm also looking to contact the folks at pyx4me to ask about a revised
release that depends on the later version of your Antenna project. I'm not
sure how far I'l get with pulling these pieces together but I'm going to
try. Thanx in advance for any and all help!
--
------ Forwarded Message
From: Clifton Craig <clifto...@gmail.com>
Date: Sat, 21 Jun 2008 10:00:27 -0400
To: <antenna-d...@lists.sourceforge.net>
Conversation: Maven Antenna 0.9.14 bug fix for preverify on OS X
Subject: Maven Antenna 0.9.14 bug fix for preverify on OS X
Hello,
I'm posting in regards to what looks like a bug in the Antenna preverify
task. I dug an up old query about the same bug after searching the list
which I'm inlining below. I have a couple of questions. It seems like only
version 0.9.14 is bundled in the Maven repository. How do I go about getting
an updated bundle (Eg. 1.1.0-BETA)? Who do I see about submitting a patch if
I fix the bug? I have other updates (to the OTA server) I'm wanting to
commit as well.
The bug I believe is in these lines of
de/pleumann/antenna/misc/Utility.java:
/**
* MacOS X / MPowerPlayer special handling.
*/
if (System.getProperty("os.name").startsWith("Mac")) {
if ("1.0".equals(cldcVersion)) {
arguments += " -cldc1.0 ";
}
}
There should be an else on the nested "if" that at least appends an extra
whitespace character so the command can execute. I fiugred this out by
running the pyx4me example project with debug logging (-X) on my MacPro and
copying the arguments generated by the de.pleumann.antenna.misc.Utility
class. The flaw leads to combining the classpath argument with the srcFile
argument on the command line. Adding a space is all that's necessary to fix.
I looked into the source of 1.10-Beta and the bug looks like it's there too
but I can't try it easily because The Maven support I'm using is bound to
0.9.14. The logic in beta is as follows:
String arguments = "-classpath " + getOutsideQuotedPath(classpath) +
" -d " + target;
/**
* MacOS X / MPowerPlayer special handling.
*/
if (toolkitType == TOOLKIT_MPOWER) {
if ("1.0".equals(cldcVersion)) {
arguments += " -cldc1.0 ";
}
}
else if (System.getProperty("os.name").startsWith("Mac")) {
if ("1.0".equals(cldcVersion)) {
arguments += " -cldc1.0 ";
}
}
Once again if the toolkit is MPowerPlayer or the OS is Mac we must use cldc
1.0 or the we never set an additional space in the arguments string. It
looks confusing because there is a default case that never gets executed
since we do fall inside one of the top level if conditions but fail the
nested condition. Here's the old email explaining the bug:
<quote>
Hi,
is Antenna compatible with MPP's preverify or PhoneME's preverify? I'm
using a Maven plugin that uses Antenna and I get the error bellow...
thanks
Alexandre
[INFO] WtkPreverify.fullClasspath
/Applications/Java/wtk-custom/lib/midpapi20.jar:/Applications/Java/wtk-custo
m/lib/cldcapi11.jar
[WtkJad] Preverifying
Users/alegomes/Documents/workspaces/javanet/btutil/btutil-base/target/btutil
-base-1.0.3-SNAPSHOT-me.jar
Usage: preverify [options] classnames|dirnames ...
where options include:
-classpath <directories separated by ':'>
Directories in which to look for classes
-d <directory> Directory in which output is written (default is
./output/)
-cldc1.0 Checks for existence of language features prohibited
by CLDC 1.0 (native methods, floating point and
finalizers)
-nofinalize No finalizers allowed
-nonative No native methods allowed
-nofp No floating point operations allowed
@<filename> Read command line arguments from a text file
Command line arguments must all be on a single line
Directory names must be enclosed in double quotes (")
[INFO]
------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Preverification failed (result=1)
[INFO]
------------------------------------------------------------------------
[INFO] Trace
Preverification failed (result=1)
--
</quote>
------ End of Forwarded Message
------ End of Forwarded Message
can you let me know when your patch is committed to their next
release/trunk? Is there some bug tracker issue I could add a
watch/subscribe to? I really would like to be able to build my
projects on mac.
It would be nice if the antenna team would push their releases to the
central maven repo.
--
http://www.somatik.be
Microsoft gives you windows, Linux gives you the whole house.
the discussed issue:
http://sourceforge.net/tracker/index.php?func=detail&aid=1938188&group_id=67420&atid=517826
the maven upload feature request
http://sourceforge.net/tracker/index.php?func=detail&aid=1731633&group_id=67420&atid=517829