[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-dev] m2e classloader made from MavenProject.getCompileClasspathElements()?



-------- Original Message  --------
Subject: Re: [m2e-dev] m2e  classloader made from MavenProject.getCompileClasspathElements()?
From: Igor Fedorenko <igor@xxxxxxxxxxxxxx>
To: Andrei Pozolotin <andrei.pozolotin@xxxxxxxxx>
Date: Wed 22 Feb 2012 04:20:18 PM CST
I am sorry, but I only answer m2e development questions on
m2e-dev@xxxxxxxxxxx mailing list.

--
Regards,
Igor

On 12-02-22 4:18 PM, Andrei Pozolotin wrote:
Igor:

-------- Original Message --------
Subject: Re: [m2e-dev] m2e classloader made from
MavenProject.getCompileClasspathElements()?
From: Igor Fedorenko <igor@xxxxxxxxxxxxxx>
To: Andrei Pozolotin <andrei.pozolotin@xxxxxxxxx>
Cc: Maven Integration for Eclipse developers mailing list
<m2e-dev@xxxxxxxxxxx>
Date: Wed 22 Feb 2012 01:19:12 PM CST
What are you trying to achieve?

in m2e examples I found, m2e instantiates new ProjectConfigurator on
every incremental build invocation;
in the spirit of getting minimum response time, I would like to cache
class loaders
for "stable" dependencies (like those coming from jars and not from folders)


Neither m2e inside Eclipse workspace nor maven on command line create
classloaders for project compile classpath but there may be other ways
to achieve what you need.
so my request then is a bad idea? :-)


--
Regards,
Igor
thank you;

Andrei



On 12-02-22 1:24 PM, Andrei Pozolotin wrote:
*Igor, hello:*

currently I am duplicating your m2e classloader; can you please clarify:

1) where can I get m2e classloader made from
MavenProject.getCompileClasspathElements()?
(and also test class path elements?)

I can not see it in any of:

final IMaven maven = MavenPlugin.getMaven();
final BuildContext buildContext = getBuildContext();
final MavenSession session = getSession();
final MojoExecution execution = getMojoExecution();
final MavenProject project = session.getCurrentProject();

2) is this classloader auto-updated on maven pom.xml change?
if not, how can I force an update?

the intent is to load newly incrementally built
target/classes/com/example/SomeComponent.class
and do some byte instrumentation on it,
while having access to m2e-already-resolved compile (or test) scope;

Thank you,

Andrei.