Search code examples
eclipsemaventycho

Running Eclipse inside Tycho using reactor artifacts


Is there a way to make the tycho-eclipserun-plugin:eclipse-run goal resolve dependencies against artifacts in the current reactor or in the local repository. I'm trying to run the Eclipse/CDT headless build application as a step in our Tycho build, but I cannot figure out how to populate the Eclipse instance with the newly-built toolchain plugins.

<plugin>
    <groupId>org.eclipse.tycho.extras</groupId>              
    <artifactId>tycho-eclipserun-plugin</artifactId>
    <executions>
    <execution>
        <configuration>
        <appArgLine>-application org.eclipse.cdt.managedbuilder.core.headlessbuild -import file:///...  -cleanBuild all</appArgLine>
                <repositories>
                    <repository>
                        <url>http://download.eclipse.org/releases/kepler/</url>
                        <layout>p2</layout>
                    </repository>
                </repositories>
                <dependencies>
                    ...
                    <dependency> 
                        <artifactId>my.toolchain.feature</artifactId>
                        <type>eclipse-feature</type>
                    </dependency>
        </dependencies>
            </configuration>
            <goals>
                <goal>eclipse-run</goal>
            </goals>
            <phase>test</phase>
        </execution>
    </executions>
 </plugin>

This will fail since my toolchain plugins are not present in the Eclipse instance which hosts the headless build application. I could, of course, point out an external update site which hosts the plugins, but I would like to be able to use the plugins which are already being built in the same reactor. Is that possible?

EDIT: Original question included "or local repository artifacts", but that was not what I actually meant.


Solution

  • No, this is not possible.

    Earlier versions of Tycho allowed using artifacts from the reactor for the eclipserun-plugin, but this caused problems for projects which build upstream artifacts from the artifacts they used for the eclipserun-plugin, namely the Eclipse Platform. So to fix this, the artifacts used by the eclipserun-plugin were decoupled from the reactor & reactor dependencies in Tycho 0.17.0.

    One could imagine ways to re-allow this use case, but this is currently just not implemented. AFAIK there are no concrete ideas yet how to do this. If you want to contribute one, you could file an enhancement in Tycho's issue tracker.