Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tracecompass-dev] Moving the test traces to a separate project

On 2015-09-23 02:56 PM, Bernd Hufmann wrote:

[...]

But if a developer only wants to load the Trace Compass source, ideally they should not have to use m2e either, I agree.

When loading your patch, then all relevant test projects have compilation errors in Eclipse. The only way I was able to get rid of these error to clone the tracecompass-test-traces git and import them as maven project. This requires m2e. Is there another way?

At first I thought that adding the jar in the plugin's .classpath (and maybe having an Eclipse builder calling an Ant script to download the jar manually) would do it. But for some reason, Eclipse did not want to use it at all, even though the jar has proper OSGi metadata.

Then I tried adding the repo to the Trace Compass's target, but without much more success. Interestingly you can use "bare" jars in target definition files, but only if they are local. They cannot come from a web URL. Inversely, p2 update sites can only be remote, you cannot use a local one, short of running a local web server to expose them.

[...]
Having a separate git is probably a good start. Building an update site for that and adding them to the target definition could be another way (I think Marc-Andre mentioned that)

Yep, this is what I ended up doing.

I specifically did not want to turn the whole project into eclipse-plugin's and eclipse-feature's, because that locks you into the Eclipse/p2 packaging ecosystem. However I found a Maven plugin that can generate a p2 update site from standard Maven artifacts:
https://github.com/reficio/p2-maven-plugin

I did not have much hope at first, but it turned out to work quite well! So I integrated that into the test-traces project, and pointed the output to
http://archive.eclipse.org/tracecompass/tracecompass-test-traces/repository/

Now we can just add this repo to the target definitions and tada! No changes are required to the Dev Environment setup. The downside is that now the test traces are downloaded even if you don't want to run the tests. However, running "git clean" on the Trace Compass source tree will *not* wipe those traces anymore!


The only problem left (hopefully) is the thing where some tests need tar.gz archives. I'm not sure what would be the best approach for that.

Cheers,
Alex



Back to the top