Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-dev] Is m2e ignoring output location set in Eclipse?

Hi guys,

The alteration we need to make is not to the project classpath but to the classpath of the test launcher. At the moment the tests are launched with a classpath which includes "target/classes” which breaks compatibility with the ADT. We need to modify this value so it is “bin/classes” which is the hard-coded default where the ADT compiles Java.

Which API do we need to call to update this value? It looks as though its currently being read from MavenProject.getBuild().getOutputLocation().

Should we call MavenProject.getBuild().setOutputLocation()?

Should we modify the paths output by a subclass of the IRuntimeClasspathProvider?[1]

Or should we use a classifierClasspathProvider as Igor suggests? If so, what call exactly should we make to this API?

[1] This solution presents problems for us, as we have to modify and maintain the output location in multiple locations, modifying in one place would be preferable and less error-prone.

TIA…

— 
@rgladwell



On 9 Jan 2015, at 18:49, Fred Bricon <fbricon@xxxxxxxxx> wrote:

Can't you use a project configurator instead that adds the folder you want to the classpath, in the order you want? 

This is a bit similar to how we handle the Endorsed Libraries container, that needs to come before both the JRE and Maven libraries [1].

 

On Fri, Jan 9, 2015 at 11:19 AM, Csaba Kozák <kozakcsabi@xxxxxxxxx> wrote:
Jason, you are totally right, and that would be the ultimate fix for this (and some other) issue. Even my entire work on our Eclipse workspace links to make the new project structure work, can be removed. :)

However, that may not be available and the near future, and our issue is really-really nasty: it is very hard to figure out by the end user. Actually everything seems to be fine, but the test still not does what you wrote in the SUT. This is because old .class files are picked up from the target folder which contain an old version of your classes. This issue took me a day to figure out, and also Raphael wasted a day i think.

So i want to fix this ASAP to spare m2e-android users to debug this. :)

_______________________________________________
m2e-dev mailing list
m2e-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-dev



--
"Have you tried turning it off and on again" - The IT Crowd
_______________________________________________
m2e-dev mailing list
m2e-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-dev


Back to the top