Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-dev] build-before-launch ? background m2e task ?

Igor:

1) to solve "build-before-launch" I implemented a plugin,
which provides custom java launch configuration contribution,
so it runs m2e goals before actual java app launch;
it sort of works; but:

question:

2) how can I get appropriate m2e / plexus scanner instance so I run these pre-launch m2e goals only when there are really project changes?
scanner instance I was able to get based on what I see in m2e source code is somehow not incremental,
it returns whole project file set every time I run it :-)

3) or may be there are easier ways to detect if there is a need to run m2e?

Thank you,

Andrei



-------- Original Message  --------
Subject: Re: [m2e-dev] build-before-launch ? background m2e task ?
From: Igor Fedorenko <igor@xxxxxxxxxxxxxx>
To: m2e-dev@xxxxxxxxxxx
Date: Fri 14 Oct 2011 02:10:45 PM CDT
I was under impression that Job.cancel raises
IProgressMonitor.isCanceled on job's monitor. Guess I was wrong.

--
Regards,
Igor

On 11-10-14 3:08 PM, Andrei Pozolotin wrote:
Igor:

-------- Original Message --------
Subject: Re: [m2e-dev] build-before-launch ? background m2e task ?
From: Igor Fedorenko <igor@xxxxxxxxxxxxxx>
To: m2e-dev@xxxxxxxxxxx
Date: Thu 13 Oct 2011 04:39:58 PM CDT
I do not know much about maven-scr-plugin, so can't really comment on
this code. I think you can use Job.cancel to tell the job to stop
executing,
fyi: "cancel" has to be 2 step:
1) cancel eclipse job;
2) use job.canceling() to notify maven invocation via its
monitor.setCanceled(true);

but I am not 100%.
this "b/g execute with cancel" hack works surprisingly well so far;
eclipse is responsive again, despite each maven background invocation is
taking some 3-5 seconds;
:-)

thanks again!

Andrei.


--
Regards,
Igor

On 11-10-13 5:18 PM, Andrei Pozolotin wrote:
Igor:

-------- Original Message --------
Subject: Re: [m2e-dev] build-before-launch ? background m2e task ?
From: Igor Fedorenko <igor@xxxxxxxxxxxxxx>
To: m2e-dev@xxxxxxxxxxx
Date: Thu 13 Oct 2011 03:36:51 PM CDT
I honestly believe this is a bad idea and will cause problems.
bad idea for your review :-)
https://github.com/carrot-garden/carrot-maven/tree/master/carrot-maven-m2e


update site:
http://github.com/carrot-garden/carrot-maven/raw/master/carrot-maven-m2e/carrot-maven-m2e-config-site/site/


m2e pde plugin:
https://github.com/carrot-garden/carrot-maven/tree/master/carrot-maven-m2e/carrot-maven-m2e-config/src/com/carrotgarden/m2e/config


and use case project:
https://github.com/carrot-garden/carrot-maven/tree/master/carrot-maven-m2e/carrot-maven-m2e-usage


thanks;

Andrei.

--
Regards,
Igor

On 11-10-13 12:08 PM, Andrei Pozolotin wrote:
Igor:

if I take the "background job" route,
what is the correct way to abort currently running maven invocation?

I am trying to do the following:
a) each incremental build checks if there is already a maven build
job running;
b) if so, cancel it and start a new one;

Thank you,

Andrei.



-------- Original Message --------
Subject: Re: [m2e-dev] build-before-launch ? background m2e task ?
From: Igor Fedorenko <igor@xxxxxxxxxxxxxx>
To: m2e-dev@xxxxxxxxxxx
Date: Wed 12 Oct 2011 05:19:15 PM CDT
See inline.

--
Regards,
Igor

On 11-10-12 5:17 PM, Andrei Pozolotin wrote:
Hello;

1) I am developing a m2e extension on the lines of:
http://wiki.eclipse.org/M2E_Extension_Development

2) In need to cover 2 executions:

a)
http://felix.apache.org/site/apache-felix-maven-scr-plugin-use.html
org.apache.felix:maven-scr-plugin:scr

b)
http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html

org.apache.felix:maven-bundle-plugin:manifest

QUESTIONS:

A) I need to run both of the above goals right before java
application launch via eclipse launcher;
(I do not want to run them on incremental build)
how m2e gives access to "build-before-launch" JDT event?


Can you provide some documentation pointers or other information that
explains how to implement build-before-launch "handler"?

B) if there is no m2e access to "build-before-launch" JDT event,
can I run these goals on background, in async thread pool w/o
blocking m2e builder invocation?
(so incremental build just serves as a trigger for background
rebuild)


This really depends on what you need to do. If your project
configurator
needs access to workspace, especially change any workspace
resources, it
will likely be easier to run this code as part of a builder. If the
code
does not make any changes to workspace, it is probably be okay to run
this as a background job.

C) maven-bundle-plugin life cycle is already mapped by some other
m2e extension;
(I receive "conflicting life cycle mappings" error)
how can I override that? how can I find which other extension is
doing that?


m2e-tycho provides mapping for maven-bundle-plugin bundle and
manifest
goals. Either uninstall m2e-tycho project configurator or force
use of
your project configurator from pom.xml file.


[1] http://wiki.eclipse.org/M2E_plugin_execution_not_covered


Thank you,

Andrei



_______________________________________________
m2e-dev mailing list
m2e-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-dev
_______________________________________________
m2e-dev mailing list
m2e-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-dev




_______________________________________________
m2e-dev mailing list
m2e-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-dev
_______________________________________________
m2e-dev mailing list
m2e-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-dev




_______________________________________________
m2e-dev mailing list
m2e-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-dev
_______________________________________________
m2e-dev mailing list
m2e-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-dev




_______________________________________________
m2e-dev mailing list
m2e-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-dev
_______________________________________________
m2e-dev mailing list
m2e-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-dev



Back to the top