FW: Maven Antenna 0.9.14 bug fix for preverify on OS X

27 views
Skip to first unread message

Clifton Craig

unread,
Jun 21, 2008, 10:33:02 AM6/21/08
to skarzh...@gmail.com, michael....@gmail.com, pyx4me...@googlegroups.com
I found a bug in the Preverify code in Antenna which I have a fix for. (See
below for details on what's broken and how to fix.) I've posted to the
Antenna mailing list and now I'm asking around the Pyx4me project. I'm
trying to get an updated Maven-j2me plugin that depends on the later version
of Antenna (which will hopefully include the bug fix I mention below). Any
help that anybody could offer me at this point will be greatly appreciated.
I'm looking at a daunting task of coordinating the release of an Antenna bug
fix and also the release of the Maven-j2me plugin. I'm going to try this
internally (if I don't get burn't out first) then let everyone know how it
goes. I'm not sure where to get the project structure for a Maven2 build of
Antenna so I'll hack it. I'm also not as familiar with Maven plugin
development so I'll have to hack that as well.
--


------ 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


Vlad Skarzhevskyy

unread,
Jun 21, 2008, 11:08:11 AM6/21/08
to pyx4me...@googlegroups.com

Antenna 1.0.2 would be in central repository next week.  You can upload beta 1.1.0 to your own repository and use it adding dependency in your project.



            <plugin>
                <groupId>com.pyx4me</groupId>
                <artifactId>j2me-maven-plugin</artifactId>
                <version>2.0.2</version>
                <executions>
                   <execution>
                        <goals>
                            <goal>package</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    ....
                </configuration>

                <dependencies>
                   <dependency>
                        <groupId>net.sf.antenna</groupId>
                        <artifactId>antenna</artifactId>
                        <version>1.1.0-beta1</version>
                    </dependency>
                </dependencies>

            </plugin>
--
Vlad

somatik

unread,
Jun 21, 2008, 6:21:09 PM6/21/08
to pyx4me-users
I'm also having problems on mac compiling the py4xme project.
Craig, what preverifier are you using? as the wtk one won't work on
mac. I've tried the phoneme one but it gave me an error but didn't
look into it, might be this issue.

On Jun 21, 5:08 pm, "Vlad Skarzhevskyy" <skarzhevs...@gmail.com>
wrote:
> Antenna *1.0.2 would be in central repository next week.  You can upload
> beta 1.1.0 to your own repository and use it adding dependency in your
> project.*
>
>             <plugin>
>                 <groupId>com.pyx4me</groupId>
>                 <artifactId>j2me-maven-plugin</artifactId>
>                 <version>2.0.2</version>
>                 <executions>
>                    <execution>
>                         <goals>
>                             <goal>package</goal>
>                         </goals>
>                     </execution>
>                 </executions>
>                 <configuration>
>                     ....
>                 </configuration>
>
>                 <dependencies>
>                    <dependency>
>                         <groupId>net.sf.antenna</groupId>
>                         <artifactId>antenna</artifactId>
>                         <version>1.1.0-beta1</version>
>                     </dependency>
>                 </dependencies>
>
>             </plugin>
>
> On 6/21/08, Clifton Craig <clifton.cr...@gmail.com> wrote:
>
>
>
>
>
> > I found a bug in the Preverify code in Antenna which I have a fix for. (See
> > below for details on what's broken and how to fix.) I've posted to the
> > Antenna mailing list and now I'm asking around the Pyx4me project. I'm
> > trying to get an updated Maven-j2me plugin that depends on the later
> > version
> > of Antenna (which will hopefully include the bug fix I mention below). Any
> > help that anybody could offer me at this point will be greatly appreciated.
> > I'm looking at a daunting task of coordinating the release of an Antenna
> > bug
> > fix and also the release of the Maven-j2me plugin. I'm going to try this
> > internally (if I don't get burn't out first) then let everyone know how it
> > goes. I'm not sure where to get the project structure for a Maven2 build of
> > Antenna so I'll hack it. I'm also not as familiar with Maven plugin
> > development so I'll have to hack that as well.
> > --
>
> > ------ Forwarded Message
> > From: Clifton Craig <clifton.cr...@gmail.com>
> > Date: Sat, 21 Jun 2008 10:17:51 -0400
> > To: <o...@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 <clifton.cr...@gmail.com>
> > Date: Sat, 21 Jun 2008 10:00:27 -0400
> > To: <antenna-discuss...@lists.sourceforge.net>

Francis De Brabandere

unread,
Jun 21, 2008, 7:02:42 PM6/21/08
to pyx4me-users
changed the antenna dependency to 1.1.0-beta1 for the pyxme maven
plugin in my local workspace and tried building the pyx4me project
still having the same issue (missing space), I suppose your patch
hasn't made it to that release?

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.

Francis De Brabandere

unread,
Jun 21, 2008, 7:19:42 PM6/21/08
to pyx4me-users

somatik

unread,
Jun 22, 2008, 4:46:35 AM6/22/08
to pyx4me-users
the patch has been submitted to their svn/cvs but it might take a
while for their next release

On Jun 22, 1:19 am, "Francis De Brabandere" <franci...@gmail.com>
wrote:
> and to continue my monologue:
>
> the discussed issue:http://sourceforge.net/tracker/index.php?func=detail&aid=1938188&grou...
>
> the maven upload feature requesthttp://sourceforge.net/tracker/index.php?func=detail&aid=1731633&grou...
>
> On Sun, Jun 22, 2008 at 1:02 AM, Francis De Brabandere
>
>
>
> <franci...@gmail.com> wrote:
> > changed the antenna dependency to 1.1.0-beta1 for the pyxme maven
> > plugin in my local workspace and tried building the pyx4me project
> > still having the same issue (missing space), I suppose your patch
> > hasn't made it to that release?
>
> > 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

somatik

unread,
Jun 22, 2008, 3:33:34 PM6/22/08
to pyx4me-users
Okay the hole pyx4me project now builds under macos (used the current
cvs version of antenna)

So now it's waiting until they build a new release and for that
release to be submitted to the central maven repo
> ...
>
> read more »

Vlad Skarzhevskyy

unread,
Jun 22, 2008, 3:35:21 PM6/22/08
to pyx4me...@googlegroups.com
I will submit the release to central maven repo. Does not take more then 30 minutes.
--
Vlad

Tuure Laurinolli

unread,
Nov 1, 2012, 12:41:21 PM11/1/12
to pyx4me...@googlegroups.com
It seems that this bug is still alive in the antenna version used by pyx4me.
Reply all
Reply to author
Forward
0 new messages