Thanks David. Much appreciated. I notice
too, that builds are being triggered when refreshing the Package view.
From: dsdp-mtj-dev-bounces@xxxxxxxxxxx
[mailto:dsdp-mtj-dev-bounces@xxxxxxxxxxx] On
Behalf Of David Marques
Sent: Friday, April 24, 2009 1:35
PM
To: Mobile
Tools for The Java Platform mailing list
Subject: Re: [dsdp-mtj-dev]
Nightly Build N20090422 - Build hooks
Hi Jon,
Well it seems that the build process is being invoked more
than once for every device. I have looked into the code and it really does some
operations that will start an automatic build such as when changing device
classpath containers. There might be some other issues on the build process. I
have been doing some refactoring on the build locally for a while in order to
split the building actions, on my working copy the hooks get called as
expected. I will add my proposal for build refactoring to the wiki(some state
charts), hopefully at the end of the day. As soon as it becomes available there
I will let everyone know, so we can discuss about it. If everyone agrees with
the proposal, we can commit it into the trunk :) For now i think you should do
your actions even if it is being called more than once.
Regards,
David Marques
Jon Dearden wrote:
I
just answered my second question. I did not realize I can cast an IMTJProject into a MidletSuiteProject, so I am good to go.
Jon
Here is the result, David. The
blank lines are added by me. This is the result
of clicking "Create package"-->"Yes to package all configurations"
with
three
Runtimes in the list and Phone ONE as the currently
selected configuration.
It appears that there
is some duplication of notifications. Note also, there
is no final POST_BUILD for Phone ONE.
Phone ONE:PRE_BUILD
Phone ONE:PRE_PREVERIFICATION
Phone ONE:POST_PREVERIFICATION
Phone ONE:POST_BUILD
Phone TWO:PRE_BUILD
Phone TWO:PRE_PREPROCESS
Phone TWO:POST_PREPROCESS
Phone TWO:PRE_COMPILATION
Phone TWO:POST_COMPILATION
Phone TWO:PRE_PREVERIFICATION
Phone TWO:POST_PREVERIFICATION
Phone TWO:POST_BUILD
Phone TWO:PRE_BUILD
Phone TWO:PRE_PREPROCESS
Phone TWO:POST_PREPROCESS
Phone TWO:PRE_COMPILATION
Phone TWO:POST_COMPILATION
Phone TWO:PRE_PREVERIFICATION
Phone TWO:POST_PREVERIFICATION
Phone TWO:POST_BUILD
Phone TWO:PRE_BUILD
Phone TWO:PRE_PREVERIFICATION
Phone TWO:POST_PREVERIFICATION
Phone TWO:POST_BUILD
Phone THREE:PRE_BUILD
Phone THREE:PRE_PREPROCESS
Phone THREE:POST_PREPROCESS
Phone THREE:PRE_COMPILATION
Phone THREE:POST_COMPILATION
Phone THREE:PRE_PREVERIFICATION
Phone THREE:POST_PREVERIFICATION
Phone THREE:POST_BUILD
Phone THREE:PRE_BUILD
Phone THREE:PRE_PREPROCESS
Phone THREE:POST_PREPROCESS
Phone THREE:PRE_COMPILATION
Phone THREE:POST_COMPILATION
Phone THREE:PRE_PREVERIFICATION
Phone THREE:POST_PREVERIFICATION
Phone THREE:POST_BUILD
Phone THREE:PRE_BUILD
Phone THREE:PRE_PREVERIFICATION
Phone THREE:POST_PREVERIFICATION
Phone THREE:POST_BUILD
Phone ONE:PRE_BUILD
Phone ONE:PRE_PREPROCESS
Phone ONE:POST_PREPROCESS
Phone ONE:PRE_COMPILATION
Phone ONE:POST_COMPILATION
Phone ONE:PRE_PREVERIFICATION
Phone ONE:POST_PREVERIFICATION
Phone ONE:POST_BUILD
Phone ONE:PRE_BUILD
Phone ONE:PRE_PREPROCESS
Phone ONE:POST_PREPROCESS
Phone ONE:PRE_COMPILATION
Phone ONE:POST_COMPILATION
Phone ONE:PRE_PREVERIFICATION
Phone ONE:POST_PREVERIFICATION
Phone ONE:POST_BUILD
Phone ONE:PRE_BUILD
Phone ONE:PRE_PREPROCESS
Phone ONE:POST_PREPROCESS
Phone ONE:PRE_COMPILATION
Phone ONE:POST_COMPILATION
On a related note, I get a reference to an
IMTJProject in the call back, but how can I get
a hold of the IMidletSuiteProject from the IMTJProject? Specifically, I am
trying to get the name and location of the deployed JAD and JAR files.
Regards,
Jon
-----Original Message-----
From: dsdp-mtj-dev-bounces@xxxxxxxxxxx
[mailto:dsdp-mtj-dev-bounces@xxxxxxxxxxx]
On Behalf Of David Marques
Sent: Thursday, April 23, 2009 5:46 PM
To: Mobile Tools for The
Java Platform mailing list
Subject: Re: [dsdp-mtj-dev] Nightly Build N20090422 - Build hooks
Hi Jon,
I guess the behavior you are describing is caused by
the incremental
project builders. For example the auto build can be
interrupted in the
middle of a build operation and start a full build
requested by the user
such as when the "create package" is
selected. So you might get more
than one build cycle. Can you put the following code
in your hook and
send the output ??
@Override
public void buildStateChanged(IMTJProject project, MTJBuildState
state,
IProgressMonitor monitor) throws CoreException {
String name =
project.getRuntimeList().getActiveMTJRuntime().getName();
System.err.println(name + ":" + state);
}
Regards,
David Marques
Jon Dearden wrote:
>
> That’s correct.
>
> ------------------------------------------------------------------------
>
> *From:* dsdp-mtj-dev-bounces@xxxxxxxxxxx
> [mailto:dsdp-mtj-dev-bounces@xxxxxxxxxxx]
*On Behalf Of *David Marques
> *Sent:* Thursday, April 23, 2009 5:24 PM
> *To:* Mobile Tools for The Java Platform mailing list
> *Subject:* Re: [dsdp-mtj-dev] Nightly Build
N20090422 - Build hooks
>
> Hi Jon,
>
> Well, from what I understood you have one
device and you got three
> builds when "Create Package" was
selected. Is that right ?
>
> Regards,
>
> David Marques
>
> Jon Dearden wrote:
>
> I just tried another test and I think there is
be a problem.
>
> Occasionally I get an error when I make a
change and MTJ claims I need
> to save the Application Descriptor info before
continuing. But I have
> already saved it and cannot make MTJ happy.
This problem has been
> around for a while and is not related to the
build hooks. Perhaps I
> missed something in my device import routine.
The solution is to
> delete the Runtimes associated with the project
and add them again.
>
> What I did was add two devices, A and B and
then I ran into the above
> problem, so I added C and deleted A and B. Now
MTJ is happy with device C.
>
> When I click “Create Package”, my
code gets build hook notifications
> about THREE builds. All of them report the same
active runtime name
> obtained from
>
>
project.getRuntimeList().getActiveMTJRuntime().getName()
>
> The end result is that my code does not know
when the build that is of
> interest is occurring.
>
>
------------------------------------------------------------------------
>
> *From:* dsdp-mtj-dev-bounces@xxxxxxxxxxx
> <mailto:dsdp-mtj-dev-bounces@xxxxxxxxxxx>
> [mailto:dsdp-mtj-dev-bounces@xxxxxxxxxxx]
*On Behalf Of *Jon Dearden
> *Sent:* Thursday, April 23, 2009 3:43 PM
> *To:* Mobile Tools for The Java Platform mailing list
> *Subject:* RE: [dsdp-mtj-dev] Nightly Build
N20090422 - Build hooks
>
> Yes, that is clear David. Thanks.
>
> What I find puzzling, however, is that I can
add device “B” to the
> list and I get the whole round of build
notifications, even for device
> “B” when it appears that nothing is
yet being built for device “B”. Is
> that because there is a lot of building going
on even before anything
> appears in the deployed folder?
>
>
------------------------------------------------------------------------
>
> *From:* dsdp-mtj-dev-bounces@xxxxxxxxxxx
> <mailto:dsdp-mtj-dev-bounces@xxxxxxxxxxx>
> [mailto:dsdp-mtj-dev-bounces@xxxxxxxxxxx]
*On Behalf Of *David Marques
> *Sent:* Thursday, April 23, 2009 3:23 PM
> *To:* Mobile Tools for The Java Platform mailing list
> *Subject:* Re: [dsdp-mtj-dev] Nightly Build
N20090422 - Build hooks
>
> Hi Jon,
>
> Each build hook implementation gets notified
both on incremental and
> package builds. So if you have N devices then
all hooks will be called
> N times one for each device once for every
state transition. So if i
> have 2 devices and 5 build states for example,
you will have 10 hook
> calls. Was I clear enough ??
>
> Regards,
>
> David Marques
>
> Jon Dearden wrote:
>
> Hi everyone,
>
> I have been playing with the nightly build
Diego notified us of
> yesterday. It is a big leap forward from 1.0
M6. Well done.
>
> I have a question for David about the build
hooks. At present, when I
> add a second device to the Runtime list, the
SDK for that device gets
> notified through the whole range of build steps
(twice actually) even
> though no JAD or JAR appears on the deployed
folder for that device.
> This is before I click “Create
Package”. Why is this?
>
> Cheers,
>
> Jon
>
>
------------------------------------------------------------------------
>
> *From:* dsdp-mtj-dev-bounces@xxxxxxxxxxx
> <mailto:dsdp-mtj-dev-bounces@xxxxxxxxxxx>
> [mailto:dsdp-mtj-dev-bounces@xxxxxxxxxxx]
*On Behalf Of *Sandin
> Diego-WDS057
> *Sent:* Wednesday, April 22, 2009 3:25 PM
> *To:* Mobile Tools for The Java Platform mailing list
> *Subject:* [dsdp-mtj-dev] Nightly Build
N20090422 Available for Download
>
> Hi everyone,
>
> We’ve just published our latest nightly
build. This build has the
> latest in MTJ API and documentation. All MTJ
API javadocs were created
> (except for the MTJCore class that still under
development.) and two
> new sections were added to the Developer guide:
“*Extending the build
> process with custom build hooks*.” and
“*Creating a Java ME MIDlet
> Template*”.
>
> This build also have the latest version of our
new features, including
> documentation:
>
> * Signing UI
Enhancements
> * MIDlets templates
> * Build Properties
support
> * Build hooks
>
> It’s *highly* recommended to anyone
extending MTJ to take a look in
> the Developer Guide as the API was updated
since the latest drop (a
> new Extension Point was added (Build Hooks) and
the Library API was
> refactored (workspace is incompatible with
previous version)).
>
>
> The nightly build can be downloaded from
> http://download.eclipse.org/dsdp/mtj/downloads/drops/N-N20090422-200904221509/index.html
>
> Please, take some time and try this new
version, feedbacks are always
> welcome.
>
> Regards,
>
> Diego Madruga Sandin
>
>
---------------------------------------------------------------------
> This transmission (including any attachments)
may contain confidential
> information, privileged material (including
material protected by the
> solicitor-client or other applicable
privileges), or constitute
> non-public information. Any use of this information
by anyone other
> than the intended recipient is prohibited. If
you have received this
> transmission in error, please immediately reply
to the sender and
> delete this information from your system. Use,
dissemination,
> distribution, or reproduction of this
transmission by unintended
> recipients is not authorized and may be
unlawful.
>
>
>
>
>
>
>
>
>
------------------------------------------------------------------------
>
>
>
>
>
>
>
> _______________________________________________
> dsdp-mtj-dev mailing list
> dsdp-mtj-dev@xxxxxxxxxxx
<mailto:dsdp-mtj-dev@xxxxxxxxxxx>
> https://dev.eclipse.org/mailman/listinfo/dsdp-mtj-dev
>
>
>
---------------------------------------------------------------------
> This transmission (including any attachments)
may contain confidential
> information, privileged material (including
material protected by the
> solicitor-client or other applicable
privileges), or constitute
> non-public information. Any use of this
information by anyone other
> than the intended recipient is prohibited. If
you have received this
> transmission in error, please immediately reply
to the sender and
> delete this information from your system. Use,
dissemination,
> distribution, or reproduction of this
transmission by unintended
> recipients is not authorized and may be
unlawful.
>
>
---------------------------------------------------------------------
> This transmission (including any attachments)
may contain confidential
> information, privileged material (including
material protected by the
> solicitor-client or other applicable
privileges), or constitute
> non-public information. Any use of this
information by anyone other
> than the intended recipient is prohibited. If
you have received this
> transmission in error, please immediately reply
to the sender and
> delete this information from your system. Use,
dissemination,
> distribution, or reproduction of this
transmission by unintended
> recipients is not authorized and may be
unlawful.
>
>
>
>
> ------------------------------------------------------------------------
>
>
>
> _______________________________________________
> dsdp-mtj-dev mailing list
> dsdp-mtj-dev@xxxxxxxxxxx
<mailto:dsdp-mtj-dev@xxxxxxxxxxx>
> https://dev.eclipse.org/mailman/listinfo/dsdp-mtj-dev
>
>
>
---------------------------------------------------------------------
> This transmission (including any attachments)
may contain confidential
> information, privileged material (including
material protected by the
> solicitor-client or other applicable
privileges), or constitute
> non-public information. Any use of this
information by anyone other
> than the intended recipient is prohibited. If
you have received this
> transmission in error, please immediately reply
to the sender and
> delete this information from your system. Use,
dissemination,
> distribution, or reproduction of this
transmission by unintended
> recipients is not authorized and may be
unlawful.
>
------------------------------------------------------------------------
>
> _______________________________________________
> dsdp-mtj-dev mailing list
> dsdp-mtj-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/dsdp-mtj-dev
>
_______________________________________________
dsdp-mtj-dev mailing list
dsdp-mtj-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dsdp-mtj-dev
---------------------------------------------------------------------
This transmission (including any attachments) may contain confidential
information, privileged material (including material protected by the
solicitor-client or other applicable privileges), or constitute non-public
information. Any use of this information by anyone other than the intended
recipient is prohibited. If you have received this transmission in error,
please immediately reply to the sender and delete this information from your
system. Use, dissemination, distribution, or reproduction of this transmission
by unintended recipients is not authorized and may be unlawful.
---------------------------------------------------------------------
This transmission (including any attachments) may contain confidential
information, privileged material (including material protected by the
solicitor-client or other applicable privileges), or constitute non-public
information. Any use of this information by anyone other than the intended recipient
is prohibited. If you have received this transmission in error, please
immediately reply to the sender and delete this information from your system.
Use, dissemination, distribution, or reproduction of this transmission by
unintended recipients is not authorized and may be unlawful.
_______________________________________________
dsdp-mtj-dev mailing list
dsdp-mtj-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dsdp-mtj-dev
---------------------------------------------------------------------